Streamable HTTP Calculator icon

Streamable HTTP Calculator

Demonstrates building a stateful Model Context Protocol server with Streamable HTTP, featuring persistent sessions, full connection resumability, and an in-memory event store.

概要

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.

主な機能

  • 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

ユースケース

  • Building enterprise APIs requiring robust state management
  • Developing complex interactive workflows with guaranteed message delivery
  • Creating financial applications needing resilient communication
Advertisement

Advertisement