MCP

Generate MCP URL with custom parameters

Changed on

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.

post/api/v3.1/mcp/servers/generate

Request

  • Base URL
    https://backend.composio.dev
  • URL
    https://backend.composio.dev/api/v3.1/mcp/servers/generate
  • Auth
    API key in header x-api-key

Request body

mcp_server_idstring required

Unique identifier of the MCP server to generate URL for

managed_auth_by_composioboolean

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.

user_idsstring[]

List of user identifiers for whom the URL is generated

connected_account_idsstring[]

List of connected account identifiers

Example request

{
  "mcp_server_id": "550e8400-e29b-41d4-a716-446655440000",
  "managed_auth_by_composio": true,
  "user_ids": [
    "user_123456",
    "user_789012"
  ],
  "connected_account_ids": [
    "ca_1a2b3c4d5e6f",
    "ca_7g8h9i0j1k2l",
    "ca_3m4n5o6p7q8r"
  ]
}

Response

Successfully generated MCP URL. Returns the complete URL with all specified query parameters.

mcp_urlstring required

Base MCP URL without any query parameters

connected_account_urlsstring[] required

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.

user_ids_urlstring[] required

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 response

{
  "mcp_url": "https://backend.composio.dev/v3/mcp/550e8400-e29b-41d4-a716-446655440000",
  "connected_account_urls": [
    "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": [
    "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"
  ]
}

Changes

    • info

      api operation id postV3_1McpServersGenerate removed and replaced with postMcpServersGenerate

    • info

      api tag Servers removed

    • info

      api tag URL Generation removed

    • info

      endpoint deprecated

    • info

      request property deprecated

    • info

      the endpoint scheme security CookieAuth was removed from the API

    • info

      the endpoint scheme security UserApiKeyAuth was removed from the API