> ## Documentation Index
> Fetch the complete documentation index at: https://blackbox.dasha.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Verify MCP connection

> Verifies a Model Context Protocol (MCP) connection and discovers available tools.
Use this endpoint to test MCP server connectivity before configuring an agent.

## 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


## OpenAPI

````yaml https://blackbox.dasha.ai/swagger/v1/swagger.json post /api/v1/mcp/verify
openapi: 3.0.4
info:
  title: Dasha BlackBox Agent API
  description: API for managing AI agents and calls
  contact:
    name: DashaAI Team
    email: support@dasha.ai
  version: v1
servers:
  - url: https://blackbox.dasha.ai
    description: Dasha BlackBox Agent API
security:
  - ApiKey: []
  - OAuth: []
tags:
  - name: ActivityLogs
  - name: Agents
  - name: AgentTestCases
  - name: CallResults
  - name: Calls
  - name: Chats
  - name: Copilot
  - name: CustomerData
  - name: Mcp
  - name: Media
  - name: Misc
  - name: PronunciationDictionaries
  - name: Providers
  - name: SipAliases
  - name: SipCredentials
  - name: SipPhoneNumbers
  - name: TextChat
  - name: TwilioProvider
  - name: Voice
  - name: WebhookTest
  - name: WebIntegrations
  - name: WebSocket
    description: WebSocket endpoints for real-time communication
paths:
  /api/v1/mcp/verify:
    post:
      tags:
        - Mcp
      summary: Verify MCP connection
      description: >-
        Verifies a Model Context Protocol (MCP) connection and discovers
        available tools.

        Use this endpoint to test MCP server connectivity before configuring an
        agent.
      requestBody:
        description: MCP connection configuration
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/McpConnection'
              description: >-
                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.
          text/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/McpConnection'
              description: >-
                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.
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/McpConnection'
              description: >-
                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.
      responses:
        '200':
          description: >-
            Connection test completed successfully (check success field in
            response)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/McpConnectionTestResponseDto'
        '400':
          description: Invalid MCP connection configuration or validation errors
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Authentication failed or API key is missing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Organization not authorized for MCP connections
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: Server error occurred during connection test
components:
  schemas:
    McpConnection:
      required:
        - name
        - serverUrl
      type: object
      properties:
        name:
          minLength: 1
          type: string
          description: >-
            Display name for this MCP connection. Used to identify the
            connection in logs and configuration.
        serverUrl:
          type: string
          description: >-
            MCP server URL to connect to. The URL format depends on the
            transport protocol (SSE uses HTTP/HTTPS endpoints, StreamableHTTP
            uses HTTP endpoints).
          format: uri
        authentication:
          oneOf:
            - $ref: '#/components/schemas/ApiKeyAuthentication'
            - $ref: '#/components/schemas/BearerAuthentication'
            - $ref: '#/components/schemas/NoAuthentication'
          description: >-
            Authentication configuration for the MCP server. Supported types
            include none, API key, bearer token, and custom authentication
            schemes.
          default: null
          nullable: true
        customHeaders:
          type: object
          additionalProperties:
            type: string
          description: >-
            Custom HTTP headers to include with each request to the MCP server.
            Useful for passing additional metadata or configuration to the
            server.
          nullable: true
        isEnabled:
          type: boolean
          description: >-
            Whether this MCP connection is enabled. When disabled, the agent
            will not connect to this MCP server or use its tools.
          default: true
          nullable: true
        description:
          type: string
          description: >-
            Optional description explaining the purpose of this MCP connection
            or what services it provides.
          default: null
          nullable: true
        transport:
          allOf:
            - $ref: '#/components/schemas/McpConnectionTransport'
          description: >-
            Transport protocol for MCP communication. Supported values are SSE
            (Server-Sent Events for persistent connections) and StreamableHTTP
            (for request-response patterns).
          default: SSE
          nullable: true
        blackListTools:
          type: array
          items:
            type: string
          description: >-
            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.
          default: null
          nullable: true
        whiteListTools:
          type: array
          items:
            type: string
          description: >-
            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).
          default: null
          nullable: true
      additionalProperties: false
      description: >-
        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.
    McpConnectionTestResponseDto:
      required:
        - availableTools
        - responseTimeMs
        - success
        - testedAt
      type: object
      properties:
        success:
          type: boolean
          description: >-
            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.
        message:
          type: string
          description: >-
            Human-readable message describing the test result. Contains error
            details when Success is false, or a confirmation message when the
            connection test succeeded.
          nullable: true
        availableTools:
          type: array
          items:
            $ref: '#/components/schemas/McpToolDto'
          description: >-
            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:
          type: string
          description: Timestamp when the connection test was performed.
          format: date-time
        responseTimeMs:
          type: number
          description: >-
            Response time in milliseconds for the connection test. Indicates
            server responsiveness and network latency. Useful for evaluating
            performance before production use.
          format: double
      additionalProperties: false
      description: >-
        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.
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
    ApiKeyAuthentication:
      allOf:
        - $ref: '#/components/schemas/McpAuthenticationBase'
        - required:
            - apiKey
            - type
          type: object
          properties:
            type:
              minLength: 1
              enum:
                - apiKey
              type: string
              description: Authentication type. Always "apiKey" for API key authentication.
              readOnly: true
            apiKey:
              minLength: 1
              type: string
              description: >-
                API key value to send with requests. This is the secret key
                provided by the MCP server.
            headerName:
              type: string
              description: >-
                HTTP header name for the API key. Defaults to "Authorization"
                (the key is sent as the raw value, without a "Bearer" prefix).
                Set a custom header name such as "X-API-Key" if the MCP server
                expects one.
              nullable: true
          additionalProperties: false
      description: >-
        API key authentication for MCP server connections. Sends the raw API key
        (without any scheme prefix) in an HTTP header with each request to the
        MCP server.
    BearerAuthentication:
      allOf:
        - $ref: '#/components/schemas/McpAuthenticationBase'
        - required:
            - token
            - type
          type: object
          properties:
            type:
              minLength: 1
              enum:
                - bearer
              type: string
              description: >-
                Authentication type. Always "bearer" for bearer token
                authentication.
              readOnly: true
            token:
              minLength: 1
              type: string
              description: >-
                Bearer token value without the "Bearer " prefix. The system
                automatically adds the prefix when sending requests. This is the
                OAuth or JWT token provided by the MCP server or authorization
                service.
          additionalProperties: false
      description: >-
        Bearer token authentication for MCP server connections. The system
        automatically adds the "Bearer " prefix and sends the token in the
        Authorization header as "Bearer {token}" with each request to the MCP
        server.
    NoAuthentication:
      allOf:
        - $ref: '#/components/schemas/McpAuthenticationBase'
        - required:
            - type
          type: object
          properties:
            type:
              minLength: 1
              enum:
                - none
              type: string
              description: Authentication type. Always "none" for no authentication.
              readOnly: true
          additionalProperties: false
      description: >-
        No authentication for MCP server connections. Use when the MCP server
        does not require authentication or authentication is handled through
        other means like network access controls.
    McpConnectionTransport:
      enum:
        - SSE
        - StreamableHTTP
      type: string
      description: >-
        Transport protocol used for Model Context Protocol (MCP) server
        communication. Determines how messages are exchanged between the agent
        and the MCP server.
    McpToolDto:
      required:
        - description
        - isEnabled
        - name
        - schema
      type: object
      properties:
        name:
          minLength: 1
          type: string
          description: >-
            Unique name of the tool as defined by the MCP server. Used to
            identify and invoke the tool when agents need to use this capability
            during conversations.
        description:
          minLength: 1
          type: string
          description: >-
            Human-readable description of what the tool does. Helps agents
            understand when and how to use this tool, and may be used by the LLM
            to decide whether to invoke the tool based on conversation context.
        schema:
          type: object
          additionalProperties: {}
          description: >-
            JSON Schema defining the tool's input parameters. Describes the
            structure, types, and validation rules for arguments that must be
            provided when invoking the tool. Used by agents to construct valid
            tool invocation requests.
        isEnabled:
          type: boolean
          description: >-
            Whether this tool is enabled for use by agents. When false, the tool
            is discovered but not available for invocation, allowing selective
            tool access control without reconfiguring the MCP connection.
      additionalProperties: false
      description: >-
        Tool discovered from a Model Context Protocol (MCP) server. Represents a
        capability that agents can invoke through the MCP connection, such as
        database queries, API calls, file operations, or custom business logic
        exposed by the MCP server.
    McpAuthenticationBase:
      type: object
      properties:
        type:
          type: string
          description: >-
            Authentication type identifier. Supported values include "none",
            "apiKey", "bearer", and custom types.
          nullable: true
          readOnly: true
      additionalProperties: false
      description: >-
        Base class for Model Context Protocol authentication methods. Supports
        multiple authentication types including none, API key, bearer token, and
        custom authentication schemes.
  securitySchemes:
    ApiKey:
      type: http
      description: API Key Authentication (Bearer {key})
      scheme: Bearer
    OAuth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://auth.dasha.ai/connect/authorize
          scopes:
            platform_api: Platform API

````