curl -X POST https://api.example.com/api/mcp/connect \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"id": "mcp_abc123"
}'
const response = await fetch('https://api.example.com/api/mcp/connect', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
id: 'mcp_abc123'
})
});
const data = await response.json();
import requests
response = requests.post(
'https://api.example.com/api/mcp/connect',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
json={'id': 'mcp_abc123'}
)
data = response.json()
{
"success": true,
"message": "Connected successfully",
"capabilities": {
"tools": true,
"resources": true,
"prompts": true,
"experimental": {}
}
}
{
"success": false,
"message": "Connection failed: timeout"
}
{
"success": false,
"message": "Server not found"
}
Connection
Connect to MCP Server
Establishes connection to an MCP server and retrieves capabilities
POST
/
api
/
mcp
/
connect
curl -X POST https://api.example.com/api/mcp/connect \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"id": "mcp_abc123"
}'
const response = await fetch('https://api.example.com/api/mcp/connect', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
id: 'mcp_abc123'
})
});
const data = await response.json();
import requests
response = requests.post(
'https://api.example.com/api/mcp/connect',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
json={'id': 'mcp_abc123'}
)
data = response.json()
{
"success": true,
"message": "Connected successfully",
"capabilities": {
"tools": true,
"resources": true,
"prompts": true,
"experimental": {}
}
}
{
"success": false,
"message": "Connection failed: timeout"
}
{
"success": false,
"message": "Server not found"
}
Request Body
string
required
MCP server ID to connect
Response
boolean
Whether the connection was successful
string
Status message
object
Server capabilities including available tools, resources, and prompts
curl -X POST https://api.example.com/api/mcp/connect \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"id": "mcp_abc123"
}'
const response = await fetch('https://api.example.com/api/mcp/connect', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
id: 'mcp_abc123'
})
});
const data = await response.json();
import requests
response = requests.post(
'https://api.example.com/api/mcp/connect',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
json={'id': 'mcp_abc123'}
)
data = response.json()
{
"success": true,
"message": "Connected successfully",
"capabilities": {
"tools": true,
"resources": true,
"prompts": true,
"experimental": {}
}
}
{
"success": false,
"message": "Connection failed: timeout"
}
{
"success": false,
"message": "Server not found"
}
⌘I

