McpHttpServer#

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

class zett_agent.extensions.mcp.McpHttpServer(name, url, headers=<factory>)[源代码]#

Configure one MCP server reached through Streamable HTTP.

参数:
  • name (str)

  • url (str)

  • headers (Mapping[str, str])

name#

Unique server namespace used when registering its tools.

Type:

str

url#

Non-empty Streamable HTTP endpoint; credentials/routing are the application's responsibility.

Type:

str

headers#

HTTP headers sent during handshake, tool calls, streaming, and session termination. The mapping is excluded from repr so authorization values are not accidentally written to logs.

Type:

collections.abc.Mapping[str, str]