rohansx/reflect
Self-correction engine for AI coding agents - implements the Reflexion paper (Shinn et al., 2023) as a Rust MCP server. Turns failures into persistent, searchable lessons that prevent the same mistakes across sessions.
Platform-specific configuration:
{
"mcpServers": {
"reflect": {
"command": "npx",
"args": [
"-y",
"reflect"
]
}
}
}Add the config above to .claude/settings.json under the mcpServers key.
[](https://crates.io/crates/reflect-mcp) [](LICENSE)
Self-correction engine for AI coding agents. An MCP server that implements the Reflexion pattern — turning agent failures into persistent, searchable lessons that prevent the same mistakes across sessions.
cargo install reflect-mcp<p align="center"> </p>
AI coding agents make mistakes, get corrected, and then make the exact same mistakes in the next session. Context resets wipe everything. There's no memory of what went wrong, what was learned, or which error patterns keep recurring.
reflect closes the loop from the Reflexion paper (Shinn et al., 2023):
generate code → evaluate → critique → store lesson → recall next time → retry smarterUnlike the original paper which uses LLM self-reflection, reflect takes a hybrid approach:
rust-unwrap-on-parse, rust-index-oob), no LLM neededThis means reflect is fast, deterministic, and has zero LLM cost for the pattern matching layer, while still benefiting from the agent's reasoning for critique quality.
| Feature | reflect | Plain memory/RAG | LLM self-reflection | |---|---|---|---| | Structured error signals | Parses test output into typed signals | Stores raw text | N/A | | Pattern tracking | Counts occurrences, detects trends | No pattern awareness | No pers
Loading reviews...