Detect MCP connection¶
Probes the MCP service and returns discoverable tools; probing does not save connections.
POST https://moi.matrixorigin.cn/newmoi/workspaces/{workspace_id}/connections/actions/probe-mcp
Before you call¶
The example below uses:
$AI_STUDIO_API_KEY: The actual personal access token, passed through theX-API-KeyHeader.$WORKSPACE_ID: Target workspace ID, passed throughX-Workspace-IDHeader.
Request example¶
curl -X POST "https://moi.matrixorigin.cn/newmoi/workspaces/$WORKSPACE_ID/connections/actions/probe-mcp" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"endpoint_uri": "https://mcp.example.com",
"transport": "http-streaming"
}'
Request body¶
Parameters |
Type |
Is it required |
Description |
|---|---|---|---|
|
string |
No |
MCP service address to probe. Required if |
|
string |
No |
The saved connection ID. Required if |
|
string |
No |
Authentication type. |
|
string |
No |
The request header name used by API Key. |
|
object |
No |
Credentials to use when probing, can contain |
|
string |
No |
MCP transmission method: |
Successful response¶
Returns 200 and the found tool on success.
{"code":0,"data":{"tools":[]}}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
integer |
The number of tools found. |
|
array |
Tools returned by MCP service. |
|
string |
MCP protocol version; will not be returned if not provided. |
Error response¶
{"code":2,"message":"invalid request body"}