Case study

mcp-persist

Durable persistence for MCP servers · PyPI · v1.12.0 · MIT

The problem. The MCP Python SDK ships with an in-memory event store. It works until the first deploy. Restart the process and every client's Last-Event-ID points at history that no longer exists, so resumable SSE streams quietly stop being resumable. Add a second worker and it gets worse: each worker holds its own private history.

Interactive simulation of the SSE resume protocol. Kill the server with the in-memory store and events are lost; switch to mcp-persist and the missed events replay on reconnect.

The design. mcp-persist replaces that single point of loss with swappable, durable EventStore backends. Redis covers production fleets. SQLite covers single-node deployments. PostgreSQL slots into stacks that already run it. The Redis layout is built for replay. An INCR counter issues monotonic event IDs and the events themselves live in HASHes. A per-stream ZSET supports ranged reads so a reconnecting client can resume from any point. TTLs bound storage. A key_prefix namespace makes one Redis safe for many tenants.

Adoption. Shipped at v1.0.0 and versioned steadily forward through real usage: 8,000+ downloads on PyPI and confirmed production deployments. The test suite runs 300+ async tests against fakeredis and real backends, with CI across Python 3.10 through 3.13.

Positioning. mcp-persist plugs into the official SDK's EventStore interface, so it tracks upstream releases and existing servers adopt it unchanged. Where a server can't be modified at all, the PersistenceProxy adds durability from the outside.

from mcp_persist import with_persistence

mcp = FastMCP("my-server")
app = with_persistence(mcp, backend="redis", url="redis://localhost:6379")

Full adoption is two lines. For servers you can't modify, including servers that aren't written in Python, a standalone PersistenceProxy sits in front as an ASGI layer. It tracks the full SSE state machine and replays cold or hot history to any client that reconnects.

mcp-persist request and replay path An MCP client connects to a server or PersistenceProxy, which writes events to a durable EventStore backed by Redis, SQLite, or Postgres. On reconnect, the client sends Last-Event-ID and the store replays the missed events. MCP client SSE stream server / PersistenceProxy session manager EventStore Redis · SQLite Postgres Last-Event-ID replay

Shipped

Also shipped.

rag-timetravel

v1.1.0

Time-travel debugger for RAG retrieval pipelines. Pin any past query to the exact index version it ran against, replay retrieval, and diff what changed.

TokenDrift

v1.0.0

Tokenizer diffing for LLM upgrades. Measures token count shifts, cost deltas, vocabulary changes, and remapped IDs before they hit production.

Upstream

The ledger.

Selected pull requests into projects other people depend on. States are fetched from GitHub daily; the receipts link to the source.

State Repo Contribution Why it mattered Date Simulation
merged lightpanda-io/browser feat(webapi): implement W3C File API W3C File API surface implemented in Zig for an AI-agent headless browser. 2026-05-25
merged python/cpython gh-150311: Fix minor issues in configure.ac for the CYGWIN port Build-system fix accepted into the reference Python implementation. 2026-05-28
merged lance-format/lance feat(rust): support datafusion expressions for merge insert predicates DataFusion expressions for merge-insert predicates in a production columnar format. 2026-05-28
merged BerriAI/litellm fix(proxy): don't enforce budgets on model-discovery / info routes Stopped budget enforcement on model-discovery and info routes. 2026-06-02
merged lancedb/lancedb feat(rust): support datafusion expressions for merge insert predicates The same DataFusion capability carried into LanceDB's Rust core. 2026-06-03
merged lancedb/lancedb fix(python): run AsyncTable.search embeddings on a dedicated executor Moved embedding search onto a dedicated executor to stop event-loop stalls. 2026-06-05
merged lightpanda-io/browser Implement input type=file support (FileList, input.files/value, DOM.setFileInputFiles) Completed file-input support, from FileList through DOM.setFileInputFiles. 2026-06-05
merged BerriAI/litellm feat(proxy): add disable_budget_reservation general setting Added a proxy-wide setting to disable budget reservation. 2026-06-08
merged lancedb/lancedb fix(python): raise clear TypeError for bare List/Tuple in pydantic schema conversion Fixed opaque AttributeError for bare List/Tuple generics in Pydantic schema conversion, raising a clear TypeError instead. 2026-06-09
merged lancedb/lancedb fix(rust): return typed errors instead of panicking in Bedrock embedding path Replaced panic paths in the Bedrock embedding provider with typed error returns across serialization, API, and runtime failure modes. 2026-06-09
merged BerriAI/litellm fix(proxy): release max_parallel_requests slot when a stream is cancelled mid-flight Stopped a cancelled stream from stranding its max_parallel_requests slot, which had been pinning capped keys at their limit. 2026-06-11
merged BerriAI/litellm feat(proxy): surface max_input_tokens/max_output_tokens on /v1/models Surfaced max_input_tokens and max_output_tokens on /v1/models for accurate client-side capacity planning. 2026-06-13
merged BerriAI/litellm feat(proxy): serve Anthropic-native /v1/models for Claude Code gateway discovery Enabled Anthropic-native model discovery for Claude Code gateway deployments. 2026-06-13
merged lightpanda-io/browser feat(cdp): implement Browser.setDownloadBehavior file downloads Implemented Browser.setDownloadBehavior for CDP-driven file download automation. 2026-06-14
merged lance-format/lance fix: evaluate all list-element docs in FTS prefilter walk-the-allowlist branch Fixed incorrect evaluation of list-element docs in the FTS prefilter walk-the-allowlist branch. 2026-06-14
merged lance-format/lance fix: merge_insert silently drops matches when a leading payload column is all-null Critical fix: merge_insert silently dropped matched rows when the leading payload column was all-null. 2026-06-14
merged systemd/systemd sysupdate: refuse reboot/pending logic when --component= is used Fixed incorrect reboot/pending logic in sysupdate when --component= is used. First PR merged into systemd. 2026-06-15
merged BerriAI/litellm fix(openai): preserve cache_control for openai-compatible custom endpoints Preserved cache_control headers for OpenAI-compatible custom endpoints, fixing silent cache bypass. 2026-06-16

Everything else is on GitHub

Foundations

Systems groundwork.

Binary exploitation

Completed the CS:APP attack and bomb labs end to end, including the hidden phase and a full ROP chain. Then went past the assignment and reverse engineered the lab harnesses themselves with objdump and GDB.

Memory systems

Wrote an N-way set-associative cache simulator in C with LRU eviction, then used it to drive a cache-conscious matrix transpose. Valgrind traces guided the access patterns.

Research

RunixOS.

A capability-based, IPC-first microkernel OS written in Rust for x86_64, booting via UEFI on QEMU. The kernel implements capabilities with attenuation and revocation, a preemptible scheduler, synchronous and asynchronous IPC, and a capability-gated filesystem, all backing an interactive console with tracing and profiling tools. A companion research paper examines what preemption does to capability atomicity, tracing a real TOCTOU vulnerability from discovery through a working fix. The project is now the basis of an Operating Systems Independent Study, adapting classic process and thread coursework to a kernel with no shared memory and no ambient authority.

Now

Off the clock, sort of.

Home for the summer, building in the open: maintaining mcp-persist and landing pull requests across the AI data stack. This summer I'm interning remotely at a startup building an OpenRouter-style agentic platform, which runs mcp-persist in production. The lab next to my desk is a Fedora laptop running a 26B mixture-of-experts model through llama.cpp, wired to a filesystem MCP server, because the fastest way to find what breaks in MCP infrastructure is to live on it. In the fall I'm back at WPI teaching intro systems as a Peer Learning Assistant and serving as a Community Advisor in residence life. Before any of this I spent a decade teaching Shotokan karate as a second-degree black belt, which is where I learned to explain hard things patiently. I'm open to Summer 2027 internships in infrastructure and developer tooling.

Worcester, MA · EST · asandhu@wpi.edu

Terminal

Execute commands.

Query systems data, check server stats, or execute tasks interactively.

asandhu@wpi: ~ CONNECTED
WPI systems terminal v1.0.0. Type help to begin.
asandhu@wpi:~$

Get in touch.

Email is fastest. I read everything.

Colophon

Built by hand. Vanilla HTML and CSS with lightweight, zero-dependency JavaScript. No framework, no build step for the pages. PR statuses refresh daily through a GitHub Action that commits static JSON, so nothing on this page depends on a third-party API at view time. Type is IBM Plex. Hosted on GitHub Pages. Source

Lighthouse: run it yourself