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-mcp-calculator@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.2.tar.gz (55.5 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.2-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vkey_calculator_mcp-0.1.2.tar.gz
  • Upload date:
  • Size: 55.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for vkey_calculator_mcp-0.1.2.tar.gz
Algorithm Hash digest
SHA256 c786b8932782e7ce58e2e55163c98281e1b59c2841abacb50ca00cef4127f75e
MD5 cfdaa9114ff5154e2bfd82ef4f83d76d
BLAKE2b-256 1feba423a181ceab9a14913da3313640bf4b108cc8bee4ecc4a48d6680326187

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vkey_calculator_mcp-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 445fa8f6343498375637a4d6687bb6cd786064eaa9eb347cca855ed0fad677c7
MD5 7912e03320cfb035e672dba4372d3c25
BLAKE2b-256 20eadc14e84454793777ffce590e84785335e05b9939c9c0bf0ebe32face7c00

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