Skip to main content

基于FastMCP的MCP服务器,提供简单的计算和问候功能

Project description

DDNet MCP Server

一个基于FastMCP的Model Context Protocol服务器,提供简单的计算和问候功能。

功能

  • 加法工具:执行两个数字的加法运算
  • 问候资源:根据提供的名称返回个性化的问候语

安装

使用pip安装

pip install ddnet-mcpserver

使用uv安装

uv install ddnet-mcpserver

使用方法

直接运行

作为Python模块运行:

python -m ddnet_mcpserver

在Claude或其他MCP客户端中配置

在您的MCP客户端配置文件中添加以下配置:

{
  "mcpServers": {
    "ddnet": {
      "command": "python",
      "args": ["-m", "ddnet_mcpserver"],
      "env": {},
      "disabled": false
    }
  }
}

如果使用uv:

{
  "mcpServers": {
    "ddnet": {
      "command": "uvx",
      "args": ["ddnet-mcpserver"],
      "env": {},
      "disabled": false
    }
  }
}

可用工具和资源

工具

  • add(a: int, b: int): 将两个数字相加并返回结果

资源

  • greeting://{name}: 返回一个针对指定名称的问候语

开发

设置开发环境

git clone https://github.com/silverhi/ddnet-mcpserver.git
cd ddnet-mcpserver
pip install -e .

运行测试

pytest tests/

许可证

MIT

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

ddnet_mcpserver-0.1.0.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ddnet_mcpserver-0.1.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file ddnet_mcpserver-0.1.0.tar.gz.

File metadata

  • Download URL: ddnet_mcpserver-0.1.0.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for ddnet_mcpserver-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ae86779573cd752bba23d67e3bf77d433fdee6aa748723b1b22a20bb2256ebf3
MD5 6edd788008f7cd48d00662c05e062d25
BLAKE2b-256 f89f0cd4877e273f3762ed2c41f300dfa7ce6fb62ad5f0966ae230d8ef97681d

See more details on using hashes here.

File details

Details for the file ddnet_mcpserver-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ddnet_mcpserver-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 18c3c03b7335c285dc2e9bdf1922e3312bf1f31c8a0a2d3adedc4fa1ebeb3d60
MD5 3103453baf962993ea0c8023e9889531
BLAKE2b-256 c045236a9272ac146ca676c72c42d4b067d2cd8730ca56ad4975476dc8eee7cf

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