
Statecli
StateCLI adds memory and undo capabilities to AI agents through five core MCP tools: track, replay, undo, checkpoint, and log. When your agent makes a breaking change, you can call statecli_undo to roll back instantly. Before risky operations, statecli_checkpoint creates a restore point. The statecli_replay tool shows exactly what changed and when, solving the common problem of agents losing track of their own modifications. It includes statecli_analyze_error for diagnosing failures by examining action history, and statecli_safe_execute to wrap operations in automatic checkpoint and rollback logic. Under the hood it watches file changes and maintains a reversible event log. Install via npx, point it at your codebase with watch mode, and agents gain persistent memory of their actions.
- tools
- 26
- transport
- STDIO
- last updated
- Jan 8, 2026
Tools
26 toolsPublic tool metadata for what this MCP can expose to an agent.
statecli_replayReplays the full history of actions taken on any entity — a file, a session, a task.
Replays the full history of actions taken on any entity — a file, a session, a task.
No parameter schema in public metadata yet.
statecli_undoReverses the last action or a named action on an entity, restoring it to its previous state.
Reverses the last action or a named action on an entity, restoring it to its previous state.
No parameter schema in public metadata yet.
statecli_checkpointCreates a named, reversible snapshot of an entity's current state.
Creates a named, reversible snapshot of an entity's current state.
No parameter schema in public metadata yet.
statecli_logWrites a structured audit entry describing what the agent did, why, and what state it left things in.
Writes a structured audit entry describing what the agent did, why, and what state it left things in.
No parameter schema in public metadata yet.
statecli_trackRecords any agent action with full metadata so it can be replayed, audited, or reversed later.
Records any agent action with full metadata so it can be replayed, audited, or reversed later.
No parameter schema in public metadata yet.
statecli_track_fileBegins continuous monitoring of a specific file, capturing every write, modification, and deletion with timestamps.
Begins continuous monitoring of a specific file, capturing every write, modification, and deletion with timestamps.
No parameter schema in public metadata yet.
statecli_file_historyReturns the complete change history of a tracked file — every version, every diff, every agent that touched it.
Returns the complete change history of a tracked file — every version, every diff, every agent that touched it.
No parameter schema in public metadata yet.
statecli_analyze_errorAnalyzes an error by examining recent action history to identify what change caused it.
Analyzes an error by examining recent action history to identify what change caused it.
No parameter schema in public metadata yet.
statecli_auto_recoverAutomatically attempts to recover from an error by reversing the change that caused it and restoring the last known good state.
Automatically attempts to recover from an error by reversing the change that caused it and restoring the last known good state.
No parameter schema in public metadata yet.
statecli_safe_executeWraps any operation in automatic checkpoint-before and undo-on-failure logic.
Wraps any operation in automatic checkpoint-before and undo-on-failure logic.
No parameter schema in public metadata yet.
statecli_run_testsRuns the relevant test suite and records pass/fail history against the current state.
Runs the relevant test suite and records pass/fail history against the current state.
No parameter schema in public metadata yet.
statecli_test_impactIdentifies exactly which tests are affected by your changes — so you run the right tests, not all tests.
Identifies exactly which tests are affected by your changes — so you run the right tests, not all tests.
No parameter schema in public metadata yet.
statecli_suggest_testsAnalyzes your change and suggests new tests that should be written to cover it.
Analyzes your change and suggests new tests that should be written to cover it.
No parameter schema in public metadata yet.
statecli_analyze_dependenciesScans a file or module and returns all upstream and downstream dependencies.
Scans a file or module and returns all upstream and downstream dependencies.
No parameter schema in public metadata yet.
statecli_dependency_treeReturns a full dependency tree for a module — all the way up and down the import chain.
Returns a full dependency tree for a module — all the way up and down the import chain.
No parameter schema in public metadata yet.
statecli_find_circularDetects circular dependencies that could cause import errors or infinite loops.
Detects circular dependencies that could cause import errors or infinite loops.
No parameter schema in public metadata yet.
statecli_predict_impactPredicts which files, services, and systems will be affected by a proposed change — before you make it.
Predicts which files, services, and systems will be affected by a proposed change — before you make it.
No parameter schema in public metadata yet.
statecli_is_safeQuick safety check — returns true/false on whether a proposed action is safe to execute without a checkpoint.
Quick safety check — returns true/false on whether a proposed action is safe to execute without a checkpoint.
No parameter schema in public metadata yet.
statecli_preview_undoShows exactly what will change if you call statecli_undo() — without actually doing it.
Shows exactly what will change if you call statecli_undo() — without actually doing it.
No parameter schema in public metadata yet.
statecli_memory_queryQueries memory across sessions to answer historical questions.
Queries memory across sessions to answer historical questions.
No parameter schema in public metadata yet.
statecli_recent_activityReturns a structured summary of recent actions across the project.
Returns a structured summary of recent actions across the project.
No parameter schema in public metadata yet.
statecli_session_infoReturns metadata about current and past working sessions.
Returns metadata about current and past working sessions.
No parameter schema in public metadata yet.
statecli_git_statusRetrieves and tracks current git branch and uncommitted changes.
Retrieves and tracks current git branch and uncommitted changes.
No parameter schema in public metadata yet.
statecli_git_historyCompares changes between git commits.
Compares changes between git commits.
No parameter schema in public metadata yet.
statecli_git_checkpointCreates a checkpoint anchored to current git state.
Creates a checkpoint anchored to current git state.
No parameter schema in public metadata yet.
statecli_simulate_undoSimulates an undo operation
Simulates an undo operation
No parameter schema in public metadata yet.
Sponsors
Readme
StateCLI - Memory + Self-Awareness Layer for AI Agents
Give AI agents the ability to remember, replay, and undo their actions.
Agent Infrastructure | Memory Layer | Self-Awareness | Undo Capability
What This Is
StateCLI is the memory and self-awareness layer for AI coding agents.
It gives agents three critical capabilities they lack:
🧠 Memory - Remember what they did (log, replay)
⏮️ Undo - Fix mistakes instantly (checkpoint, rollback)
👁️ Self-Awareness - See their impact (track changes)
This isn't a dev tool. It's agent infrastructure.
Why AI Agents Need This
AI agents are powerful but blind. They:
- ❌ Don't remember what they just changed
- ❌ Can't undo when they break things
- ❌ Have no awareness of their impact
StateCLI fixes this:
Agent Thought: "I changed something but don't know what"
→ statecli_replay(entity) → See exact changes
Agent Thought: "I broke something and need to undo"
→ statecli_undo(entity) → Rollback instantly
Agent Thought: "I want to try something risky"
→ statecli_checkpoint(entity) → Save first, rollback if needed
Details
- Repository
- github.com/statecli/mcp-server
- Package
statecli-mcp-server- Transport
- STDIO
- Registry
- MCP registry, active