mcp-use TypeScript API
    Preparing search index...

    Interface StdioServerConfig

    Configures a local MCP server launched over standard input and output.

    interface StdioServerConfig {
        args: string[];
        clientInfo?: ClientInfo;
        clientOptions?: ClientOptions;
        command: string;
        cwd?: string;
        defaultRequestOptions?: RequestOptions;
        env?: Record<string, string>;
        onElicitation?: OnElicitationCallback;
        onNotification?: OnNotificationCallback;
        onSampling?: OnSamplingCallback;
        protocolNegotiation?: VersionNegotiationMode;
        roots?: {}[];
    }

    Hierarchy

    • BaseServerConfig
      • StdioServerConfig
    Index
    args: string[]

    Arguments passed to StdioServerConfig.command.

    clientInfo?: ClientInfo

    Client identity advertised to the server.

    clientOptions?: ClientOptions

    Options forwarded to the official MCP SDK Client.

    command: string

    Executable used to start the server.

    cwd?: string

    Working directory used to launch the server process.

    defaultRequestOptions?: RequestOptions

    Default timeout/cancellation options for requests.

    env?: Record<string, string>

    Environment variables merged with the current process environment.

    onElicitation?: OnElicitationCallback

    Callback for elicitation requests from servers.

    onNotification?: OnNotificationCallback

    Callback for notifications from servers.

    onSampling?: OnSamplingCallback

    Callback for sampling input.

    Sampling is deprecated by the 2026 protocol. Retained for v1 push requests and the v2 input_required compatibility window.

    protocolNegotiation?: VersionNegotiationMode

    Protocol version negotiation mode. Defaults to "legacy" for stdio (the SDK advises against probing for spawn-per-invocation tools). See StdioConnector.

    roots?: {}[]

    Initial roots advertised to the server.