MCP

Server management

View as markdown

This guide covers all server management operations for MCP servers.

Create a server

server = composio.mcp.create(
    name="my-gmail-server",
    toolkits=[{
        "toolkit": "gmail",
        "auth_config": "ac_xyz123"
    }],
    allowed_tools=["GMAIL_FETCH_EMAILS", "GMAIL_SEND_EMAIL"]
)

print(f"Created server: {server.id}")
const const server: MCPConfigCreateResponseserver = await const composio: Composio<OpenAIProvider>composio.Composio<OpenAIProvider>.mcp: MCP
Model Context Protocol server management
mcp
.
MCP.create(name: string, mcpConfig: {
    toolkits: (string | {
        toolkit?: string | undefined;
        authConfigId?: string | undefined;
    })[];
    allowedTools?: string[] | undefined;
    manuallyManageConnections?: boolean | undefined;
}): Promise<MCPConfigCreateResponse>
Create a new MCP configuration.
@paramparams - Parameters for creating the MCP configuration@paramparams.authConfig - Array of auth configurations with id and allowed tools@paramparams.options - Configuration options@paramparams.options.name - Unique name for the MCP configuration@paramparams.options.manuallyManageConnections - Whether to use chat-based authentication or manually connect accounts@returnsCreated server details with instance getter@example```typescript const server = await composio.mcpConfig.create("personal-mcp-server", { toolkits: ["github", "slack"], allowedTools: ["GMAIL_FETCH_EMAILS", "SLACK_SEND_MESSAGE"], manuallyManageConnections: false } }); const server = await composio.mcpConfig.create("personal-mcp-server", { toolkits: [{ toolkit: "gmail", authConfigId: "ac_243434343" }], allowedTools: ["GMAIL_FETCH_EMAILS"], manuallyManageConnections: false } }); ```
create
(
"my-gmail-server", {
toolkits: (string | {
    toolkit?: string | undefined;
    authConfigId?: string | undefined;
})[]
toolkits
: [
{ authConfigId?: string | undefinedauthConfigId: "ac_xyz123", toolkit?: string | undefinedtoolkit: "gmail" } ], allowedTools?: string[] | undefinedallowedTools: ["GMAIL_FETCH_EMAILS", "GMAIL_SEND_EMAIL"], manuallyManageConnections?: boolean | undefinedmanuallyManageConnections: false } ); var console: Console
The `console` module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: * A `Console` class with methods such as `console.log()`, `console.error()` and `console.warn()` that can be used to write to any Node.js stream. * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdout) and [`process.stderr`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module. _**Warning**_: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v24.x/api/process.html#a-note-on-process-io) for more information. Example using the global `console`: ```js console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr ``` Example using the `Console` class: ```js const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err ```
@see[source](https://github.com/nodejs/node/blob/v24.x/lib/console.js)
console
.Console.log(message?: any, ...optionalParams: any[]): void (+1 overload)
Prints to `stdout` with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)). ```js const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout ``` See [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args) for more information.
@sincev0.1.100
log
(`Created server: ${const server: MCPConfigCreateResponseserver.id: stringid}`);

List servers

Find and filter your MCP servers.

# List all servers
servers = composio.mcp.list()
print(f"Found {len(servers['items'])} servers")

# Filter by toolkit
gmail_servers = composio.mcp.list(
    toolkits="gmail",
    limit=20
)

# Filter by name
production_servers = composio.mcp.list(
    name="production"
)
// List all servers
const 
const servers: {
    items: {
        name: string;
        id: string;
        toolkits: string[];
        authConfigIds: string[];
        allowedTools: string[];
        commands: {
            cursor: string;
            claude: string;
            windsurf: string;
        };
        MCPUrl: string;
        toolkitIcons: Record<string, string>;
        serverInstanceCount: number;
    }[];
    totalPages: number;
    currentPage: number;
}
servers
= await const composio: Composio<OpenAIProvider>composio.Composio<OpenAIProvider>.mcp: MCP
Model Context Protocol server management
mcp
.
MCP.list(options: {
    limit: number;
    toolkits: string[];
    page: number;
    authConfigs: string[];
    name?: string | undefined;
}): Promise<{
    items: {
        name: string;
        id: string;
        toolkits: string[];
        authConfigIds: string[];
        allowedTools: string[];
        commands: {
            cursor: string;
            claude: string;
            windsurf: string;
        };
        MCPUrl: string;
        toolkitIcons: Record<string, string>;
        serverInstanceCount: number;
    }[];
    totalPages: number;
    currentPage: number;
}>
List the MCP servers with optional filtering and pagination
@paramoptions - Filtering and pagination options@paramoptions.page - Page number for pagination (1-based)@paramoptions.limit - Maximum number of items to return per page@paramoptions.toolkits - Array of toolkit names to filter by@paramoptions.authConfigs - Array of auth configuration IDs to filter by@paramoptions.name - Filter by MCP server name (partial match)@returnsPaginated list of MCP servers with metadata@example```typescript // List all MCP servers const allServers = await composio.experimental.mcp.list({}); // List with pagination const pagedServers = await composio.experimental.mcp.list({ page: 2, limit: 5 }); // Filter by toolkit const githubServers = await composio.experimental.mcp.list({ toolkits: ['github', 'slack'] }); // Filter by name const namedServers = await composio.experimental.mcp.list({ name: 'personal' }); ```
list
({
limit: numberlimit: 10, page: numberpage: 1, authConfigs: string[]authConfigs: [], toolkits: string[]toolkits: [] }); var console: Console
The `console` module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: * A `Console` class with methods such as `console.log()`, `console.error()` and `console.warn()` that can be used to write to any Node.js stream. * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdout) and [`process.stderr`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module. _**Warning**_: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v24.x/api/process.html#a-note-on-process-io) for more information. Example using the global `console`: ```js console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr ``` Example using the `Console` class: ```js const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err ```
@see[source](https://github.com/nodejs/node/blob/v24.x/lib/console.js)
console
.Console.log(message?: any, ...optionalParams: any[]): void (+1 overload)
Prints to `stdout` with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)). ```js const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout ``` See [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args) for more information.
@sincev0.1.100
log
(`Found ${
const servers: {
    items: {
        name: string;
        id: string;
        toolkits: string[];
        authConfigIds: string[];
        allowedTools: string[];
        commands: {
            cursor: string;
            claude: string;
            windsurf: string;
        };
        MCPUrl: string;
        toolkitIcons: Record<string, string>;
        serverInstanceCount: number;
    }[];
    totalPages: number;
    currentPage: number;
}
servers
.
items: {
    name: string;
    id: string;
    toolkits: string[];
    authConfigIds: string[];
    allowedTools: string[];
    commands: {
        cursor: string;
        claude: string;
        windsurf: string;
    };
    MCPUrl: string;
    toolkitIcons: Record<string, string>;
    serverInstanceCount: number;
}[]
items
.Array<T>.length: number
Gets or sets the length of the array. This is a number one higher than the highest index in the array.
length
} servers`);
// Filter by toolkit const
const gmailServers: {
    items: {
        name: string;
        id: string;
        toolkits: string[];
        authConfigIds: string[];
        allowedTools: string[];
        commands: {
            cursor: string;
            claude: string;
            windsurf: string;
        };
        MCPUrl: string;
        toolkitIcons: Record<string, string>;
        serverInstanceCount: number;
    }[];
    totalPages: number;
    currentPage: number;
}
gmailServers
= await const composio: Composio<OpenAIProvider>composio.Composio<OpenAIProvider>.mcp: MCP
Model Context Protocol server management
mcp
.
MCP.list(options: {
    limit: number;
    toolkits: string[];
    page: number;
    authConfigs: string[];
    name?: string | undefined;
}): Promise<{
    items: {
        name: string;
        id: string;
        toolkits: string[];
        authConfigIds: string[];
        allowedTools: string[];
        commands: {
            cursor: string;
            claude: string;
            windsurf: string;
        };
        MCPUrl: string;
        toolkitIcons: Record<string, string>;
        serverInstanceCount: number;
    }[];
    totalPages: number;
    currentPage: number;
}>
List the MCP servers with optional filtering and pagination
@paramoptions - Filtering and pagination options@paramoptions.page - Page number for pagination (1-based)@paramoptions.limit - Maximum number of items to return per page@paramoptions.toolkits - Array of toolkit names to filter by@paramoptions.authConfigs - Array of auth configuration IDs to filter by@paramoptions.name - Filter by MCP server name (partial match)@returnsPaginated list of MCP servers with metadata@example```typescript // List all MCP servers const allServers = await composio.experimental.mcp.list({}); // List with pagination const pagedServers = await composio.experimental.mcp.list({ page: 2, limit: 5 }); // Filter by toolkit const githubServers = await composio.experimental.mcp.list({ toolkits: ['github', 'slack'] }); // Filter by name const namedServers = await composio.experimental.mcp.list({ name: 'personal' }); ```
list
({
limit: numberlimit: 20, page: numberpage: 1, authConfigs: string[]authConfigs: [], toolkits: string[]toolkits: ["gmail"] }); // Filter by name const
const productionServers: {
    items: {
        name: string;
        id: string;
        toolkits: string[];
        authConfigIds: string[];
        allowedTools: string[];
        commands: {
            cursor: string;
            claude: string;
            windsurf: string;
        };
        MCPUrl: string;
        toolkitIcons: Record<string, string>;
        serverInstanceCount: number;
    }[];
    totalPages: number;
    currentPage: number;
}
productionServers
= await const composio: Composio<OpenAIProvider>composio.Composio<OpenAIProvider>.mcp: MCP
Model Context Protocol server management
mcp
.
MCP.list(options: {
    limit: number;
    toolkits: string[];
    page: number;
    authConfigs: string[];
    name?: string | undefined;
}): Promise<{
    items: {
        name: string;
        id: string;
        toolkits: string[];
        authConfigIds: string[];
        allowedTools: string[];
        commands: {
            cursor: string;
            claude: string;
            windsurf: string;
        };
        MCPUrl: string;
        toolkitIcons: Record<string, string>;
        serverInstanceCount: number;
    }[];
    totalPages: number;
    currentPage: number;
}>
List the MCP servers with optional filtering and pagination
@paramoptions - Filtering and pagination options@paramoptions.page - Page number for pagination (1-based)@paramoptions.limit - Maximum number of items to return per page@paramoptions.toolkits - Array of toolkit names to filter by@paramoptions.authConfigs - Array of auth configuration IDs to filter by@paramoptions.name - Filter by MCP server name (partial match)@returnsPaginated list of MCP servers with metadata@example```typescript // List all MCP servers const allServers = await composio.experimental.mcp.list({}); // List with pagination const pagedServers = await composio.experimental.mcp.list({ page: 2, limit: 5 }); // Filter by toolkit const githubServers = await composio.experimental.mcp.list({ toolkits: ['github', 'slack'] }); // Filter by name const namedServers = await composio.experimental.mcp.list({ name: 'personal' }); ```
list
({
limit: numberlimit: 10, page: numberpage: 1, authConfigs: string[]authConfigs: [], toolkits: string[]toolkits: [], name?: string | undefinedname: "production" });

Get server details

# Get by ID
server = composio.mcp.get("mcp_server_id")
print(f"Server name: {server.name}")
print(f"Toolkits: {server.toolkits}")
// Get by ID
const 
const server: {
    name: string;
    id: string;
    toolkits: string[];
    authConfigIds: string[];
    allowedTools: string[];
    commands: {
        cursor: string;
        claude: string;
        windsurf: string;
    };
    MCPUrl: string;
    toolkitIcons: Record<string, string>;
    serverInstanceCount: number;
}
server
= await const composio: Composio<OpenAIProvider>composio.Composio<OpenAIProvider>.mcp: MCP
Model Context Protocol server management
mcp
.
MCP.get(serverId: string): Promise<{
    name: string;
    id: string;
    toolkits: string[];
    authConfigIds: string[];
    allowedTools: string[];
    commands: {
        cursor: string;
        claude: string;
        windsurf: string;
    };
    MCPUrl: string;
    toolkitIcons: Record<string, string>;
    serverInstanceCount: number;
}>
Retrieve detailed information about a specific MCP server by its ID
@paramserverId - The unique identifier of the MCP server to retrieve@returnsComplete MCP server details including configuration, tools, and metadata@example```typescript // Get a specific MCP server by ID const server = await composio.experimental.mcp.get("mcp_12345"); console.log(server.name); // "My Personal MCP Server" console.log(server.allowedTools); // ["GITHUB_CREATE_ISSUE", "SLACK_SEND_MESSAGE"] console.log(server.toolkits); // ["github", "slack"] console.log(server.serverInstanceCount); // 3 // Access setup commands for different clients console.log(server.commands.claude); // Claude setup command console.log(server.commands.cursor); // Cursor setup command console.log(server.commands.windsurf); // Windsurf setup command // Use the MCP URL for direct connections const mcpUrl = server.MCPUrl; ```@throws{ValidationError} When the server ID is invalid or server not found
get
("mcp_server_id");
var console: Console
The `console` module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: * A `Console` class with methods such as `console.log()`, `console.error()` and `console.warn()` that can be used to write to any Node.js stream. * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdout) and [`process.stderr`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module. _**Warning**_: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v24.x/api/process.html#a-note-on-process-io) for more information. Example using the global `console`: ```js console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr ``` Example using the `Console` class: ```js const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err ```
@see[source](https://github.com/nodejs/node/blob/v24.x/lib/console.js)
console
.Console.log(message?: any, ...optionalParams: any[]): void (+1 overload)
Prints to `stdout` with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)). ```js const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout ``` See [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args) for more information.
@sincev0.1.100
log
(`Server: ${
const server: {
    name: string;
    id: string;
    toolkits: string[];
    authConfigIds: string[];
    allowedTools: string[];
    commands: {
        cursor: string;
        claude: string;
        windsurf: string;
    };
    MCPUrl: string;
    toolkitIcons: Record<string, string>;
    serverInstanceCount: number;
}
server
.name: stringname}`);
var console: Console
The `console` module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: * A `Console` class with methods such as `console.log()`, `console.error()` and `console.warn()` that can be used to write to any Node.js stream. * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdout) and [`process.stderr`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module. _**Warning**_: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v24.x/api/process.html#a-note-on-process-io) for more information. Example using the global `console`: ```js console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr ``` Example using the `Console` class: ```js const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err ```
@see[source](https://github.com/nodejs/node/blob/v24.x/lib/console.js)
console
.Console.log(message?: any, ...optionalParams: any[]): void (+1 overload)
Prints to `stdout` with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)). ```js const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout ``` See [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args) for more information.
@sincev0.1.100
log
(`Toolkits: ${
const server: {
    name: string;
    id: string;
    toolkits: string[];
    authConfigIds: string[];
    allowedTools: string[];
    commands: {
        cursor: string;
        claude: string;
        windsurf: string;
    };
    MCPUrl: string;
    toolkitIcons: Record<string, string>;
    serverInstanceCount: number;
}
server
.toolkits: string[]toolkits}`);

Update a server

Modify server configuration, tools, or auth configs.

updated = composio.mcp.update(
    server_id="mcp_server_id",
    name="updated-name",
    allowed_tools=["GMAIL_FETCH_EMAILS", "GMAIL_SEARCH_EMAILS"]
)
const 
const updated: {
    name: string;
    id: string;
    toolkits: string[];
    authConfigIds: string[];
    allowedTools: string[];
    commands: {
        cursor: string;
        claude: string;
        windsurf: string;
    };
    MCPUrl: string;
    toolkitIcons: Record<string, string>;
    serverInstanceCount: number;
}
updated
= await const composio: Composio<OpenAIProvider>composio.Composio<OpenAIProvider>.mcp: MCP
Model Context Protocol server management
mcp
.
MCP.update(serverId: string, config: {
    name?: string | undefined;
    toolkits?: (string | {
        toolkit?: string | undefined;
        authConfigId?: string | undefined;
    })[] | undefined;
    allowedTools?: string[] | undefined;
    manuallyManageConnections?: boolean | undefined;
}): Promise<{
    name: string;
    id: string;
    toolkits: string[];
    authConfigIds: string[];
    allowedTools: string[];
    commands: {
        cursor: string;
        claude: string;
        windsurf: string;
    };
    MCPUrl: string;
    toolkitIcons: Record<string, string>;
    serverInstanceCount: number;
}>
Update an existing MCP server configuration with new settings
@paramserverId - The unique identifier of the MCP server to update@paramconfig - Update configuration parameters@paramconfig.name - New name for the MCP server@paramconfig.toolkits - Updated toolkit configurations@paramconfig.toolkits[].toolkit - Toolkit identifier (e.g., "github", "slack")@paramconfig.toolkits[].authConfigId - Auth configuration ID for the toolkit@paramconfig.toolkits[].allowedTools - Specific tools to enable for this toolkit@paramconfig.manuallyManageConnections - Whether to manually manage account connections@returnsUpdated MCP server configuration with all details@example```typescript // Update server name only const updatedServer = await composio.experimental.mcp.update("mcp_12345", { name: "My Updated MCP Server" }); // Update toolkits and tools const serverWithNewTools = await composio.experimental.mcp.update("mcp_12345", { toolkits: [ { toolkit: "github", authConfigId: "auth_abc123", allowedTools: ["GITHUB_CREATE_ISSUE", "GITHUB_LIST_REPOS"] }, { toolkit: "slack", authConfigId: "auth_xyz789", allowedTools: ["SLACK_SEND_MESSAGE", "SLACK_LIST_CHANNELS"] } ] }); // Update connection management setting const serverWithManualAuth = await composio.experimental.mcp.update("mcp_12345", { name: "Manual Auth Server", manuallyManageConnections: true }); // Complete update example const fullyUpdatedServer = await composio.experimental.mcp.update("mcp_12345", { name: "Production MCP Server", toolkits: [ { toolkit: "gmail", authConfigId: "auth_gmail_prod", } ], allowedTools: ["GMAIL_SEND_EMAIL", "GMAIL_FETCH_EMAILS"] manuallyManageConnections: false }); console.log("Updated server:", fullyUpdatedServer.name); console.log("New tools:", fullyUpdatedServer.allowedTools); ```@throws{ValidationError} When the update parameters are invalid or malformed@throws{Error} When the server ID doesn't exist or update fails@noteOnly provided fields will be updated. Omitted fields will retain their current values.@noteWhen updating toolkits, the entire toolkit configuration is replaced, not merged.
update
(
"mcp_server_id", { name?: string | undefinedname: "updated-name",
toolkits?: (string | {
    toolkit?: string | undefined;
    authConfigId?: string | undefined;
})[] | undefined
toolkits
: [
{ toolkit?: string | undefinedtoolkit: "gmail", authConfigId?: string | undefinedauthConfigId: "ac_new_config" } ], allowedTools?: string[] | undefinedallowedTools: ["GMAIL_FETCH_EMAILS", "GMAIL_SEARCH_EMAILS"], manuallyManageConnections?: boolean | undefinedmanuallyManageConnections: false } ); var console: Console
The `console` module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: * A `Console` class with methods such as `console.log()`, `console.error()` and `console.warn()` that can be used to write to any Node.js stream. * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdout) and [`process.stderr`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module. _**Warning**_: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v24.x/api/process.html#a-note-on-process-io) for more information. Example using the global `console`: ```js console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr ``` Example using the `Console` class: ```js const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err ```
@see[source](https://github.com/nodejs/node/blob/v24.x/lib/console.js)
console
.Console.log(message?: any, ...optionalParams: any[]): void (+1 overload)
Prints to `stdout` with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)). ```js const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout ``` See [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args) for more information.
@sincev0.1.100
log
(
const updated: {
    name: string;
    id: string;
    toolkits: string[];
    authConfigIds: string[];
    allowedTools: string[];
    commands: {
        cursor: string;
        claude: string;
        windsurf: string;
    };
    MCPUrl: string;
    toolkitIcons: Record<string, string>;
    serverInstanceCount: number;
}
updated
);

Delete a server

result = composio.mcp.delete("mcp_server_id")
if result['deleted']:
    print("Server deleted successfully")
const 
const result: {
    id: string;
    deleted: boolean;
}
result
= await const composio: Composio<OpenAIProvider>composio.Composio<OpenAIProvider>.mcp: MCP
Model Context Protocol server management
mcp
.
MCP.delete(serverId: string): Promise<{
    id: string;
    deleted: boolean;
}>
Delete an MCP server configuration permanently
@paramserverId - The unique identifier of the MCP server to delete@returnsConfirmation object with server ID and deletion status@example```typescript // Delete an MCP server by ID const result = await composio.experimental.mcp.delete("mcp_12345"); if (result.deleted) { console.log(`Server ${result.id} has been successfully deleted`); } else { console.log(`Failed to delete server ${result.id}`); } // Example with error handling try { const result = await composio.experimental.mcp.delete("mcp_12345"); console.log("Deletion successful:", result); } catch (error) { console.error("Failed to delete MCP server:", error.message); } // Delete and verify from list await composio.experimental.mcp.delete("mcp_12345"); const servers = await composio.experimental.mcp.list({}); const serverExists = servers.items.some(server => server.id === "mcp_12345"); console.log("Server still exists:", serverExists); // Should be false ```@throws{ValidationError} When the server ID is invalid or server not found@throws{Error} When the server cannot be deleted due to active connections or other constraints@warningThis operation is irreversible. Once deleted, the MCP server configuration and all its associated data will be permanently removed.
delete
("mcp_server_id");
if (
const result: {
    id: string;
    deleted: boolean;
}
result
.deleted: booleandeleted) {
var console: Console
The `console` module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: * A `Console` class with methods such as `console.log()`, `console.error()` and `console.warn()` that can be used to write to any Node.js stream. * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdout) and [`process.stderr`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module. _**Warning**_: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v24.x/api/process.html#a-note-on-process-io) for more information. Example using the global `console`: ```js console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr ``` Example using the `Console` class: ```js const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err ```
@see[source](https://github.com/nodejs/node/blob/v24.x/lib/console.js)
console
.Console.log(message?: any, ...optionalParams: any[]): void (+1 overload)
Prints to `stdout` with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)). ```js const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout ``` See [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args) for more information.
@sincev0.1.100
log
("Server deleted successfully");
}

Multi-toolkit servers

Combine multiple services in a single MCP server.

server = composio.mcp.create(
    name="productivity-suite",
    toolkits=[
        {"toolkit": "gmail", "auth_config": "ac_gmail"},
        {"toolkit": "slack", "auth_config": "ac_slack"},
        {"toolkit": "github", "auth_config": "ac_github"}
    ],
    allowed_tools=[
        "GMAIL_FETCH_EMAILS",
        "SLACK_SEND_MESSAGE",
        "GITHUB_CREATE_ISSUE"
    ]
)
const const server: MCPConfigCreateResponseserver = await const composio: Composio<OpenAIProvider>composio.Composio<OpenAIProvider>.mcp: MCP
Model Context Protocol server management
mcp
.
MCP.create(name: string, mcpConfig: {
    toolkits: (string | {
        toolkit?: string | undefined;
        authConfigId?: string | undefined;
    })[];
    allowedTools?: string[] | undefined;
    manuallyManageConnections?: boolean | undefined;
}): Promise<MCPConfigCreateResponse>
Create a new MCP configuration.
@paramparams - Parameters for creating the MCP configuration@paramparams.authConfig - Array of auth configurations with id and allowed tools@paramparams.options - Configuration options@paramparams.options.name - Unique name for the MCP configuration@paramparams.options.manuallyManageConnections - Whether to use chat-based authentication or manually connect accounts@returnsCreated server details with instance getter@example```typescript const server = await composio.mcpConfig.create("personal-mcp-server", { toolkits: ["github", "slack"], allowedTools: ["GMAIL_FETCH_EMAILS", "SLACK_SEND_MESSAGE"], manuallyManageConnections: false } }); const server = await composio.mcpConfig.create("personal-mcp-server", { toolkits: [{ toolkit: "gmail", authConfigId: "ac_243434343" }], allowedTools: ["GMAIL_FETCH_EMAILS"], manuallyManageConnections: false } }); ```
create
(
"productivity-suite", {
toolkits: (string | {
    toolkit?: string | undefined;
    authConfigId?: string | undefined;
})[]
toolkits
: [
{ authConfigId?: string | undefinedauthConfigId: "ac_gmail", toolkit?: string | undefinedtoolkit: "gmail" }, { authConfigId?: string | undefinedauthConfigId: "ac_slack", toolkit?: string | undefinedtoolkit: "slack" }, { authConfigId?: string | undefinedauthConfigId: "ac_github", toolkit?: string | undefinedtoolkit: "github" } ], allowedTools?: string[] | undefinedallowedTools: [ "GMAIL_FETCH_EMAILS", "SLACK_SEND_MESSAGE", "GITHUB_CREATE_ISSUE" ], manuallyManageConnections?: boolean | undefinedmanuallyManageConnections: false } );

Generate user URLs

After creating a server, generate unique URLs for each user.

# Generate instance for user
instance = server.generate("user@example.com")

print(f"URL: {instance['url']}")
print(f"Tools: {instance['allowed_tools']}")

# Chat-based authentication is enabled by default
# Set manually_manage_connections=True to disable it:
instance_manual = server.generate(
    "user@example.com",
    manually_manage_connections=True
)
// Generate instance for user
const 
const instance: {
    name: string;
    type: "streamable_http";
    id: string;
    userId: string;
    allowedTools: string[];
    url: string;
    authConfigs: string[];
}
instance
= await const composio: Composio<OpenAIProvider>composio.Composio<OpenAIProvider>.mcp: MCP
Model Context Protocol server management
mcp
.
MCP.generate(userId: string, mcpConfigId: string, options?: {
    manuallyManageConnections?: boolean | undefined;
}): Promise<{
    name: string;
    type: "streamable_http";
    id: string;
    userId: string;
    allowedTools: string[];
    url: string;
    authConfigs: string[];
}>
Get server URLs for an existing MCP server. The response is wrapped according to the provider's specifications.
@example```typescript import { Composio } from "@composio/code"; const composio = new Composio(); const mcp = await composio.experimental.mcp.generate("default", "<mcp_config_id>"); ```@paramuserId external user id from your database for whom you want the server for@parammcpConfigId config id of the MCPConfig for which you want to create a server for@paramoptions additional options@paramoptions.isChatAuth Authenticate the users via chat when they use the MCP Server
generate
(
"user@example.com", "mcp_server_id" ); var console: Console
The `console` module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: * A `Console` class with methods such as `console.log()`, `console.error()` and `console.warn()` that can be used to write to any Node.js stream. * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdout) and [`process.stderr`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module. _**Warning**_: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v24.x/api/process.html#a-note-on-process-io) for more information. Example using the global `console`: ```js console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr ``` Example using the `Console` class: ```js const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err ```
@see[source](https://github.com/nodejs/node/blob/v24.x/lib/console.js)
console
.Console.log(message?: any, ...optionalParams: any[]): void (+1 overload)
Prints to `stdout` with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)). ```js const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout ``` See [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args) for more information.
@sincev0.1.100
log
("URL:",
const instance: {
    name: string;
    type: "streamable_http";
    id: string;
    userId: string;
    allowedTools: string[];
    url: string;
    authConfigs: string[];
}
instance
.url: stringurl);
var console: Console
The `console` module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: * A `Console` class with methods such as `console.log()`, `console.error()` and `console.warn()` that can be used to write to any Node.js stream. * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdout) and [`process.stderr`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module. _**Warning**_: The global console object's methods are neither consistently synchronous like the browser APIs they resemble, nor are they consistently asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v24.x/api/process.html#a-note-on-process-io) for more information. Example using the global `console`: ```js console.log('hello world'); // Prints: hello world, to stdout console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); // Prints error message and stack trace to stderr: // Error: Whoops, something bad happened // at [eval]:5:15 // at Script.runInThisContext (node:vm:132:18) // at Object.runInThisContext (node:vm:309:38) // at node:internal/process/execution:77:19 // at [eval]-wrapper:6:22 // at evalScript (node:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to stderr ``` Example using the `Console` class: ```js const out = getStreamSomehow(); const err = getStreamSomehow(); const myConsole = new console.Console(out, err); myConsole.log('hello world'); // Prints: hello world, to out myConsole.log('hello %s', 'world'); // Prints: hello world, to out myConsole.error(new Error('Whoops, something bad happened')); // Prints: [Error: Whoops, something bad happened], to err const name = 'Will Robinson'; myConsole.warn(`Danger ${name}! Danger!`); // Prints: Danger Will Robinson! Danger!, to err ```
@see[source](https://github.com/nodejs/node/blob/v24.x/lib/console.js)
console
.Console.log(message?: any, ...optionalParams: any[]): void (+1 overload)
Prints to `stdout` with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)). ```js const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout ``` See [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args) for more information.
@sincev0.1.100
log
("Tools:",
const instance: {
    name: string;
    type: "streamable_http";
    id: string;
    userId: string;
    allowedTools: string[];
    url: string;
    authConfigs: string[];
}
instance
.allowedTools: string[]allowedTools);
// Chat-based authentication is enabled by default // Set manuallyManageConnections: true to disable it: const
const instanceManual: {
    name: string;
    type: "streamable_http";
    id: string;
    userId: string;
    allowedTools: string[];
    url: string;
    authConfigs: string[];
}
instanceManual
= await const composio: Composio<OpenAIProvider>composio.Composio<OpenAIProvider>.mcp: MCP
Model Context Protocol server management
mcp
.
MCP.generate(userId: string, mcpConfigId: string, options?: {
    manuallyManageConnections?: boolean | undefined;
}): Promise<{
    name: string;
    type: "streamable_http";
    id: string;
    userId: string;
    allowedTools: string[];
    url: string;
    authConfigs: string[];
}>
Get server URLs for an existing MCP server. The response is wrapped according to the provider's specifications.
@example```typescript import { Composio } from "@composio/code"; const composio = new Composio(); const mcp = await composio.experimental.mcp.generate("default", "<mcp_config_id>"); ```@paramuserId external user id from your database for whom you want the server for@parammcpConfigId config id of the MCPConfig for which you want to create a server for@paramoptions additional options@paramoptions.isChatAuth Authenticate the users via chat when they use the MCP Server
generate
(
"user@example.com", "mcp_server_id", { manuallyManageConnections?: boolean | undefinedmanuallyManageConnections: true } );

Chat-based authentication:

  • TypeScript: Enabled by default (set manuallyManageConnections=false or omit it)
  • Python: Enabled by default (set manually_manage_connections=False or omit it)

When enabled, the agent can authenticate users dynamically during conversation if they're missing required connections. Set manuallyManageConnections=true (TypeScript) or manually_manage_connections=True (Python) to disable it.

Best practices

  • Use descriptive names - Makes servers easy to find
  • Limit tools appropriately - Only include necessary tools
  • Reuse servers - Don't create duplicates for same configuration
  • Store server IDs - Keep track of created server IDs