Class McpStdioServerDefinition

McpStdioServerDefinition represents an MCP server available by running a local process and operating on its stdin and stdout streams. The process will be spawned as a child process of the extension host and by default will not run in a shell environment.

Constructors

Properties

Constructors

  • Parameters

    • label: string

      The human-readable name of the server.

    • command: string

      The command used to start the server.

    • Optional args: string[]

      Additional command-line arguments passed to the server.

    • Optional env: Record<string, null | string | number>

      Optional additional environment information for the server.

    • Optional version: string

      Optional version identification for the server.

    Returns McpStdioServerDefinition

Properties

args: string[]

Additional command-line arguments passed to the server.

command: string

The command used to start the server. Node.js-based servers may use process.execPath to use the editor's version of Node.js to run the script.

cwd?: Uri

The working directory used to start the server.

env: Record<string, null | string | number>

Optional additional environment information for the server. Variables in this environment will overwrite or remove (if null) the default environment variables of the editor's extension host.

label: string

The human-readable name of the server.

version?: string

Optional version identification for the server. If this changes, the editor will indicate that tools have changed and prompt to refresh them.