探测 MCP 服务¶
接口用途¶
探测 MCP 接口地址是否可用。建议先探测,再批量创建。
请求方式¶
POST
接口地址¶
https://moi.matrixorigin.cn/newmoi/workspaces/<workspace_id>/connections/actions/probe-mcp
身份认证¶
使用工作区 API Key,在请求头中携带 X-API-Key: <WORKSPACE_API_KEY>,并设置 Content-Type: application/json。
路径参数¶
无。
查询参数¶
无。
请求体¶
建议先 probe,再 batch-create。transport 使用 http-streaming(也支持 sse)。
字段 |
类型 |
必填 |
说明 |
|---|---|---|---|
|
string |
条件 |
新 endpoint;与 |
|
string |
条件 |
已有连接 ID |
|
string |
否 |
|
|
string |
否 |
鉴权类型 |
|
string |
否 |
自定义 API Key 头名 |
|
object |
否 |
探测用临时凭据 |
请求示例¶
curl -X POST 'https://moi.matrixorigin.cn/newmoi/workspaces/<workspace_id>/connections/actions/probe-mcp' \
-H 'X-API-Key: <WORKSPACE_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{"endpoint_uri":"https://<mcp_host>/mcp","transport":"http-streaming","auth_type":"bearer_token","credential":{"bearer_token":"<MCP_TOKEN>"}}'
响应说明¶
除 A2A JSON-RPC 外,多数工作区接口成功响应形如 {"code":0,"data":...};下列字段描述 data(或 HTTP 202 时的 data)。
探测结果:
字段 |
类型 |
必填 |
说明 |
|---|---|---|---|
|
integer |
远端工具数量 |
|
|
array |
工具列表(含 name/description/inputSchema 等) |
|
|
string |
协议版本 |
使用限制¶
自定义 MCP 公网接口的鉴权放在 connection bearer credential 中。