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

# Link one or more Native MCP connections to the agent

> Connections not found in the workspace, or not in ACTIVE state, are skipped silently and reported in the response's `skipped` array. The response also surfaces the requested vs linked counts so the caller can detect partial successes without inspecting the skipped list.



## OpenAPI

````yaml /api-reference/openapi.json post /public/api/v1/agents/{agentPublicId}/native-mcps
openapi: 3.1.0
info:
  contact:
    email: support@gennia.ai
    name: Gennia Support
    url: https://gennia.ai
  description: >-
    Workspace-scoped API authenticated via workspace API key (header `X-Api-Key:
    gsk_...` or `Authorization: Bearer gsk_...`).
  title: Gennia Public API
  version: v1
servers:
  - description: Production
    url: https://api.gennia.ai
security:
  - workspaceApiKey: []
tags:
  - description: Slash commands available inside the agent chat.
    name: Agent Commands
  - description: Link skills to an agent.
    name: Agent Skills
  - description: Read/rename/delete workspace knowledge sources.
    name: Knowledge Sources
  - description: Link knowledge sources to an agent.
    name: Agent Knowledge Sources
  - description: Workspace CRUD for HTTP/DB/Custom tools.
    name: HTTP Tools
  - description: Read/write the agent's model selection + capabilities.
    name: Agent Model
  - description: Discover trigger types available for Native MCP toolkits.
    name: Native MCP Triggers
  - description: Discover and toggle capability features.
    name: Agent Features
  - description: Hub access settings.
    name: Hub Access
  - description: Read conversation history and delete conversations.
    name: Conversations
  - description: Send messages to a published agent.
    name: Messages
  - description: Workspace CRUD for External MCP servers.
    name: External MCPs
  - description: Hub billing — plans, coupons, credit packages.
    name: Billing
  - description: External links shown in the hub menu.
    name: Hub External Links
  - description: Link Native MCP (Composio) instances to an agent.
    name: Agent Native MCPs
  - description: Manage AI agents in the workspace bound to the API key.
    name: Agents
  - description: Read published version snapshots and restore.
    name: Agent Versions
  - description: Read/rename/delete workspace skills.
    name: Skills
  - description: Manage hub end-customers (client workspaces).
    name: Clients
  - description: Hub domain (subdomain) management.
    name: Hub Domain
  - description: Read/write the agent's prompt context.
    name: Agent Prompt
  - description: Scheduled / trigger-based runs of an agent.
    name: Agent Automations
  - description: Link HTTP/DB/Custom tools to an agent.
    name: Agent HTTP Tools
  - description: Hub identity, branding, logos and overall configuration.
    name: Hub
  - description: Discover AI models available to this workspace.
    name: AI Models
  - description: Discover channel types and their config schemas.
    name: Channel Types
  - description: Connect agents to messaging surfaces.
    name: Agent Channels
  - description: Link workspace-registered External MCP servers to an agent.
    name: Agent External MCPs
  - description: Workspace-scoped public API (API key authentication)
    name: Public API
  - description: Dynamic-prompt variable definitions.
    name: Agent Variables
  - description: Link sub-agents as delegation targets.
    name: Agent Sub-agents
paths:
  /public/api/v1/agents/{agentPublicId}/native-mcps:
    post:
      tags:
        - Agent Native MCPs
      summary: Link one or more Native MCP connections to the agent
      description: >-
        Connections not found in the workspace, or not in ACTIVE state, are
        skipped silently and reported in the response's `skipped` array. The
        response also surfaces the requested vs linked counts so the caller can
        detect partial successes without inspecting the skipped list.
      operationId: linkConnections
      parameters:
        - in: path
          name: agentPublicId
          required: true
          schema:
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LinkNativeMcpDTO'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicNativeMcpLinkResultDTO'
          description: Link operation completed (may include skips)
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicNativeMcpLinkResultDTO'
          description: Empty or malformed body
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicNativeMcpLinkResultDTO'
          description: Missing or invalid API key
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicNativeMcpLinkResultDTO'
          description: Agent not found
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicNativeMcpLinkResultDTO'
          description: gennia-agents unreachable
      security:
        - workspaceApiKey: []
components:
  schemas:
    LinkNativeMcpDTO:
      description: Body for linking Native MCP (Composio) connections to an agent.
      properties:
        connectionPublicIds:
          description: >-
            List of Native MCP connection public IDs (UUIDs) to link.
            Connections must be ACTIVE and belong to the same workspace as the
            agent. Inactive or missing connections are skipped silently and
            reported in the response.
          example:
            - 550e8400-e29b-41d4-a716-446655440000
          items:
            format: uuid
            type: string
          maxItems: 50
          minItems: 0
          type: array
      required:
        - connectionPublicIds
      type: object
    PublicNativeMcpLinkResultDTO:
      description: Result of a Native MCP (Composio) link operation.
      properties:
        linked:
          description: >-
            Number of connections actually linked. Equals requested minus
            skipped entries.
          example: 2
          format: int32
          type: integer
        requested:
          description: Number of connections submitted in the request body.
          example: 3
          format: int32
          type: integer
        skipped:
          description: >-
            Connections that were not linked, with a reason. Each entry
            corresponds to a UUID from the request body that the backend
            rejected (typically because the connection does not exist in the
            workspace or is not in ACTIVE status).
          items:
            $ref: '#/components/schemas/SkippedConnection'
          type: array
      type: object
    SkippedConnection:
      description: A connection that was submitted but not linked, plus the reason why.
      properties:
        connectionPublicId:
          description: Connection public ID from the request body.
          format: uuid
          type: string
        reason:
          description: Reason the connection was skipped.
          enum:
            - NOT_FOUND_OR_INACTIVE
          example: NOT_FOUND_OR_INACTIVE
          type: string
      type: object
  securitySchemes:
    workspaceApiKey:
      in: header
      name: X-Api-Key
      type: apiKey

````