类class
agentscope.mcpStdioMCPConfig
class StdioMCPConfig(BaseModel)
源码Source
agentscope/mcp/_config.py:9–41stdio MCP 配置,保存相关配置项。位于 agentscope.mcp 包。
The STDIO MCP server configuration. Declared in agentscope.mcp.
属性摘要Attribute Summary
| 属性Attribute | 类型Type | 说明Description | 值Value |
|---|---|---|---|
type | Literal['stdio_mcp'] | 类型字段。 | 'stdio_mcp' |
command | str | 命令到启动 MCP 服务端。 | Field(title='Command', description='The command to start the MCP server.') |
args | list[str] | None | 参数字段。 | Field(title='Args', description='The command line arguments to pass to the MCP server.', default=None) |
env | dict[str, str] | None | `env` 字段。 | Field(title='Environment Variables', default=None, description='The environment variables to pass to the MCP server.') |
cwd | str | Path | None | `cwd` 字段。 | Field(default=None, title='CWD', description='The working directory to use when spawning the process.') |
encoding_error_handler | Literal['strict', 'ignore', 'replace'] | `encoding_error_handler` 字段。 | Field(default='strict', title='Encoding Error Handler', description='The text encoding error handler.') |
属性详情Attribute Detail
type
Literal['stdio_mcp'] = 'stdio_mcp'类型字段。声明为 Literal['stdio_mcp']。
The type field.
源码Source
agentscope/mcp/_config.py:12command
str = Field(title='Command', description='The command to start the MCP server.')命令到启动 MCP 服务端。
The command to start the MCP server.
源码Source
agentscope/mcp/_config.py:14args
list[str] | None = Field(title='Args', description='The command line arguments to pass to the MCP server.', default=None)参数字段。声明为 list[str] | None。
The command line arguments to pass to the MCP server.
源码Source
agentscope/mcp/_config.py:19env
dict[str, str] | None = Field(title='Environment Variables', default=None, description='The environment variables to pass to the MCP server.')env 字段。声明为 dict[str, str] | None。
The environment variables to pass to the MCP server.
源码Source
agentscope/mcp/_config.py:25cwd
str | Path | None = Field(default=None, title='CWD', description='The working directory to use when spawning the process.')cwd 字段。声明为 str | Path | None。
The working directory to use when spawning the process.
源码Source
agentscope/mcp/_config.py:31encoding_error_handler
Literal['strict', 'ignore', 'replace'] = Field(default='strict', title='Encoding Error Handler', description='The text encoding error handler.')encoding_error_handler 字段。声明为 Literal['strict', 'ignore', 'replace']。
The text encoding error handler.
源码Source
agentscope/mcp/_config.py:37