MCP服务接口

支持的方法

GET

介绍

支持将已发布出来的 /iserver/services.json下的所有 REST-地图服务、REST-空间分析服务、REST-数据服务、REST-交通换乘分析服务直接装配成 MCP 服务。
例如:
(1)rest地图服务:/iserver/services/map-China100/rest 装配为 /agentx/services/map-China100/mcp/sse
(2)rest空间分析服务:/iserver/services/spatialanalyst-sample/restjsr 装配为 /agentx/services/spatialanalyst-sample/mcp/sse
(3)rest数据服务:/iserver/services/data-changchun/rest 装配为
/agentx/services/data-changchun/mcp/sse
(4)rest交通换乘服务:/iserver/services/traffictransferanalyst-sample/restjsr 装配为 /agentx/services/traffictransferanalyst-sample/mcp/sse

支持的方法:

  • GET:装配MCP服务。

HTTP 请求方法

GET请求

 /agentx/services/{service-name}/mcp/sse
 

使用说明

mcp接口可通过 @modelcontextprotocol/inspector - npm 来测试调试:
使用 npx -y @modelcontextprotocol/inspector 启动,访问 http://<ip地址>:6274/#tools,填入sse地址,如:http://ip:port/agentx/services/map-China/mcp/sse