Skip to main content
POST
/
api
/
v1
/
mcp
/
verify
Verify MCP connection
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    name: '<string>',
    serverUrl: '<string>',
    authentication: {apiKey: '<string>', headerName: '<string>'},
    customHeaders: {},
    isEnabled: true,
    description: null,
    transport: 'SSE',
    blackListTools: null,
    whiteListTools: null
  })
};

fetch('https://blackbox.dasha.ai/api/v1/mcp/verify', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "success": true,
  "availableTools": [
    {
      "name": "<string>",
      "description": "<string>",
      "schema": {},
      "isEnabled": true
    }
  ],
  "testedAt": "2023-11-07T05:31:56Z",
  "responseTimeMs": 123,
  "message": "<string>"
}

Model Context Protocol (MCP)

MCP enables agents to connect to external services and data sources through a standardized protocol. Verify connections before configuring them on agents to ensure proper connectivity and tool discovery.

Verification Process

The verification:
  1. Tests connectivity to the MCP server
  2. Discovers available tools and resources
  3. Returns connection status and available capabilities

Use Cases

  • Test MCP server configuration before adding to an agent
  • Discover what tools an MCP server provides
  • Troubleshoot MCP connection issues

Body

MCP connection configuration

Model Context Protocol connection configuration for integrating external services with the agent. Defines how to connect to an MCP server including server URL, authentication, transport protocol, custom headers, and tool filtering.

name
string
required

Display name for this MCP connection. Used to identify the connection in logs and configuration.

Minimum string length: 1
serverUrl
string<uri>
required

MCP server URL to connect to. The URL format depends on the transport protocol (SSE uses HTTP/HTTPS endpoints, StreamableHTTP uses HTTP endpoints).

authentication
object

Authentication configuration for the MCP server. Supported types include none, API key, bearer token, and custom authentication schemes.

customHeaders
object

Custom HTTP headers to include with each request to the MCP server. Useful for passing additional metadata or configuration to the server.

isEnabled
boolean | null
default:true

Whether this MCP connection is enabled. When disabled, the agent will not connect to this MCP server or use its tools.

description
string | null

Optional description explaining the purpose of this MCP connection or what services it provides.

transport
enum<string>
default:SSE

Transport protocol for MCP communication. Supported values are SSE (Server-Sent Events for persistent connections) and StreamableHTTP (for request-response patterns).

Available options:
SSE,
StreamableHTTP
blackListTools
string[] | null

List of tool names to exclude from this MCP connection. Tools in this list will not be available to the agent even if the MCP server provides them. Useful for restricting access to specific tools.

whiteListTools
string[] | null

List of tool names to allow from this MCP connection. When specified, only tools in this list will be available to the agent. If not specified, all tools from the server are available (subject to BlackListTools).

Response

Connection test completed successfully (check success field in response)

Results from testing a Model Context Protocol (MCP) server connection. Contains connection status, discovered tools, and performance metrics. Use this to verify MCP server connectivity and discover available capabilities before configuring agents.

success
boolean
required

Whether the connection test succeeded. When true, the MCP server was reachable, responded correctly, and tool discovery completed. When false, check the Message field for error details.

availableTools
object[]
required

Tools discovered on the MCP server during the connection test. Each tool represents a capability that agents can use when this MCP connection is configured. Empty list when the connection failed or the server provides no tools.

testedAt
string<date-time>
required

Timestamp when the connection test was performed.

responseTimeMs
number<double>
required

Response time in milliseconds for the connection test. Indicates server responsiveness and network latency. Useful for evaluating performance before production use.

message
string | null

Human-readable message describing the test result. Contains error details when Success is false, or a confirmation message when the connection test succeeded.