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.1.tar.gz (22.8 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.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ddnet_mcpserver-0.1.1.tar.gz
  • Upload date:
  • Size: 22.8 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.1.tar.gz
Algorithm Hash digest
SHA256 1cc4637ce7e92b9394784cceb60424cc604fe31e632cc93cf5d42e68b5e9e9a4
MD5 0b7349503e96c37e6dfb6fc42406d0dd
BLAKE2b-256 76f9b394da1a9c75ef187f622c542e50c700baba522209d7f4f5b0eca7783781

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ddnet_mcpserver-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 13ce84a50e2df12e28e5482d4b15353bc78ef146f673fee78465f19ef4b62a49
MD5 d37eb2748d0727ac1bb8ac6e6678eda7
BLAKE2b-256 bb3baa399748c3e4e09ee15853f39592ebfc775d2d280b5892fef69bfebf8800

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