> ## Documentation Index
> Fetch the complete documentation index at: https://composio-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate MCP URL with custom parameters

> Generates a Model Control Protocol (MCP) URL for an existing server with custom query parameters. The URL includes user-specific parameters and configuration flags that control the behavior of the MCP connection.



## OpenAPI

````yaml /api-reference/openapi-v3.json post /api/v3/mcp/servers/generate
openapi: 3.0.0
info:
  version: 3.0.0
  title: Composio Platform API
  description: >-
    Composio v3 API — legacy endpoints under /api/v3/. Use v3.1 for new
    integrations.
  contact:
    name: Composio Support
    url: https://composio.dev/support
    email: support@composio.dev
  license:
    name: Proprietary
    url: https://composio.dev/terms
servers:
  - url: https://backend.composio.dev
    description: Composio production API
security:
  - ApiKeyAuth: []
tags:
  - name: Authentication
    description: Authentication related endpoints
    x-group: Authentication
  - name: Auth Configs
    description: Authentication configuration management
    x-group: Auth Configs
  - name: Connected Accounts
    description: Connected account management
    x-group: Connected Accounts
  - name: Logs
    description: Logging and monitoring
    x-group: Logs
  - name: OpenAPI
    description: OpenAPI specification management
    x-group: OpenAPI
  - name: Organization
    description: Organization management
    x-group: Organization
  - name: API Keys
    description: API key management
    x-group: API Keys
  - name: Webhooks
    description: Webhook configuration
    x-group: Webhooks
  - name: Webhook Endpoints
    description: >-
      Per-OAuth-app webhook ingress endpoints. Inbound URLs the provider posts
      to, plus signing secret storage and verification.
    x-group: Webhook Endpoints
  - name: Webhook Subscriptions
    description: >-
      Webhook delivery subscriptions. Outbound URLs Composio posts trigger
      events to, plus signing secret rotation and event-type filters.
    x-group: Webhook Subscriptions
  - name: Team
    description: Team member management
    x-group: Team
  - name: Consumer Skills
    description: Organization-authored Skill management
    x-group: Consumer Skills
  - name: Toolkits
    description: Toolkit and tool management
    x-group: Toolkits
  - name: Tools
    description: Tool execution endpoints
    x-group: Tools
  - name: Triggers
    description: Trigger management and execution
    x-group: Triggers
  - name: Payments
    description: Payment and subscription management
    x-group: Payments
  - name: Billing
    description: Dashboard billing state — usage, subscription, contract (cookie-auth only)
    x-group: Billing
  - name: Compliance
    description: Organization compliance agreements and acceptance state
    x-group: Compliance
  - name: Files
    description: File management
    x-group: Files
  - name: MCP
    description: MCP server management
    x-group: MCP
  - name: MCP Partner
    description: MCP partner management
    x-group: MCP Partner
  - name: Stripe Projects
    description: Stripe Projects provisioning
    x-group: Stripe Projects
  - name: Tool Router
    description: (Labs) Tool router endpoints
    x-group: Sessions (Prev Tool Router)
  - name: Playground
    description: Dashboard playground chat
    x-group: Playground
  - name: Arena
    description: Arena conversations, messages and terms
    x-group: Arena
  - name: Organization Management
    description: Organization Management API endpoints.
    x-group: Organization Management
  - name: Projects
    description: Projects API endpoints.
    x-group: Projects
paths:
  /api/v3/mcp/servers/generate:
    post:
      tags:
        - MCP
      summary: Generate MCP URL with custom parameters
      description: >-
        Generates a Model Control Protocol (MCP) URL for an existing server with
        custom query parameters. The URL includes user-specific parameters and
        configuration flags that control the behavior of the MCP connection.
      operationId: postMcpServersGenerate
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                mcp_server_id:
                  type: string
                  description: Unique identifier of the MCP server to generate URL for
                  example: 550e8400-e29b-41d4-a716-446655440000
                managed_auth_by_composio:
                  type: boolean
                  default: false
                  description: >-
                    Flag indicating if Composio manages authentication. When
                    true, the generated URLs include the
                    include_composio_helper_actions query parameter. DEPRECATED:
                    The include_composio_helper_actions query parameter will be
                    removed in a future version. Switch to Composio Sessions
                    (POST /api/v3/tool_router/session), whose MCP URL includes
                    connection-management tools.
                  deprecated: true
                  example: true
                user_ids:
                  type: array
                  items:
                    type: string
                  description: List of user identifiers for whom the URL is generated
                  example:
                    - user_123456
                    - user_789012
                connected_account_ids:
                  type: array
                  items:
                    type: string
                  description: List of connected account identifiers
                  example:
                    - ca_1a2b3c4d5e6f
                    - ca_7g8h9i0j1k2l
                    - ca_3m4n5o6p7q8r
              required:
                - mcp_server_id
              description: Request parameters for generating an MCP URL
            examples:
              Basic URL Generation:
                value:
                  mcp_server_id: 550e8400-e29b-41d4-a716-446655440000
                  user_ids:
                    - user_123456
                  connected_account_ids:
                    - ca_1a2b3c4d5e6f
                    - ca_7g8h9i0j1k2l
              Managed Auth Configuration:
                value:
                  mcp_server_id: 550e8400-e29b-41d4-a716-446655440000
                  user_ids:
                    - user_123456
                    - user_789012
                  connected_account_ids:
                    - ca_1a2b3c4d5e6f
                    - ca_7g8h9i0j1k2l
                    - ca_3m4n5o6p7q8r
      responses:
        '200':
          description: >-
            Successfully generated MCP URL. Returns the complete URL with all
            specified query parameters.
          content:
            application/json:
              schema:
                type: object
                properties:
                  mcp_url:
                    type: string
                    description: Base MCP URL without any query parameters
                    example: >-
                      https://backend.composio.dev/v3/mcp/550e8400-e29b-41d4-a716-446655440000
                  connected_account_urls:
                    type: array
                    items:
                      type: string
                    description: >-
                      List of URLs generated for each connected account ID. URLs
                      may carry the include_composio_helper_actions query
                      parameter. DEPRECATED: The include_composio_helper_actions
                      query parameter will be removed in a future version.
                      Switch to Composio Sessions (POST
                      /api/v3/tool_router/session), whose MCP URL includes
                      connection-management tools.
                    example:
                      - >-
                        https://backend.composio.dev/v3/mcp/550e8400-e29b-41d4-a716-446655440000?include_composio_helper_actions=true&connected_account_id=ca_1a2b3c4d5e6f
                      - >-
                        https://backend.composio.dev/v3/mcp/550e8400-e29b-41d4-a716-446655440000?include_composio_helper_actions=true&connected_account_id=ca_7g8h9i0j1k2l
                  user_ids_url:
                    type: array
                    items:
                      type: string
                    description: >-
                      List of URLs generated for each user ID. URLs may carry
                      the include_composio_helper_actions query parameter.
                      DEPRECATED: The include_composio_helper_actions query
                      parameter will be removed in a future version. Switch to
                      Composio Sessions (POST /api/v3/tool_router/session),
                      whose MCP URL includes connection-management tools.
                    example:
                      - >-
                        https://backend.composio.dev/v3/mcp/550e8400-e29b-41d4-a716-446655440000?include_composio_helper_actions=true&user_id=user_123456
                      - >-
                        https://backend.composio.dev/v3/mcp/550e8400-e29b-41d4-a716-446655440000?include_composio_helper_actions=true&user_id=user_789012
                required:
                  - mcp_url
                  - connected_account_urls
                  - user_ids_url
                description: Response containing the generated MCP URLs
        '400':
          description: >-
            Bad request. The request body may be invalid or missing required
            parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: >-
            Unauthorized. Authentication is required or the provided credentials
            are invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            Forbidden. The authenticated user does not have permission to access
            this MCP server.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            MCP server not found. No server with the specified ID exists or it
            has been deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: >-
            Internal server error. An unexpected error occurred while processing
            the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      deprecated: true
      security:
        - ApiKeyAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            code:
              type: number
            slug:
              type: string
            status:
              type: number
            request_id:
              type: string
            suggested_fix:
              type: string
            errors:
              type: array
              items:
                type: string
          required:
            - message
            - code
            - slug
            - status
      required:
        - error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your Composio project API key. Create or copy it from the Composio
        dashboard.
      x-default: your-project-api-key

````