Skip to main content
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" }
  }'
{
  "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" }
  ]
}
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

url
string
required
MCP server endpoint URL.Example: https://mcp.example.com/sse
transport_type
string
default:"sse"
Transport protocol.Supported values:
  • sse — Server-Sent Events
  • http — Streamable HTTP
auth_headers
object | array
Authentication headers. Accepts either an object ({ "Authorization": "Bearer ..." }) or an array of key/value pairs ([{ "key": "Authorization", "value": "Bearer ..." }]).
initialization_options
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" }
  }'
{
  "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" }
  ]
}

How It Works

  1. Validates the request body (url is required and must be a valid URL).
  2. Opens the transport — SSE or Streamable HTTP — using any auth_headers provided.
  3. Runs the MCP initialize handshake and calls listTools.
  4. 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

messageCauseSolution
Invalid URLMalformed urlProvide a full URL including scheme (https://)
Connection failedServer unreachable or rejected the handshakeVerify the URL, transport type, and auth headers
Auth-related error from serverMissing/invalid credentialsCheck auth_headers match what the MCP server expects