M
MCP Tester
by @bai-tec
美观直观的MCP服务器探索与测试工具。连接MCP服务器,发现工具,查看参数,执行调用并实时预览响应,是MCP开发调试必备利器。
Created 5/28/2026
Updated about 4 hours ago
README
Repository documentation and setup instructions
MCP Tester - MCP 验证工具
一个简单易用的 MCP (Model Context Protocol) 服务器测试和验证工具。
✨ 功能特性
- 🔌 快速连接 - 一键连接任意 MCP 服务器
- 📋 工具浏览 - 自动获取并展示所有可用工具
- ⚙️ 参数配置 - 动态生成参数输入表单,带详细说明
- 🚀 工具调用 - 发送请求并查看实时响应
- 🎨 美观界面 - 现代化深色主题 UI
- 📱 响应式设计 - 支持桌面和移动端
🚀 快速开始
1. 安装依赖
pip install -r requirements.txt
2. 启动服务
python main.py
3. 打开浏览器
访问 http://localhost:8000
📖 使用说明
连接 MCP 服务器
- 输入服务器名称(任意名称,用于标识)
- 输入 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 # 项目说明
🔧 配置示例
测试魔塔社区 MCP
{
"mcpServers": {
"12306-mcp": {
"type": "streamable_http",
"url": "https://mcp.api-inference.modelscope.net/xxx/mcp"
}
}
}
测试本地 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 服务器,不建议在生产环境中使用。
Quick Setup
Installation guide for this server
Installation Command (package not published)
git clone https://github.com/bai-tec/MCP-Tester
Manual Installation: Please check the README for detailed setup instructions and any additional dependencies required.
Cursor configuration (mcp.json)
{
"mcpServers": {
"bai-tec-mcp-tester": {
"command": "git",
"args": [
"clone",
"https://github.com/bai-tec/MCP-Tester"
]
}
}
}