API ReferenceMCP

Generate MCP URL with custom parameters

Markdown
POST
/api/v3/mcp/servers/generate

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.

Authorization

ApiKeyAuth
x-api-key<token>

API key authentication

In: header

Request Body

application/json

mcp_server_id*string

Unique identifier of the MCP server to generate URL for

managed_auth_by_composio?boolean

Flag indicating if Composio manages authentication

Defaultfalse
user_ids?array<string>

List of user identifiers for whom the URL is generated

connected_account_ids?array<string>

List of connected account identifiers

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://backend.composio.dev/api/v3/mcp/servers/generate" \  -H "Content-Type: application/json" \  -d '{    "mcp_server_id": "550e8400-e29b-41d4-a716-446655440000",    "user_ids": [      "user_123456"    ],    "connected_account_ids": [      "account_1",      "account_2"    ]  }'
{
  "mcp_url": "https://mcp.composio.dev/composio/server/550e8400-e29b-41d4-a716-446655440000",
  "connected_account_urls": [
    "https://mcp.composio.dev/composio/server/550e8400-e29b-41d4-a716-446655440000?include_composio_helper_actions=true&connected_account_ids=account_1&user_id=user_123456,user_789012",
    "https://mcp.composio.dev/composio/server/550e8400-e29b-41d4-a716-446655440000?include_composio_helper_actions=true&connected_account_ids=account_2&user_id=user_123456,user_789012"
  ],
  "user_ids_url": [
    "https://mcp.composio.dev/composio/server/550e8400-e29b-41d4-a716-446655440000?include_composio_helper_actions=true&connected_account_ids=account_1,account_2&user_id=user_123456",
    "https://mcp.composio.dev/composio/server/550e8400-e29b-41d4-a716-446655440000?include_composio_helper_actions=true&connected_account_ids=account_1,account_2&user_id=user_789012"
  ]
}
{
  "error": {
    "message": "string",
    "code": 0,
    "slug": "string",
    "status": 0,
    "request_id": "string",
    "suggested_fix": "string",
    "errors": [
      "string"
    ]
  }
}
{
  "error": {
    "message": "string",
    "code": 0,
    "slug": "string",
    "status": 0,
    "request_id": "string",
    "suggested_fix": "string",
    "errors": [
      "string"
    ]
  }
}
{
  "error": {
    "message": "string",
    "code": 0,
    "slug": "string",
    "status": 0,
    "request_id": "string",
    "suggested_fix": "string",
    "errors": [
      "string"
    ]
  }
}
{
  "error": {
    "message": "string",
    "code": 0,
    "slug": "string",
    "status": 0,
    "request_id": "string",
    "suggested_fix": "string",
    "errors": [
      "string"
    ]
  }
}
{
  "error": {
    "message": "string",
    "code": 0,
    "slug": "string",
    "status": 0,
    "request_id": "string",
    "suggested_fix": "string",
    "errors": [
      "string"
    ]
  }
}