dejafix
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Your AI gets stuck on the same problems again and again: a port already in use, an expired token giving a 401, a database that isn't running, a shell quoting error.
Every new session works the fix out from scratch, spending your time and tokens on a problem someone already solved last week.
Nobody writes the fix down, or it ends up in one person's notes where no agent ever finds it.
dejafix keeps the fix the first time it's found, and hands it to every agent and every person after that. Agents look up errors and propose the fixes they confirm, people review them in a web dashboard, and the runbook lives in your repo as plain Markdown, reviewed and kept in git like code.
It works with any app that supports MCP: Claude Code, Cursor, VS Code with Copilot, Codex, Windsurf and others. It also has a CLI for people and scripts.
Why dejafix
Local-first. No hosted service, no account, no network calls, no telemetry. The dashboard listens on
localhostonly.Team-owned. One Markdown file per problem in
.dejafix/in your repo. Fixes go through review, then through your normal pull requests.Reviewed by a person. What an agent proposes waits in the review queue. Lookups return only approved fixes unless you ask for more.
Safe to save. Before anything is written, tokens, keys, passwords, emails and connection strings are redacted. If something looks like a secret it can't classify, it refuses to save and says why.
No duplicates. A new fix that matches an existing one is caught, so you merge instead of piling up copies.
A proper dashboard. Review, search, edit, merge and retire fixes in a page that updates live.
Related MCP server: mcp-error-handler
Quick start
npx dejafix init # creates .dejafix/ and prints the MCP config for your AI tool
npx dejafix dashboard # opens the dashboard at http://localhost:4660init lists what it will change and asks once (--yes skips the question). Add --hook to let Claude Code look up failed shell commands by itself, and --global to set up a runbook in ~/.dejafix that all your projects share.
Connect your AI tool
Claude Code
claude mcp add dejafix -- npx -y dejafixor in .mcp.json at the root of your project:
{
"mcpServers": {
"dejafix": { "command": "npx", "args": ["-y", "dejafix"] }
}
}Cursor: .cursor/mcp.json
{
"mcpServers": {
"dejafix": { "command": "npx", "args": ["-y", "dejafix"] }
}
}VS Code: .vscode/mcp.json
{
"servers": {
"dejafix": { "type": "stdio", "command": "npx", "args": ["-y", "dejafix"] }
}
}On Windows, use "command": "cmd" with "args": ["/c", "npx", "-y", "dejafix"] (and claude mcp add dejafix -- cmd /c npx -y dejafix). dejafix init prints the right one for your computer.
How it works
agent hits an error ──► lookup ──► known fix? ──yes──► tries it ──► record_use
│
no
▼
works it out ──► propose_fix ──► review queue ──► a person approves
│
every agent and person after that ◄───┘The MCP server gives agents three tools, with one-line descriptions to keep their context small:
Tool | What it does |
| Takes an error message or raw error output and returns the best matching approved fixes. The error is normalized first (paths, ports, timestamps and ids are stripped), then matched against each fix's symptoms and title. |
| Records a fix the agent has just confirmed, as proposed, for a person to review. Similar existing fixes are returned instead of saving a duplicate. |
| Marks that a fix worked again (or didn't). It feeds the use count and the dashboard. |
With dejafix init --hook, Claude Code runs a lookup itself whenever a Bash command fails, and shows any match to the agent before it starts digging.
Here is the whole loop with real MCP calls. The agent's build fails and lookup knows nothing, so it works the fix out and calls propose_fix. The fix appears in the open dashboard at once; a person approves it, and the next lookup for that error returns it.

Also as MP4. More in docs/tools.md.
The dashboard
npx dejafix dashboard opens it in your browser. It updates by itself when files change, and switches between the project runbook, the global one or both.
One dashboard for all your projects. Every project where you run dejafix init (or where your AI app uses dejafix) joins the list, and the one dashboard at http://localhost:4660 shows them all: switch from the sidebar or the top bar, or see every project at a glance on All projects. Running npx dejafix dashboard in another project opens it in the dashboard that is already running, instead of starting a second one.

All projects, then billing-api, then docs-site from the top-bar picker; [ folds the sidebar; the theme button goes dark.
|
|
Home. How many fixes are approved, waiting or stale, the most-used fixes, recent lookups and the problems seen most often this week. | Review queue. Every fix an agent proposed, with the error, the cause and the fix. Approve, Edit or Reject: this is the dashboard's main job. |
|
|
Search. Paste any error output and see the matches ranked, exactly as an agent would see them. | Entry. View and edit a fix, its use history, and similar entries to merge. |
Reviewing takes a click (or a key): approve a fix, or merge a near-duplicate into the entry it repeats.

|
|
Add a fix by hand, and edit any fix in place (see it). | Stale fixes: unused for 90 days, or found on a tool version that has since changed. |
|
|
Light and dark, following your system or your choice. | Fold the sidebar with ☰ or |
On a phone the sidebar becomes a drawer:

See docs/dashboard.md.
The CLI
dejafix run the MCP server on stdio (what your AI tool starts)
dejafix init [folder] set up .dejafix/ and print MCP config [--global] [--hook] [--yes]
dejafix dashboard open the web dashboard [--port n] [--no-open] [--global]
dejafix lookup "<error>" find known fixes (or pipe output in) [--all] [--json]
dejafix add add a fix (asks questions with no flags)
dejafix review approve or reject proposed fixes [--list]
dejafix list list fixes [--status s] [--global] [--json]
dejafix stats counts, top problems, lookups [--json]Pipe output straight in: npm run dev 2>&1 | npx dejafix lookup. lookup exits with 0 when something matched and 2 when nothing did, so scripts can use it. More in docs/cli.md.

|
|
|
|
|
|
|
|
An entry
Each fix is one Markdown file, .dejafix/<id>.md. Edit it by hand, review it in a pull request, or use the dashboard.
---
id: port-already-in-use
title: Port already in use
status: approved
symptoms:
- "EADDRINUSE: address already in use"
- "/Port \\d+ is (already )?in use/i"
tags:
- tool:node
found_by: agent:claude-code
created: 2026-12-04T10:37:24.455Z
last_used: 2026-12-05T08:12:03.120Z
use_count: 7
---
## Cause
A dev server from an earlier session is still running and holds the port.
## Fix
Find and stop the process that holds the port:
- macOS / Linux: `lsof -ti tcp:3000 | xargs kill`
- Windows (PowerShell): `Stop-Process -Id (Get-NetTCPConnection -LocalPort 3000).OwningProcess`
Or start on another port: `PORT=3001 npm run dev`.
## Notes
Happens most after a session was stopped mid-run.symptoms: error text as it appears, or a
/regex/flagspattern. Paths, ports, timestamps and ids are ignored when matching, so:::3000and127.0.0.1:5173both match.tags: free words; by convention
os:windows,tool:npm,service:postgres.status:
proposed(waiting for review),approved(returned by lookup) orretired(kept for history).found_by:
agent:<name>orperson:<name>. use_count and last_used are kept up to date byrecord_use.Usage logs live in
.dejafix/log/, which git ignores.
The project runbook is .dejafix/ at the root of your repo. The optional global runbook, ~/.dejafix (or $DEJAFIX_HOME), holds fixes for your machine that every project shares. Lookups search both.
Safety
Redaction before every save, from an agent, the dashboard or the CLI: private keys, cloud and API keys (AWS, GitHub, GitLab, Slack, Stripe, OpenAI, Anthropic, Google, npm), JWTs,
Bearer/Basiccredentials,password=/token:/api_keyassignments, credentials in connection strings (the host is kept) and email addresses. Anything that still looks like a secret makes it refuse to save, and say where.Duplicates are caught on save: you get the similar fixes and can merge, or save anyway.
Local only: the dashboard binds
127.0.0.1, checks the Host header, and accepts changes only from its own page (a per-run token). No telemetry and no network calls.
Docs
Contributing
Bug reports, ideas and pull requests are welcome: see CONTRIBUTING.md and the Code of Conduct. Report security problems privately, as SECURITY.md explains. What changed in each release is in the changelog.
Later
Import from and export to Progressor, so a Progressor project can show its dejafix entries.
Share a global runbook across a team through a git repo.
License
Copyright (C) 2026 Rachit Asthana
dejafix is licensed under the PolyForm Noncommercial License 1.0.0.
Free, no need to ask: personal use with no commercial application (your own projects, study, research, hobbies), and use by charities, schools, public research bodies and government institutions. You may use, change and share it for these.
Needs a commercial license from the author: any other use. That includes using it in or for a company, for paid client work, and selling it, hosting it for others, or building a product or service on it, changed or not. A commercial license may come with a fee, which we work out together when you ask. Ask for a commercial license.
Without that license, commercial use is not allowed. See LICENSE.md for the full terms.
If dejafix saves you time, you can buy me a coffee.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Checks AI-written code for leaked keys and made-up packages, on your machine. Never uploads code.
Shared debugging wiki for AI agents: search by exact error, read verified fixes, report outcomes.
FixMyPrompt is a remote MCP server for coding agents. It saves the steps your agent worked out as project memories and fetches them in later sessions, scores and rewrites prompts, and checks CLAUDE.md and AGENTS.md files. Works with Claude Code, Codex and Cursor. Free plan available.
Snag gives your own coding agent (Claude Code, Cursor, Codex, Gemini CLI, VS Code) the evidence behind a bug report: the reporter's console log, network requests, session replay and annotated screenshots, plus repro steps and page context. Your agent reads the report, writes the fix and opens a pull request for a human to review, then links the PR back to the ticket. Snag never touches your code and never auto-merges. Sign in with OAuth in the browser; no token to copy. A free capture-only workspace is enough to try it.
Related MCP Servers
- AlicenseCqualityCmaintenanceLocal-first error memory for AI coding agents, enabling them to search past fixes before attempting new repairs and save verified cases as Markdown.3MIT
- FlicenseNot gradedqualityDmaintenanceTurns application errors into reviewed pull requests by automating root-cause analysis, Jira ticket creation, local and CI test gates, and GitHub PRs, with a human as the final merge gate.-
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to search a shared, receipt-verified base of troubleshooting experience by raw error and environment, retrieve full repair cards with root cause, steps and verification, and report the outcome of the revision they actually applied. Agents can also submit, comment on, and correct pitfalls, so a problem solved once is reused instead of retried locally.MIT
- AlicenseNot gradedqualityAmaintenancePersists the decisions, rules, bugs, to-dos and dead ends from your AI coding chats into a markdown file in your repo and recalls the relevant lines in later sessions, while checking commands and file edits against those saved rules before they run.759 npmMIT











