// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../../core/resource'; import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; /** * MCP server management */ export class Custom extends APIResource { /** * Creates a new Model Control Protocol (MCP) server instance that can integrate * with multiple applications or toolkits simultaneously. This endpoint allows you * to create a server that can access tools from different applications, making it * suitable for complex workflows that span multiple services. * * @example * ```ts * const custom = await client.mcp.custom.create({ * name: 'Development Integration Server', * toolkits: ['github', 'jira'], * }); * ``` */ create(body: CustomCreateParams, options?: RequestOptions): APIPromise { return this._client.post('/api/v3.1/mcp/servers/custom', { body, ...options }); } } /** * Response for a successfully created custom MCP server with multiple applications */ export interface CustomCreateResponse { /** * Unique identifier for the newly created custom MCP server */ id: string; /** * List of tool identifiers that are enabled for this server */ allowed_tools: Array; /** * ID references to the auth configurations used by this server */ auth_config_ids: Array; /** * Set of command line instructions for connecting various clients to this MCP * server */ commands: CustomCreateResponse.Commands; /** * URL endpoint for establishing connection to this MCP server */ mcp_url: string; /** * Human-readable name of the custom MCP server */ name: string; } export namespace CustomCreateResponse { /** * Set of command line instructions for connecting various clients to this MCP * server */ export interface Commands { /** * Command line instruction for Claude client setup */ claude: string; /** * Command line instruction for Cursor client setup */ cursor: string; /** * Command line instruction for Windsurf client setup */ windsurf: string; } } export interface CustomCreateParams { /** * Human-readable name to identify this custom MCP server (4-30 characters, * alphanumeric, spaces, and hyphens only) */ name: string; /** * Tool identifiers to enable that aren't part of standard toolkits */ allowed_tools?: Array; /** * ID references to existing authentication configurations */ auth_config_ids?: Array; /** * DEPRECATED: Use allowed_tools instead. Tool identifiers to enable that aren't * part of standard toolkits */ custom_tools?: Array; /** * Whether to manage authentication via Composio */ managed_auth_via_composio?: boolean; /** * List of application/toolkit identifiers to enable for this server */ toolkits?: Array; } export declare namespace Custom { export { type CustomCreateResponse as CustomCreateResponse, type CustomCreateParams as CustomCreateParams }; }