examples/servers/simple-streamablehttp-stateless/README.md
A stateless MCP server example demonstrating the StreamableHttp transport without maintaining session state. This example is ideal for understanding how to deploy MCP servers in multi-node environments where requests can be routed to any instance.
Start the server:
# Using default port 3000
uv run mcp-simple-streamablehttp-stateless
# Using custom port
uv run mcp-simple-streamablehttp-stateless --port 3000
# Custom logging level
uv run mcp-simple-streamablehttp-stateless --log-level DEBUG
# Enable JSON responses instead of SSE streams
uv run mcp-simple-streamablehttp-stateless --json-response
The server exposes a tool named "start-notification-stream" that accepts three arguments:
interval: Time between notifications in seconds (e.g., 1.0)count: Number of notifications to send (e.g., 5)caller: Identifier string for the callerYou can connect to this server using an HTTP client. For now, only the TypeScript SDK has streamable HTTP client examples, or you can use Inspector for testing.