MCP API¶
MCP 服务管理 API 参考。
MCP 服务管理¶
列出所有服务¶
响应示例:
{
"services": [
{
"id": 1,
"name": "financial-data",
"description": "金融数据查询服务",
"spider_names": ["eastmoney_stock_quote", "sina_global_news"],
"transport": "streamable-http",
"enabled": true,
"created_at": "2026-02-11T10:00:00"
}
]
}
创建 MCP 服务¶
请求体:
{
"name": "financial-data",
"description": "金融数据查询服务",
"spider_names": ["eastmoney_stock_quote", "eastmoney_market_flow"],
"transport": "streamable-http"
}
获取服务详情¶
获取服务工具提示¶
更新工具提示¶
请求体:
删除服务¶
MCP 端点¶
服务端点¶
创建服务后,可通过以下端点访问:
Claude Desktop 配置¶
{
"mcpServers": {
"omnidata": {
"url": "http://localhost:8380/mcp/financial-data",
"transport": "sse"
}
}
}
传输协议¶
| 协议 | 说明 |
|---|---|
http | 标准 HTTP 请求/响应 |
streamable-http | 支持流式响应 |
sse | Server-Sent Events |