Streamable HTTP Calculator
0
Demonstrates building a stateful Model Context Protocol server with Streamable HTTP, featuring persistent sessions, full connection resumability, and an in-memory event store.
About
This repository provides a reference implementation of a stateful Model Context Protocol (MCP) calculator server using the Streamable HTTP transport. Engineered to demonstrate an enterprise-grade, session-based architecture, it features persistent state, event replay for full stream resumability, and support for complex, multi-step workflows, making it a robust solution for resilient client-server applications.
Key Features
- Implements an in-memory event store for audit trails and resumability
- Utilizes a single, consistent `/mcp` endpoint for all communication
- 0 GitHub stars
- Maintains persistent server-side state for each client session (30-minute inactivity timeout)
- Enables full connection resumability using `Last-Event-Id` with event replay
- Provides comprehensive calculator functionalities with session-scoped history and interactive tutoring
Use Cases
- Building enterprise APIs requiring robust state management
- Developing complex interactive workflows with guaranteed message delivery
- Creating financial applications needing resilient communication