Skip to main content

一个简单的MCP服务器,提供echo功能:输入什么就返回什么

Project description

Echo MCP Server

PyPI version Python Version License: MIT

一个简单的MCP (Model Context Protocol) 服务器,提供echo功能:输入什么就返回什么。

项目信息

功能特性

  • echo工具: 接收一个消息参数,并原样返回该消息
  • 简单易用,适合测试MCP连接
  • 支持命令行直接运行

安装

使用 uvx(推荐,无需安装)

使用 uvuvx 命令可以直接运行,无需安装:

uvx mcp-echo

从 PyPI 安装

pip install mcp-echo

从源码安装

git clone https://github.com/BACH-AI-Tools/mcp-echo.git
cd mcp-echo
pip install -e .

使用方法

命令行运行

安装后,可以直接使用命令行启动服务器:

mcp-echo

在 Cherry Studio 中使用

  1. 打开 Cherry Studio
  2. 进入设置 -> MCP服务器配置
  3. 添加新的MCP服务器配置:

方式一:使用 uvx(推荐,无需安装)

{
  "mcpServers": {
    "echo": {
      "command": "uvx",
      "args": ["mcp-echo"]
    }
  }
}

方式二:使用已安装的命令

{
  "mcpServers": {
    "echo": {
      "command": "mcp-echo"
    }
  }
}

方式三:使用Python模块

{
  "mcpServers": {
    "echo": {
      "command": "python",
      "args": ["-m", "mcp_echo.server"]
    }
  }
}

在 Claude Desktop 中使用

编辑配置文件:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

使用 uvx(推荐,无需安装):

{
  "mcpServers": {
    "echo": {
      "command": "uvx",
      "args": ["mcp-echo"]
    }
  }
}

使用已安装的命令:

{
  "mcpServers": {
    "echo": {
      "command": "mcp-echo"
    }
  }
}

使用示例

在支持MCP的AI助手中,你可以这样使用echo工具:

  • "请使用echo工具返回'Hello World'"
  • "用echo工具测试一下:这是一条测试消息"

工具说明

echo

  • 描述: 输入什么就返回什么
  • 参数:
    • message (string, 必需): 要回显的消息内容
  • 返回: 回显的消息文本,格式为 "Echo: {message}"

开发

克隆仓库

git clone https://github.com/BACH-AI-Tools/mcp-echo.git
cd mcp-echo

安装开发依赖

pip install -e .

本地测试

python -m mcp_echo.server

构建包

python -m build

技术栈

  • Python 3.10+
  • MCP SDK (mcp>=0.9.0)

许可证

MIT License - 详见 LICENSE 文件

贡献

欢迎提交 Issue 和 Pull Request!

联系方式


Made with ❤️ by Bach Studio

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

mcp_echo-0.1.1.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

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

mcp_echo-0.1.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mcp_echo-0.1.1.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for mcp_echo-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a1a6f87b231d6430c17a36de28cdfe0e4266c9b1e1d6b2452006a2590310911e
MD5 a2aa0a9c5633ce346d096a56dc170cd7
BLAKE2b-256 f8cd50a2de5a043be9cb9f60cdc61501cf7b9bc541f1e02ab9c68853f7c5fc33

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mcp_echo-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for mcp_echo-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ca40c715fb157ebb1bef4367f67bcbe3d0e40b656c98e90952b476618902bc2a
MD5 89ee3745f82a70f20c058ab80ac130b4
BLAKE2b-256 e5b537c20c012a867a90a7bc264025f3f086218b7ff06b69a16e24106e48ad87

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