curl -X POST https://api.telzino.com/v1/mcp/test-connection \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"url": "https://mcp.example.com/sse",
"transport_type": "sse",
"auth_headers": { "Authorization": "Bearer mcp-server-key" }
}'
const response = await fetch('https://api.telzino.com/v1/mcp/test-connection', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://mcp.example.com/sse',
transport_type: 'sse',
auth_headers: { Authorization: 'Bearer mcp-server-key' }
})
});
const result = await response.json();
import requests
response = requests.post(
'https://api.telzino.com/v1/mcp/test-connection',
headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'},
json={
'url': 'https://mcp.example.com/sse',
'transport_type': 'sse',
'auth_headers': {'Authorization': 'Bearer mcp-server-key'}
}
)
result = response.json()
{
"success": true,
"message": "Success! Found 3 tools.",
"toolCount": 3,
"tools": [
{ "name": "search_kb", "description": "Search the knowledge base" },
{ "name": "create_ticket", "description": "Open a support ticket" },
{ "name": "get_order", "description": "Look up an order by id" }
]
}
{
"success": false,
"message": "Connection failed"
}
{
"error": "Invalid request data",
"details": [
{
"code": "invalid_string",
"path": ["url"],
"message": "Invalid MCP server URL"
}
]
}
MCP
Test MCP Connection
Validate an MCP server configuration and list its tools, without assigning it to an agent
POST
/
v1
/
mcp
/
test-connection
curl -X POST https://api.telzino.com/v1/mcp/test-connection \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"url": "https://mcp.example.com/sse",
"transport_type": "sse",
"auth_headers": { "Authorization": "Bearer mcp-server-key" }
}'
const response = await fetch('https://api.telzino.com/v1/mcp/test-connection', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://mcp.example.com/sse',
transport_type: 'sse',
auth_headers: { Authorization: 'Bearer mcp-server-key' }
})
});
const result = await response.json();
import requests
response = requests.post(
'https://api.telzino.com/v1/mcp/test-connection',
headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'},
json={
'url': 'https://mcp.example.com/sse',
'transport_type': 'sse',
'auth_headers': {'Authorization': 'Bearer mcp-server-key'}
}
)
result = response.json()
{
"success": true,
"message": "Success! Found 3 tools.",
"toolCount": 3,
"tools": [
{ "name": "search_kb", "description": "Search the knowledge base" },
{ "name": "create_ticket", "description": "Open a support ticket" },
{ "name": "get_order", "description": "Look up an order by id" }
]
}
{
"success": false,
"message": "Connection failed"
}
{
"error": "Invalid request data",
"details": [
{
"code": "invalid_string",
"path": ["url"],
"message": "Invalid MCP server URL"
}
]
}
Performs the same validation as the Test Connection button in the dashboard’s MCP Servers section: it opens the transport, runs the MCP initialize handshake, and lists the server’s tools. Nothing is created or stored — use it to verify a configuration before assigning it to an agent.
A failed connection is a normal result, not an error: the response is
200 with success: false and a message. Only a malformed request returns 400.Request Body
string
required
MCP server endpoint URL.Example:
https://mcp.example.com/ssestring
default:"sse"
Transport protocol.Supported values:
sse— Server-Sent Eventshttp— Streamable HTTP
object | array
Authentication headers. Accepts either an object (
{ "Authorization": "Bearer ..." }) or an array of key/value pairs ([{ "key": "Authorization", "value": "Bearer ..." }]).object
Optional MCP initialization options. Accepted and stored for parity with the dashboard; not currently exercised during the handshake.
curl -X POST https://api.telzino.com/v1/mcp/test-connection \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"url": "https://mcp.example.com/sse",
"transport_type": "sse",
"auth_headers": { "Authorization": "Bearer mcp-server-key" }
}'
const response = await fetch('https://api.telzino.com/v1/mcp/test-connection', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://mcp.example.com/sse',
transport_type: 'sse',
auth_headers: { Authorization: 'Bearer mcp-server-key' }
})
});
const result = await response.json();
import requests
response = requests.post(
'https://api.telzino.com/v1/mcp/test-connection',
headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'},
json={
'url': 'https://mcp.example.com/sse',
'transport_type': 'sse',
'auth_headers': {'Authorization': 'Bearer mcp-server-key'}
}
)
result = response.json()
{
"success": true,
"message": "Success! Found 3 tools.",
"toolCount": 3,
"tools": [
{ "name": "search_kb", "description": "Search the knowledge base" },
{ "name": "create_ticket", "description": "Open a support ticket" },
{ "name": "get_order", "description": "Look up an order by id" }
]
}
{
"success": false,
"message": "Connection failed"
}
{
"error": "Invalid request data",
"details": [
{
"code": "invalid_string",
"path": ["url"],
"message": "Invalid MCP server URL"
}
]
}
How It Works
- Validates the request body (
urlis required and must be a valid URL). - Opens the transport — SSE or Streamable HTTP — using any
auth_headersprovided. - Runs the MCP initialize handshake and calls
listTools. - Returns the connection status, tool count, and the tool list (
name+description).
To make a tested connection show as Connected on an agent, simply create or update the agent with the MCP server — the API automatically re-tests each MCP server on save. See Create Agent.
Troubleshooting
message | Cause | Solution |
|---|---|---|
Invalid URL | Malformed url | Provide a full URL including scheme (https://) |
Connection failed | Server unreachable or rejected the handshake | Verify the URL, transport type, and auth headers |
| Auth-related error from server | Missing/invalid credentials | Check auth_headers match what the MCP server expects |
