statescope-mcp
v0.2.0
Published
MCP server that exposes a running frontend's live Zustand & TanStack Query state to AI agents. Run with: npx statescope-mcp
Downloads
192
Maintainers
Readme
statescope-mcp
MCP server for statescope-mcp. Exposes a running frontend's live Zustand and TanStack Query state to AI coding agents, so they answer from exact runtime facts instead of guessing from code.
Run with zero install:
npx statescope-mcp # default port 7878
npx statescope-mcp --port 9000Register it with your agent (Claude Code / Cursor):
{
"mcpServers": {
"statescope": { "command": "npx", "args": ["-y", "statescope-mcp"] }
}
}One process, two interfaces: a stdio MCP server for the agent and a 127.0.0.1 WebSocket listener the browser app (via statescope) dials into.
Tools
Read: list_sources · get_state (JSON-Pointer path) · find_state · get_query_cache · capture_snapshot · diff_snapshots
Write (Zustand, dev-only, token-gated): patch_state · restore_snapshot
All return { ok, data | error }. Call list_sources first to discover connectionId / sourceId. Full docs in the repo README.
License
MIT
