McpStdioServer#

Build extensions, choose hooks, and manage request-scoped state. See the guide.

class zett_agent.extensions.mcp.McpStdioServer(name, command, args=(), env=None, cwd=None)[源代码]#

Configure one local MCP server launched as a child process.

参数:
  • name (str)

  • command (str)

  • args (tuple[str, ...])

  • env (Mapping[str, str] | None)

  • cwd (str | Path | None)

name#

Unique server namespace used when registering its tools.

Type:

str

command#

Executable used to start the server.

Type:

str

args#

Command arguments passed without shell-string interpolation.

Type:

tuple[str, ...]

env#

Optional environment mapping supplied to the MCP process adapter.

Type:

collections.abc.Mapping[str, str] | None

cwd#

Optional working directory for the server process.

Type:

str | pathlib.Path | None

警告

Only launch trusted servers with appropriate process permissions.