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"
]
}
}
}
可用的计算工具
基础算术
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.1.tar.gz
(54.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vkey_calculator_mcp-0.1.1.tar.gz.
File metadata
- Download URL: vkey_calculator_mcp-0.1.1.tar.gz
- Upload date:
- Size: 54.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6eb64e959d8aebcae7089659af14441ccd74c923a2bd4e2c531a0eff025bc5fd
|
|
| MD5 |
30f341894ba891d46420a96994d03e52
|
|
| BLAKE2b-256 |
e6b91cc388af8db28a5080dcc6f54793617f6902d1d4a6407a487d798e1ac9a5
|
File details
Details for the file vkey_calculator_mcp-0.1.1-py3-none-any.whl.
File metadata
- Download URL: vkey_calculator_mcp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c3901233ed5bbbe08dc8caf12104f616bd575f5f3db83053a6ca35b591a41ba
|
|
| MD5 |
85828ef296021431f515176fe616e1f3
|
|
| BLAKE2b-256 |
35a377d39a0c49b8a088e89721b59dbd87d58f20b65c41fbbf0028a6de1176b6
|