使用说明
MCP回声服务器
一个简单的模型上下文协议(MCP)服务器,按原样回显输入。
安装
使用pip:
pip install -e .
使用紫外线:
uv pip install -e .
用法
直接运行
python src/echo_server.py
与Claude Desktop一起使用
添加到您的Claude Desktop配置中:
{
"mcpServers": {
"echo-server": {
"command": "python",
"args": ["/path/to/mcp-sample/src/echo_server.py"]
}
}
}
可用工具
echo(message: str) -> str:原封不动地返回输入消息
项目结构
mcp-sample/
├── src/
│ └── echo_server.py # Main server implementation
├── examples/ # Example servers (optional)
├── pyproject.toml # Package configuration
└── README.md # This file
