create_mcp_server
Creates an MCP server under an existing integration, returning its new ID and slug for further configuration.
Instructions
Create an MCP server under an existing integration. Registers the server and returns the new id and slug; use list_mcp_integrations first to find the parent integration, then capabilities or access tools to configure it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Display name for the MCP server | |
| mcp_integration_id | Yes | ID or slug of the MCP integration this server belongs to | |
| slug | No | Custom slug. Auto-generated if omitted | |
| description | No | Description of the MCP server |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the tool call succeeded and returned structured data | |
| data | No | Structured success payload when ok is true | |
| error | No | Structured error payload when ok is false |
Implementation Reference
- src/tools/mcp-servers.tools.ts:175-197 (handler)The MCP tool handler for 'create_mcp_server'. Called when the tool is invoked; it calls the service layer's createMcpServer and returns the new id and slug.
server.tool( "create_mcp_server", "Create an MCP server under an existing integration. Registers the server and returns the new id and slug; use list_mcp_integrations first to find the parent integration, then capabilities or access tools to configure it.", MCP_SERVERS_TOOL_SCHEMAS.createMcpServer, async (params) => { const result = await service.mcpServers.createMcpServer(params); return { content: [ { type: "text", text: JSON.stringify( { message: `Successfully created MCP server "${params.name}"`, id: result.id, slug: result.slug, }, null, 2, ), }, ], }; }, - src/tools/mcp-servers.tools.ts:26-39 (schema)Zod schema for the create_mcp_server tool's input parameters (name, mcp_integration_id, slug?, description?).
createMcpServer: { name: z.string().describe("Display name for the MCP server"), mcp_integration_id: z .string() .describe("ID or slug of the MCP integration this server belongs to"), slug: z .string() .optional() .describe("Custom slug. Auto-generated if omitted"), description: z .string() .optional() .describe("Description of the MCP server"), }, - src/tools/mcp-servers.tools.ts:175-198 (registration)Registration of the create_mcp_server tool via server.tool() within registerMcpServersTools, which is called by registerAllTools in src/tools/index.ts.
server.tool( "create_mcp_server", "Create an MCP server under an existing integration. Registers the server and returns the new id and slug; use list_mcp_integrations first to find the parent integration, then capabilities or access tools to configure it.", MCP_SERVERS_TOOL_SCHEMAS.createMcpServer, async (params) => { const result = await service.mcpServers.createMcpServer(params); return { content: [ { type: "text", text: JSON.stringify( { message: `Successfully created MCP server "${params.name}"`, id: result.id, slug: result.slug, }, null, 2, ), }, ], }; }, ); - Service layer method that POSTs to /mcp-servers API endpoint to create an MCP server.
async createMcpServer( data: CreateMcpServerRequest, ): Promise<CreateMcpServerResponse> { return this.post<CreateMcpServerResponse>("/mcp-servers", data); } - Type definitions for the create MCP server request and response payloads.
export interface CreateMcpServerRequest { name: string; mcp_integration_id: string; slug?: string; description?: string; } export interface CreateMcpServerResponse { id: string; slug: string; }