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.

Online Documentation

Constructors

Link copied to clipboard
constructor(label: String, command: String, args: ReadonlyArray<JsString> = definedExternally, env: ReadonlyRecord<JsString, JsString?> = definedExternally, version: String = definedExternally)

Properties

Link copied to clipboard
external var args: ReadonlyArray<JsString>

Additional command-line arguments passed to the server.

Link copied to clipboard
external var 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.

Link copied to clipboard
external var cwd: Uri?

The working directory used to start the server.

Link copied to clipboard
external var env: ReadonlyRecord<JsString, JsString?>

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.

Link copied to clipboard
external val label: String

The human-readable name of the server.

Link copied to clipboard
external var version: String?

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