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.3.tar.gz
(35.6 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.3.tar.gz.
File metadata
- Download URL: vkey_calculator_mcp-0.1.3.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8741dbb4bebb592617211c5cfdccaeab504a4518aa810303ef0581888e7d5aa1
|
|
| MD5 |
6e3cd16ad7322ac21e2d0d8ac0023fdd
|
|
| BLAKE2b-256 |
6a435864ca3d491afc668fb39450bf1714c2bb0cbb7e8508cf9ebd1929ceef91
|
File details
Details for the file vkey_calculator_mcp-0.1.3-py3-none-any.whl.
File metadata
- Download URL: vkey_calculator_mcp-0.1.3-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0dada48a67902754d0e48ace3637b009731ddd46f8f05d5a3e7ddcd2fe4efb82
|
|
| MD5 |
74db6b03a626a4aaa81b9f33524c1b76
|
|
| BLAKE2b-256 |
6cbc62a90640dcf44e5c70a2addff585a0d23c233714c8c0e12618b5f1290db5
|