agentle.mcp.servers.sse_mcp_serverΒΆ

Server-Sent Events (SSE) implementation of the Model Context Protocol (MCP) server client.

FIXED VERSION for aiohttp with proper SSE protocol implementation: - Correct endpoint discovery mechanism - Proper sessionId handling in POST requests (FIXED: No duplicate sessionId parameters) - Fixed SSE parsing for aiohttp - Connection state management fixes - Proper protocol implementation matching the Node.js server

Functions

Field()

!!! abstract "Usage Documentation"

PrivateAttr()

!!! abstract "Usage Documentation"

parse_qs(qs[, keep_blank_values, ...])

Parse a query given as a string argument.

urljoin(base, url[, allow_fragments])

Join a base URL and a possibly relative URL to form an absolute interpretation of the latter.

urlparse(url[, scheme, allow_fragments])

Parse a URL into 6 components: <scheme>://<netloc>/<path>;<params>?<query>#<fragment>

Classes

Any(*args, **kwargs)

Special type indicating an unconstrained type.

AsyncIterator()

Callable()

InMemorySessionManager()

Thread-safe in-memory implementation of the SessionManager interface.

MCPServerProtocol()

Abstract base class defining the protocol for MCP servers.

MutableMapping()

A MutableMapping is a generic container for associating key/value pairs.

SSEMCPServer(*, server_name, server_url[, ...])

Server-Sent Events (SSE) implementation of the MCP (Model Context Protocol) server client.

Sequence()

All the operations on a read-only sequence.

SessionManager()

Abstract base class for MCP session management.