Fix Memory MCP
Local-first error memory for AI coding agents, enabling them to search past fixes before attempting new repairs and save verified cases as Markdown.
README
Fix Memory MCP
Stop debugging the same error twice.
Fix Memory MCP is a local-first developer memory system for bugs.
AI coding agents are fast, but they often behave like they have no memory. They may fix a Python path issue today, then spend tokens rediscovering the same python.exe, venv, PATH, npm, build, deployment, or MCP setup issue three days later.
Fix Memory MCP gives Claude Code, Codex, Cursor-like agents, or any MCP client a curated memory of verified fixes. Before guessing, the agent can search your past bug fixes. After a real fix is verified, the agent can save the clean repair as a Markdown case.
In plain English: it is a debugging notebook for agents.
error appears
-> search previous fixes
-> reuse the closest repair pattern
-> fix and verify
-> save the new case
-> future agents get smarter
Why This Exists
AI agents are fast, but they often waste tokens rediscovering the same environment, dependency, build, path, MCP, or deployment bug.
Fix Memory MCP gives them a small long-term memory:
- Local Markdown cases you can read and edit
- Hybrid keyword + TF-IDF vector search
- Failed-attempt notes so agents do not repeat dead ends
- A stdio MCP server with tools for search, read, save, recent, and index rebuild
- No cloud database, no external embedding API, no required network access
What Makes It Different
This is not a general "remember everything I said" memory.
Many AI memory features store user preferences, project notes, or broad conversation context. Fix Memory MCP stores a narrower kind of memory: verified developer experience.
It does not embed every chat transcript. It saves only useful cases after a bug is fixed and verified:
- the exact error
- the project and environment context
- the root cause
- the patch summary
- the verification command and result
- the failed attempts that should not be repeated
That curation step matters. If every conversation is saved, the memory becomes noisy. If only repaired bugs are saved, the memory becomes a useful debugging asset.
Why Markdown Instead of SQLite
Fix cases are stored as Markdown because the data is developer knowledge, not ordinary business data.
Markdown is a good fit because it is:
- easy for humans to read and edit
- easy for AI agents to read
- friendly to Git, diff, merge, review, and sync
- portable across machines and tools
- transparent when a saved case contains private paths or sensitive details
SQLite may become useful later for very large collections, full-text search, or team usage. For a personal developer memory system, Markdown keeps the memory inspectable and versionable.
Why TF-IDF Instead of Embeddings
Many bug fixes are keyword-heavy. Errors often contain strong tokens such as:
ModuleNotFoundErrorpython.exevenvPATHpipnpmcargoMCPECONNREFUSED
TF-IDF is cheap, local, fast, private, and good enough for this kind of error retrieval. No embedding API key is required, and private bug history does not leave the machine.
Embedding search can still be added later when the case library grows or when semantic matching becomes more important.
What It Is Good At
- Repeated build failures
- Python / Node / Windows path problems
- MCP connection issues
- Dependency and virtual environment mistakes
- Framework-specific errors
- Deployment and service startup fixes
- Recording failed attempts as "do not try this again"
Features
- Local-first memory: cases live under
data/as Markdown files. - MCP server: expose fix memory to AI coding tools through stdio.
- Hybrid retrieval: keyword search plus local TF-IDF cosine similarity.
- Zero external AI dependency: no OpenAI/Anthropic API key needed.
- Readable case format: root cause, patch, verification, reusable advice.
- Privacy by default: real fix cases are ignored by Git unless you choose to share them.
Project Layout
fix-memory-mcp/
data/
fixes/ # your private fixed cases
failed-attempts/ # private "do not repeat" notes
commands/ # private useful command notes
scripts/
fix_memory.py # CLI
fix_memory_mcp.py # MCP stdio server
vector_search.py # local TF-IDF vector index
self_check.py # CLI + tool self-check
mcp_smoke.py # stdio MCP smoke test
skills/
fix-memory-workflow/
SKILL.md # optional Codex/agent skill instructions
templates/
fix-case.md # case template
Quick Start
git clone https://github.com/l111403717-cloud/fix-memory-mcp.git
cd fix-memory-mcp
python -m pip install mcp
python scripts/self_check.py
Create your first case:
python scripts/fix_memory.py new \
--title "Python ModuleNotFoundError from wrong working directory" \
--project "demo-api" \
--language "Python" \
--framework "FastAPI" \
--command "python app/main.py" \
--error "ModuleNotFoundError: No module named app" \
--tags "python,path,fastapi,windows"
Search it later:
python scripts/fix_memory.py search "ModuleNotFoundError FastAPI working directory"
Search modes:
python scripts/fix_memory.py search "MCP failed stdio" --mode hybrid
python scripts/fix_memory.py search "MCP failed stdio" --mode keyword
python scripts/fix_memory.py search "MCP failed stdio" --mode vector
Rebuild the local vector index:
python scripts/fix_memory.py rebuild-index
MCP Server
Run the server:
python scripts/fix_memory_mcp.py
Tools exposed:
save_fix_casesearch_fixessearch_fixes_vectorget_fix_caselist_recent_fixesrebuild_vector_index
Generic MCP config:
{
"mcpServers": {
"fix-memory": {
"command": "python",
"args": [
"/absolute/path/to/fix-memory-mcp/scripts/fix_memory_mcp.py"
],
"env": {
"FIX_MEMORY_ROOT": "/absolute/path/to/fix-memory-mcp/data"
}
}
}
}
Windows + Claude Code helper:
cd path\to\fix-memory-mcp
.\scripts\install_claude_mcp.ps1
Agent Prompt
Use FIX_MEMORY_AGENT_PROMPT.md to teach an agent this loop:
bug -> search memory -> repair -> verify -> save the clean fix
Case Quality Rules
A useful case should include:
- Exact error
- Project/environment context
- Root cause
- Related files
- What changed
- Verification command/result
- Reusable advice
- Failed attempts
- Sensitive-info check
Do not save full chats, full terminal logs, secrets, API keys, cookies, passwords, private account data, or private source files.
Self Check
python scripts/self_check.py
python scripts/mcp_smoke.py
Roadmap
- Optional SQLite + FTS5 index for very large case libraries
- Optional embedding backends
- Better case sanitizer
- Git diff capture after verification
- Agent-friendly install command for more clients
- Web UI for browsing fix cases
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。