Bugledger
FreeNot checkedLocal-first MCP server that gives AI coding agents a memory of fixed bugs: record at fix time, retrieve before coding, search while debugging, enforce with Semg
About
Local-first MCP server that gives AI coding agents a memory of fixed bugs: record at fix time, retrieve before coding, search while debugging, enforce with Semgrep.
README
Never fix the same bug twice.
A local MCP server that gives AI coding agents a permanent memory of the bugs you already fixed.
What it does
Your agent fixes a bug. You confirm the record. From then on, every session on that project checks the ledger before writing code in that area and can search it while debugging.
- Before coding, the agent calls
get_patternsand sees the past bugs for that feature area. - While debugging, it calls
search_bugswith the error text. - After a fix, you run
/logbug. The agent drafts the record, you approve, it is stored.
Everything stays on your machine: one SQLite file in ~/.bugledger/. No account, no cloud, no telemetry.
Install
Requires uv. It downloads Python if needed.
Claude Code
claude mcp add bugledger -- uvx bugledger-mcp
Cursor, in .cursor/mcp.json:
{ "mcpServers": { "bugledger": { "command": "uvx", "args": ["bugledger-mcp"] } } }
Any other MCP client: command uvx, argument bugledger-mcp, transport stdio.
For copy-paste setup blocks for Codex CLI, Windsurf, Zed, and Continue, see the MCP client setup guide.
Whole team: commit that JSON as .mcp.json (Claude Code) or .cursor/mcp.json (Cursor) in the repo. Everyone who opens the project gets the server.
Restart the client. /mcp lists bugledger as connected and /mcp__bugledger__logbug is available.
Troubleshooting
- Failed to connect: run
uvx bugledger-mcpin a terminal. A running server waits silently for stdio input. If it exits, use the printed error to fix the environment, then restart the MCP client. - Stale
uvxcache: runuvx --refresh bugledger-mcp, then restart the client. - Python older than 3.10 on
PATH: checkpython --version. Bug Ledger requires Python 3.10 or newer;uvx --python 3.12 bugledger-mcpselects a compatible interpreter explicitly. - Ledger location: the default database is
~/.bugledger/ledger.db. IfBUGLEDGER_HOMEis set for the MCP server, the database is$BUGLEDGER_HOME/ledger.dbinstead.
Use
- Fix a bug as usual.
- Run
/mcp__bugledger__logbug. The agent checks that the session really contained a bug fix, drafts the symptom, root cause, feature area, and stack, shows you the draft, and stores it only after you say yes. Feature work and refactors are refused. - Keep working. On connect, the server tells the agent to call
get_patternsbefore coding andsearch_bugswhile debugging. Nothing else to set up.
To make the check a hard rule, add one line to CLAUDE.md or .cursorrules:
Before implementing anything in a feature area, call bugledger get_patterns with that area and this project's name, and account for every returned bug. After fixing a bug, run /mcp__bugledger__logbug.
Tools
| Tool | Purpose |
|---|---|
get_patterns(feature_area, project) |
Past bugs for an area, one line each, capped at 30 lines |
search_bugs(query) |
Full-text search over symptoms and root causes; paste the error as is |
record_bug(...) |
Store a confirmed bug with its root cause and fix diff |
list_areas() |
Existing feature areas and projects, so names stay consistent |
update_bug / delete_bug |
Correct or remove a record |
resolve_bug(id, project) |
Hide a bug from get_patterns for one project once a guardrail covers it |
get_guardrails(stack) |
Starter Semgrep rules and the CI workflow that installs them |
Guardrails
get_guardrails returns hand-written Semgrep rules for the classic mistakes agents make: SQL and shell injection, hardcoded secrets, unsafe deserialization, eval, open CORS, debug mode, insecure random, plain HTTP. The agent writes them to .bugledger/ in your repo and adds one workflow file. Existing CI files are never touched. ERROR rules block the pull request, WARNING rules only report. Delete a rule file to drop it.
Data and privacy
- The ledger is
~/.bugledger/ledger.db. SetBUGLEDGER_HOMEto move it. Delete it any time; it is recreated on next start. record_bugrunsgit show <commit>locally to store the fix diff. Diffs are never returned byget_patternsand never leave your machine.- The server makes no network calls.
Contributing
Bug reports, new rules, and pull requests are welcome. Setup, tests, and the release process are in CONTRIBUTING.md.
License
Installing Bugledger
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/xajeel/bugledger-mcpFAQ
Is Bugledger MCP free?
Yes, Bugledger MCP is free — one-click install via Unyly at no cost.
Does Bugledger need an API key?
No, Bugledger runs without API keys or environment variables.
Is Bugledger hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Bugledger in Claude Desktop, Claude Code or Cursor?
Open Bugledger on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
wenb1n-dev/SmartDB_MCP
A universal database MCP server supporting simultaneous connections to multiple databases. It provides tools for database operations, health analysis, SQL optim
by wenb1n-devPostgres Server
This server enables interaction with PostgreSQL databases through the Model Context Protocol, optimized for the AWS Bedrock AgentCore Runtime. It provides tools
by madhurprashPostgres
Query your database in natural language
by AnthropicPostgreSQL
Read-only database access with schema inspection.
by modelcontextprotocolRedis
Interact with Redis key-value stores.
by modelcontextprotocolSQLite
Database interaction and business intelligence capabilities.
by modelcontextprotocolmxcp
Open-source framework for building enterprise-grade MCP servers using just YAML, SQL, and Python, with built-in auth, monitoring, ETL and policy enforcement.
by raw-labstadas-github/a2asearch-mcp
MCP server to search 4,800+ MCP servers, AI agents, CLI tools and agent skills. Install: npx -y a2asearch-mcp. Ask Claude: "Find MCP servers for database access
by tadas-githubjulien040/anyquery
Query more than 40 apps with one binary using SQL. It can also connect to your PostgreSQL, MySQL, or SQLite compatible database. Local-first and private by desi
by julien040drakonkat/wizzy-mcp-tmdb
A MCP server for The Movie Database API that enables AI assistants to search and retrieve movie, TV show, and person information.
by drakonkatCompare Bugledger with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All data MCPs
