Composio MCP Servers

Composio MCP (Model Control Protocol) servers provide a powerful way to expose and integrate tools from various applications, making them accessible to any compatible MCP client or SDK. This creates a seamless bridge between your tools and AI agents, enabling rich, interactive functionality across your ecosystem.

To learn about the MCP clients, see the clients page. To build with agents, one can customize the MCP server too.

Interested in embedding Composio MCP servers into your MCP clients or applications? Reach out via Slack or Contact us to get started!

Creating Custom MCP Servers

1

Configure Authentication

  • Configure app permissions: Select the specific scopes and permissions your integration requires for each connected application. This ensures your MCP server has the right level of access.

  • Customize the authentication experience (Optional): Create a seamless, branded experience by providing your own OAuth credentials and customizing the consent screens.

Learn more:

2

Create and configure an MCP server

Making the following request:

$curl -X POST https://backend.composio.dev/api/v3/mcp/servers \
> -H "x-api-key: <YOUR_API_KEY>" \
> -H "Content-Type: application/json" \
> -d '{
> "name": "Gmail",
> "apps": [
> "gmail"
> ],
> "auth_config_id": {}
> }'

The response looks like:

1{
2 "id": "5bc757cc-7a8e-431c-8616-7f57cbed2423",
3 "name": "gdrive_searcher",
4 "auth_config_id": "a8a244c4-4a52-488e-8a01-2e504d069d16",
5 "allowed_tools": [
6 "GOOGLEDRIVE_FIND_FILE",
7 "GOOGLEDRIVE_FIND_FOLDER",
8 "GOOGLEDRIVE_DOWNLOAD_FILE"
9 ],
10 "mcp_url": "https://mcp.composio.dev/composio/server/5bc757cc-7a8e-431c-8616-7f57cbed2423?transport=sse",
11 "commands": {
12 "cursor": "npx @composio/mcp@latest setup \"<mcp_url>\" --client cursor",
13 "claude": "npx @composio/mcp@latest setup \"<mcp_url>\" --client claude",
14 "windsurf": "npx @composio/mcp@latest setup \"<mcp_url>\" --client windsurf"
15 },
16 "created_at": "2025-05-18T22:15:25.926Z",
17 "updated_at": "2025-05-18T22:15:25.926Z"
18}
3

Client applications connect to the server

The resultant mcp_url; (https://mcp.composio.dev/composio/server/<UUID>?transport=sse) is used by the client applications to connect to the server.
The URL accepts three optional query parameters:

Query paramPurpose
user_idBind the session to a user identifier from your app.
connected_account_idPin the session to a specific Composio connectedAccount (skip account selection).
include_composio_helper_actions=trueInject helper tools so the agent can walk the user through authentication when needed.

Currently, the default transport is sse. Support for transport=http-stream will be available soon.

Configuring authentication

You or your users need to authenticate against an app to use it’s MCP server through Composio! This can be done in two ways:

  • Authenticate users upfront via the Composio SDK/API. Follow this guide to learn how to connect users. This is recommended for most use cases
  • Let the agent authenticate users on demand. Passing include_composio_helper_actions=true in the URL will include Composio’s helper actions and the agent will guide the user through auth on demand.