一个简单易用的 MCP (Model Context Protocol) 服务器测试和验证工具。

- 🔌 快速连接 - 一键连接任意 MCP 服务器
- 📋 工具浏览 - 自动获取并展示所有可用工具
- ⚙️ 参数配置 - 动态生成参数输入表单,带详细说明
- 🚀 工具调用 - 发送请求并查看实时响应
- 🎨 美观界面 - 现代化深色主题 UI
- 📱 响应式设计 - 支持桌面和移动端
pip install -r requirements.txtpython main.py访问 http://localhost:8000
- 输入服务器名称(任意名称,用于标识)
- 输入 MCP 服务器 URL
- 点击"连接并获取工具"
- 连接成功后,所有可用工具会以卡片形式展示
- 点击任意工具卡片查看详情
- 选择工具后,查看参数说明
- 在 JSON 编辑器中填写参数
- 点击"调用工具"
- 查看响应结果
- 后端: FastAPI + Python
- MCP 客户端: langchain-mcp-adapters + modelcontextprotocol
- 前端: 原生 HTML/CSS/JavaScript
mcp-tester-python/
├── main.py # FastAPI 后端主文件
├── requirements.txt # Python 依赖
├── static/
│ └── index.html # 前端界面
├── test_connection.py # 连接测试脚本
├── test_tool_call.py # 工具调用测试脚本
└── README.md # 项目说明
{
"mcpServers": {
"12306-mcp": {
"type": "streamable_http",
"url": "https://mcp.api-inference.modelscope.net/xxx/mcp"
}
}
}{
"mcpServers": {
"local-mcp": {
"type": "streamable_http",
"url": "http://127.0.0.1:8000/mcp"
}
}
}# 测试连接
python test_connection.py
# 测试工具调用
python test_tool_call.py欢迎提交 Issue 和 Pull Request!
MIT License
注意: 此工具仅用于开发和测试 MCP 服务器,不建议在生产环境中使用。