AS AgentScopeAPI 手册 / API Reference
类class agentscope.mcp

HttpMCPConfig

class HttpMCPConfig(BaseModel)
源码Source agentscope/mcp/_config.py:44–64

HTTP MCP 服务端配置。位于 agentscope.mcp 包。

The HTTP MCP server configuration. Declared in agentscope.mcp.

属性摘要Attribute Summary

属性Attribute类型Type说明Description值Value
typeLiteral['http_mcp']
类型字段。
'http_mcp'
urlstr
MCP 服务端的URL。
Field(title='URL', description='The URL of the MCP server.')
headersdict[str, str] | None
请求头字段。
Field(title='Headers', description='The additional headers to include in the HTTP request.', default=None)
timeoutfloat | 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:47

url

str = Field(title='URL', description='The URL of the MCP server.')

MCP 服务端的URL。

The URL of the MCP server.

源码Source agentscope/mcp/_config.py:49

headers

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:54

timeout

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
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.