Statecli MCP Server

State replay and self-debugging for AI agents. Track, replay, undo, checkpoint.

Local serverstdio

What is the Statecli MCP server?

Statecli MCP server is a locally run integration for AI assistants that speak the Model Context Protocol. State replay and self-debugging for AI agents. Track, replay, undo, checkpoint.

What you get

StateCLI is the memory and self-awareness layer for AI coding agents.

  • ❌ Don't remember what they just changed
  • ❌ Can't undo when they break things
  • ❌ Have no awareness of their impact

What the assistant can call

Once Statecli is connected, these are the calls the assistant has available:

  • statecli_replay — Show what the agent just did
  • statecli_undo — Rollback mistakes
  • statecli_checkpoint — Save state before risky ops
  • statecli_log — View complete history
  • statecli_track — Track important state changes
  • statecli_track_file — [FILE] Begins continuous monitoring of a specific file, capturing every write, modification, and deletion with timestamps. Call before touching any
  • statecli_file_history — [FILE] Returns the complete change history of a tracked file — every version, every diff, every agent that touched it. Use this before editing a file
  • statecli_analyze_error — [ERROR] Analyzes an error by examining recent action history to identify what change caused it. Call this BEFORE attempting any fix. Never guess at
  • statecli_auto_recover — [ERROR] Automatically attempts to recover from an error by reversing the change that caused it and restoring the last known good state. Call after
  • statecli_safe_execute — [ERROR] Wraps any operation in automatic checkpoint-before and undo-on-failure logic. The safest way to execute any risky action. If the operation
  • statecli_run_tests — [TEST] Runs the relevant test suite and records pass/fail history against the current state. Call after any code change to verify nothing broke
  • statecli_test_impact — [TEST] Identifies exactly which tests are affected by your changes — so you run the right tests, not all tests. Returns a prioritized list of tests

Setting it up

Installation goes through your MCP client rather than a global install: point it at statecli-mcp-server on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.

Choosing this one

This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Statecli's toolset — statecli_replay, statecli_undo, statecli_checkpoint and 11 more — is a fair guide to whether it matches your workflow. It is maintained by charo360; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against Statecli's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Before you rely on it

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Statecli.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the statecli mcp server does with a few real requests.

Available tools

ToolWhat it does
statecli_replayShow what the agent just did
statecli_undoRollback mistakes
statecli_checkpointSave state before risky ops
statecli_logView complete history
statecli_trackTrack important state changes
statecli_track_file[FILE] Begins continuous monitoring of a specific file, capturing every write, modification, and deletion with timestamps. Call before touching any important file. Without this, file changes are invisible to the undo sys
statecli_file_history[FILE] Returns the complete change history of a tracked file — every version, every diff, every agent that touched it. Use this before editing a file to understand its current state and avoid overwriting important change
statecli_analyze_error[ERROR] Analyzes an error by examining recent action history to identify what change caused it. Call this BEFORE attempting any fix. Never guess at the cause of an error — analyze it first. Returns probable cause and sug
statecli_auto_recover[ERROR] Automatically attempts to recover from an error by reversing the change that caused it and restoring the last known good state. Call after statecli_analyze_error() confirms the root cause. Faster and safer than m
statecli_safe_execute[ERROR] Wraps any operation in automatic checkpoint-before and undo-on-failure logic. The safest way to execute any risky action. If the operation fails, it automatically reverts. Use this for any action you're uncertain
statecli_run_tests[TEST] Runs the relevant test suite and records pass/fail history against the current state. Call after any code change to verify nothing broke. Tracks test results over time so you can see when tests started failing. 🔔
statecli_test_impact[TEST] Identifies exactly which tests are affected by your changes — so you run the right tests, not all tests. Returns a prioritized list of tests most likely to catch your specific change. Saves time, catches errors fa
statecli_suggest_tests[TEST] Analyzes your change and suggests new tests that should be written to cover it. Call after adding new functionality. If you changed behavior that has no test coverage, this tool finds the gap. 🔔 Trigger when: Aft
statecli_analyze_dependencies[DEPS] Scans a file or module and returns all upstream and downstream dependencies — what it depends on and what depends on it. Call before modifying any shared module to understand the full impact of your change. 🔔 Tri

How to install the Statecli MCP server

{
  "mcpServers": {
    "statecli": {
      "command": "npx",
      "args": ["-y", "statecli-mcp-server"]
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Example prompts to try

  • Use Statecli to statecli replay.
  • Use Statecli to statecli undo.
  • Use Statecli to statecli checkpoint.

Frequently asked questions

It connects Statecli to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (statecli_replay, statecli_undo, statecli_checkpoint, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Statecli directly.