MCP计算器服务
这是一个基于MCP(Model Control Protocol)的简单计算器服务,提供基本的数学运算功能。
功能特性
- 加法运算
- 减法运算
- 乘法运算
- 除法运算(包含除零检查)
安装
pip install mcp-server-jisuanqi
使用方法
- 启动服务:
# 激活虚拟环境(如果使用)
source .venv/bin/activate
# 运行服务
python -m mcp_server_jisuanqi
- 使用MCP客户端调用:
from mcp.client import Client
client = Client()
# 加法运算
result = client.jisuanqi.mcp_jisuanqi_add(a=5, b=3) # 返回 8
# 减法运算
result = client.jisuanqi.mcp_jisuanqi_subtract(a=10, b=4) # 返回 6
# 乘法运算
result = client.jisuanqi.mcp_jisuanqi_multiply(a=6, b=7) # 返回 42
# 除法运算
result = client.jisuanqi.mcp_jisuanqi_divide(a=15, b=3) # 返回 5
开发环境设置
- 克隆仓库:
git clone https://github.com/yourusername/mcp-server-jisuanqi.git
cd mcp-server-jisuanqi
- 创建并激活虚拟环境:
python -m venv .venv
source .venv/bin/activate # Linux/Mac
# 或
.venv\Scripts\activate # Windows
- 安装依赖:
pip install -e ".[dev]"
许可证
MIT License
Metadata
Release files for mcp-server-jisuanqi 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mcp_server_jisuanqi-0.1.2.tar.gz | 16.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcp_server_jisuanqi-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.3 kB
Release files / mcp_server_jisuanqi-0.1.2.tar.gz
| Download URL | mcp_server_jisuanqi-0.1.2.tar.gz |
|---|---|
| Size | 16.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c01d9ea86741cc8eeb6303cf65c1db4fc4386837ec3bcd5c18b00232686c7396
|
|
BLAKE2b-256 checksum How to use checksums |
2774895ed8071bb56b28cfdfcb9a33666a359097f1ab1aaddf3266105e50d132
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.13
|
Release files / mcp_server_jisuanqi-0.1.2-py3-none-any.whl
| Download URL | mcp_server_jisuanqi-0.1.2-py3-none-any.whl |
|---|---|
| Size | 2.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
66321a0d5f52ec964551dba3d20cab930bfe35ed82f39bd9d568a12ca0f0c8b4
|
|
BLAKE2b-256 checksum How to use checksums |
06007ee69ad22124d1cde32310e54a46aa6b0f4531c9aef07587efbd655327c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.13
|
Security for mcp-server-jisuanqi 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.