HttpSseTransport class
An MCP transport that exposes ApolloMcpServer over HTTP using the Server-Sent Events (SSE) transport:
GET /sseopens an SSE stream. The first event (event: endpoint) tells the client which URL to POST messages to (/message?sessionId=...). Server→client JSON-RPC messages are streamed asevent: messageframes.POST /message?sessionId=...delivers one client→server JSON-RPC message; the server replies over the session's SSE stream. Returns202 Accepted.
SECURITY: binds to 127.0.0.1 by default. Exposing this on a public
interface grants unauthenticated code execution — front it with auth/TLS
and an explicit host only in a trusted environment.
Constructors
- HttpSseTransport({McpLimits limits = const McpLimits(), RepositoryAdapter? repository, RepoConfig repoConfig = const RepoConfig()})
Properties
- address → InternetAddress?
-
The bound address, available after start.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- limits → McpLimits
-
final
- port → int?
-
The bound port, available after start.
no setter
- repoConfig → RepoConfig
-
final
- repository → RepositoryAdapter?
-
Optional workspace/repository backend shared by all sessions (exposes the
apollovm.fs.*/search.*/code.*/git.*tools when set).final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
start(
{int port = 8080, String host = '127.0.0.1'}) → Future< void> -
Binds an HttpServer on
host:portand starts serving. -
stop(
) → Future< void> - Stops the server and closes all active sessions.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited