Skip to content

StdioMcpOptions

Namespace: Vercel.AI.Mcp

public sealed class StdioMcpOptions

How to start an MCP stdio server. Mirrors the upstream StdioConfig.

Inheritance: object

View source

public StdioMcpOptions(string command)

Creates options for <code class=“paramref”>command</code>.

Parameters

Name Type Description
command string

View source

public IReadOnlyList<string>? Arguments { get; set; }

Command arguments.

Value: IReadOnlyList<string>

View source

public string Command { get; }

Executable to start.

Value: string

View source

public IReadOnlyDictionary<string, string>? Environment { get; set; }

Extra environment variables. The child gets these plus a small set of safe inherited variables.

Value: IReadOnlyDictionary<string, string>

View source

public bool RedirectStandardError { get; set; }

True pipes stderr to StandardError. False lets the child inherit it.

Value: bool

View source

public bool Shell { get; set; }

True runs the command through a shell (/bin/sh -c, or cmd.exe /d /s /c on Windows), so command shims such as the Windows npx work. Arguments are joined with spaces and are not quoted. Mirrors the upstream shell option.

Value: bool

View source

public string? ShellPath { get; set; }

The shell executable to use. Setting it implies Shell. Mirrors the upstream shell string.

Value: string

View source

public string? WorkingDirectory { get; set; }

Working directory. Null uses the current directory.

Value: string

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product