Reflect MCP Server Implements Reflexion Paper for Persistent Coding Agent Memory

A developer has implemented the Reflexion paper (Shinn et al., NeurIPS 2023) as an MCP server to address a common problem with local coding agents: lack of persistent memory between sessions. The tool, called reflect-mcp, allows agents to remember and avoid repeating mistakes.
How It Works
The system operates through a structured workflow:
- After every test failure, the agent critiques its own work and extracts patterns from the error
- These lessons are stored for future reference
- Before starting new tasks, the agent recalls past lessons using full-text search
- The pattern matching is fully regex-based - no LLM calls are needed for classification
The developer notes that error messages are predictable enough for deterministic matching to work effectively. The agent writes the critique since it has the context, while the server handles structuring and deduplication of the lessons.
Technical Implementation
- Built as an MCP (Model Context Protocol) server
- Uses SQLite with FTS5 for storage and search
- Works with any MCP-compatible client
- Install via:
cargo install reflect-mcp
Results After One Week
The developer reported several improvements in their coding agent's behavior:
- Stopped doing the same
unwrap()on user input - Stopped forgetting timezone handling
- Started avoiding previously seen failure patterns automatically
- Pattern tracking made recurring mistakes across the project visible
The project is available on GitHub at https://github.com/rohansx/reflect. The developer is seeking feedback from others who have experimented with persistent memory setups for local coding agents.
📖 Read the full source: r/LocalLLaMA
👀 See Also

Rails-AI-Context Gem Provides Claude Code with Complete Rails App Model via MCP
The rails-ai-context gem auto-introspects Rails applications and exposes 39 tools via MCP, allowing Claude Code to query specific app details like schema with encrypted columns, model associations, routes, Stimulus wiring, and Turbo mappings instead of reading entire files.

StartClaw: A headless browser automation tool built on ZeroClaw with Claude integration
StartClaw is a browser automation tool built on ZeroClaw's Rust base with Composio v3 for integrations, designed to run headless in the cloud without requiring local hardware. It uses Claude exclusively for reliability and includes built-in context compaction that reduces token usage by ~5x.

cxt: A CLI/TUI Tool to Aggregate Code Files into One Clipboard Block for Claude
cxt aggregates entire directories and specific files into a single clipboard-ready block with XML tags and file paths, making it easier for Claude to understand your codebase context.

BetterClaw vs OpenClaw: Comparing Tool Calling, Structured Outputs, and Workflow Control
A developer-focused comparison of BetterClaw and OpenClaw covering tool calling, structured outputs, workflow control, and day-to-day agent development.