Skip to main content

vkey mcp calculator

Project description

VKey Calculator MCP

一个基于 MCP (Model Context Protocol) 的计算器服务器,提供数学计算功能。

功能特性

  • 基础算术运算:加法、减法、乘法、除法
  • 高级数学运算:幂运算、平方根、阶乘
  • 错误处理:除零检查等安全机制
  • MCP 协议:支持与 MCP 客户端集成

安装

方法一:使用 uv(推荐)

# 克隆项目
git clone <repository-url>
cd vkey-calculator-mcp

# 安装依赖并运行
uv run -m vkey_calculator_kel

方法二:本地安装

# 克隆项目
git clone <repository-url>
cd vkey-calculator-mcp

# 安装项目
pip install -e .

# 运行
python -m vkey_calculator_kel

MCP 配置

在你的 MCP 客户端配置文件中添加以下配置:

{
  "mcpServers": {
    "vkey_calculator_kel": {
      "command": "uvx",
      "args": [
        "vkey_calculator_kel@latest"
      ]
    }
  }
}

可用的计算工具

基础算术

  • add(a, b) - 加法运算
  • subtract(a, b) - 减法运算
  • multiply(a, b) - 乘法运算
  • divide(a, b) - 除法运算(自动检查除零)

高级数学

  • power(base, exponent) - 幂运算
  • sqrt(number) - 平方根计算
  • factorial(n) - 阶乘计算

开发

项目结构

vkey-calculator-mcp/
├── src/
│   └── vkey_calculator_kel/
│       ├── __init__.py      # 主入口
│       ├── __main__.py      # 模块入口
│       └── server.py        # MCP 服务器实现
├── pyproject.toml           # 项目配置
└── README.md               # 项目说明

构建

# 构建包
uv run -m build

# 安装开发版本
pip install -e .

许可证

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vkey_calculator_kel-0.1.5.tar.gz (35.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vkey_calculator_kel-0.1.5-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file vkey_calculator_kel-0.1.5.tar.gz.

File metadata

  • Download URL: vkey_calculator_kel-0.1.5.tar.gz
  • Upload date:
  • Size: 35.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for vkey_calculator_kel-0.1.5.tar.gz
Algorithm Hash digest
SHA256 e9a9676a59a0d3b28d4d8f352235bd8ad44a87115839907cb34fdf18ff5a7b26
MD5 b769c396f95597ab6599155ce3250a7d
BLAKE2b-256 4759a56fd4e2f7a412cce5ca7e0cc5e19d18451828420387b341029f67292938

See more details on using hashes here.

File details

Details for the file vkey_calculator_kel-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for vkey_calculator_kel-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 8ec477fb55e94c4c5ed244a2fa5aa223a6f63214ef2465b75eedf91c0053bb31
MD5 f02396104a36af0fe76989ce7b94ba63
BLAKE2b-256 1daeb46f90f1dc66f71db1c5261699c3934f169fc267246a6c8d07a1b7f01804

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page