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_mcp-0.1.4.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_mcp-0.1.4-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file vkey_calculator_mcp-0.1.4.tar.gz.

File metadata

  • Download URL: vkey_calculator_mcp-0.1.4.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_mcp-0.1.4.tar.gz
Algorithm Hash digest
SHA256 a7387b9d364a3eba766acc517b5b5893667994baafe07e5eb95136eecc9d308f
MD5 d98ec36b9cde933eb5b9dcba3bbaecda
BLAKE2b-256 8e694266daffe0e6b223c31c1bc963f37d95ebc30306db3fe92ff6237df1a485

See more details on using hashes here.

File details

Details for the file vkey_calculator_mcp-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for vkey_calculator_mcp-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d92bb71399267c4728eea205fed1bdf631aa230ddbc3a434b467199e81062b2f
MD5 d27e2433f851f305b67e28abd002c994
BLAKE2b-256 4cece1471d839988b97fd22d766ff4048646948e1994c9cb59220dee998c461a

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