类class
agentscope.mcpHttpMCPConfig
class HttpMCPConfig(BaseModel)
源码Source
agentscope/mcp/_config.py:44–64HTTP MCP 服务端配置。位于 agentscope.mcp 包。
The HTTP MCP server configuration. Declared in agentscope.mcp.
属性摘要Attribute Summary
| 属性Attribute | 类型Type | 说明Description | 值Value |
|---|---|---|---|
type | Literal['http_mcp'] | 类型字段。 | 'http_mcp' |
url | str | MCP 服务端的URL。 | Field(title='URL', description='The URL of the MCP server.') |
headers | dict[str, str] | None | 请求头字段。 | Field(title='Headers', description='The additional headers to include in the HTTP request.', default=None) |
timeout | float | None | HTTP 请求超时 in 秒。 | Field(title='Timeout', description='The HTTP request timeout in seconds.', default=30.0) |
属性详情Attribute Detail
type
Literal['http_mcp'] = 'http_mcp'类型字段。声明为 Literal['http_mcp']。
The type field.
源码Source
agentscope/mcp/_config.py:47url
str = Field(title='URL', description='The URL of the MCP server.')MCP 服务端的URL。
The URL of the MCP server.
源码Source
agentscope/mcp/_config.py:49headers
dict[str, str] | None = Field(title='Headers', description='The additional headers to include in the HTTP request.', default=None)请求头字段。声明为 dict[str, str] | None。
The additional headers to include in the HTTP request.
源码Source
agentscope/mcp/_config.py:54timeout
float | None = Field(title='Timeout', description='The HTTP request timeout in seconds.', default=30.0)HTTP 请求超时 in 秒。
The HTTP request timeout in seconds.
源码Source
agentscope/mcp/_config.py:60