Epic-MCP-Hub: MCP server 本地测试桥接器
🚀 专为 MCP 服务开发者设计的轻量级本地测试工具
仅用于本地测试MCP Server,请勿用于生产环境
本工具可以将本地 MCP Server 自动统一映射为FastAPI 接口,请勿将本工具用于生产环境 开发此项目,是因为最初没有找到一个MCP的Hub工具,但是后续发现目前已有多个 MCP-Hub类型工具
1. Usage
1.1 create config,json file
- 以下为一个示例
[
// MCP Server 1
{
"type": "function",
"function": {
"name": "get_weather",
"description": "获取天气信息,参数为城市名称的拼音,如 shanghai。",
"parameters": {
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "需要查询天气的城市名称拼音,如 shanghai"
},
"unit": {
"type": "string",
"description": "温度单位",
"enum": [
"celsius",
"fahrenheit"
]
}
},
"required": [
"city"
]
}
},
"extra": {
"alive": true,
"auto_start": false,
"command": "python",
"args": [
"/home/ubuntu/weather.py"
]
}
},
// MCP Server 2
{
...
}
]- 每个 MCP Server 的配置为一个json数据,多个 MCP Server 使用
,分隔,在config.json文件中组成一个list
1.2 start emh
# a:
# 可以直接使用 emh 命令启动
# emh 将从当前工作路径读取 config.json 文件
emh
# b:
# 可以通过设置启动参数更详细地控制 emh 的启动
emh --host 127.0.0.1 --port 9000 --reload true --config /home/ubuntu/config.json2. 暴露接口
/docs: API documentation
/info: list all tool configuration information
/config_err: expose configuration validation errors
/list_tool: expose the list of available tool names
3. ToDo
- [ ] sse 支持
- [ ] UI页面(后期)
