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

# Connect MCP client

> Connect to an MCP client



## OpenAPI

````yaml https://api.getcargo.io/openapi.json post /ai/mcpClients/connect
openapi: 3.1.0
info:
  title: Cargo API
  version: 1.0.0
  description: Cargo Platform API v1
servers:
  - url: https://api.getcargo.io/v1
    description: Cargo API
security:
  - bearerAuth: []
paths:
  /ai/mcpClients/connect:
    post:
      tags:
        - AI - MCP
      summary: Connect MCP client
      description: Connect to an MCP client
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                mcpClient:
                  oneOf:
                    - type: object
                      properties:
                        kind:
                          type: string
                          const: custom
                        name:
                          type: string
                        url:
                          type: string
                        authentication:
                          anyOf:
                            - type: object
                              properties:
                                issuedAt:
                                  type: string
                                accessToken:
                                  type: string
                                expiresIn:
                                  type: number
                                refreshToken:
                                  type: string
                                scope:
                                  type: string
                                tokenType:
                                  type: string
                                clientId:
                                  type: string
                                clientSecret:
                                  type: string
                              required:
                                - issuedAt
                                - accessToken
                            - type: 'null'
                        disabledToolSlugs:
                          type: array
                          items:
                            type: string
                      required:
                        - kind
                        - name
                        - url
                        - authentication
                        - disabledToolSlugs
                    - type: object
                      properties:
                        kind:
                          type: string
                          const: connector
                        name:
                          type: string
                        connectorUuid:
                          type: string
                        integrationSlug:
                          type: string
                        disabledToolSlugs:
                          type: array
                          items:
                            type: string
                      required:
                        - kind
                        - name
                        - connectorUuid
                        - integrationSlug
                        - disabledToolSlugs
                  title: MCP client
                  description: MCP client connection details.
                  type: object
              required:
                - mcpClient
              additionalProperties: false
              title: Request body
              description: Request body schema.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  outcome:
                    type: string
                    const: connected
                    title: Outcome
                    description: Connection outcome.
                  tools:
                    type: array
                    items:
                      type: object
                      properties:
                        slug:
                          type: string
                          title: Slug
                          description: Tool slug identifier.
                        description:
                          title: Description
                          description: Tool description.
                          type: string
                        config:
                          type: object
                          properties:
                            jsonSchema:
                              title: JSON schema
                              description: Tool configuration schema.
                          required:
                            - jsonSchema
                          additionalProperties: false
                          title: Config
                          description: Tool configuration.
                      required:
                        - slug
                        - config
                      additionalProperties: false
                    title: Tools
                    description: Available tools from the MCP server.
                required:
                  - outcome
                  - tools
                additionalProperties: false
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '500':
          description: Internal server error
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````