Skip to content

SseMcpServer

Base classes

Name Children Inherits
BaseMcpServer
aclientp.schema.mcp
MCP server base class.

⋔ Inheritance diagram

graph TD
  95970859914736["mcp.SseMcpServer"]
  95970858786304["mcp.BaseMcpServer"]
  95970862258240["base.AnnotatedObject"]
  95970862254416["base.Schema"]
  95970851503232["main.BaseModel"]
  125067848591872["builtins.object"]
  95970858786304 --> 95970859914736
  95970862258240 --> 95970858786304
  95970862254416 --> 95970862258240
  95970851503232 --> 95970862254416
  125067848591872 --> 95970851503232

🛈 DocStrings

Bases: BaseMcpServer

SSE transport configuration.

Only available when the Agent capabilities indicate mcp_capabilities.sse is true.

Source code in src/aclientp/schema/mcp.py
class SseMcpServer(BaseMcpServer):
    """SSE transport configuration.

    Only available when the Agent capabilities indicate `mcp_capabilities.sse` is `true`.
    """

    headers: Sequence[HttpHeader]
    """HTTP headers to set when making requests to the MCP server."""

    type: Literal["sse"] = Field(default="sse", init=False)
    """SSE transport type."""

    url: HttpUrl
    """URL to the MCP server."""

    def get_headers_dict(self) -> dict[str, str]:
        return {header.name: header.value for header in self.headers}

headers instance-attribute

headers: Sequence[HttpHeader]

HTTP headers to set when making requests to the MCP server.

type class-attribute instance-attribute

type: Literal['sse'] = Field(default='sse', init=False)

SSE transport type.

url instance-attribute

url: HttpUrl

URL to the MCP server.

:fa-brands-github: Show source on GitHub