Codebase Doctor logo

Codebase Doctor

Read-only MCP audits for secrets, dependencies, RLS, changed code, and review verdicts with evidence and coverage reporting.

Install Codebase Doctor

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "codebase-doctor": {
      "command": "npx",
      "args": [
        "-y",
        "codebase-doctor"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx -y codebase-doctor

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

The codebase-doctor MCP server gives coding agents read-only repository audits for secrets, dependencies, RLS issues, and changed-code review. It builds a source graph, reports evidence-backed findings, and identifies parts of the repository it could not analyze. Reach for it before merging agent-generated changes or when checking whether a repository audit is complete. It can also inspect committed-secret history and produce review verdicts without modifying repository files.

Use cases

  • Audit an agent-edited repository before merging
  • Review only changed lines against a base branch
  • Find secrets that were committed and later deleted
  • Check RLS and dependency issues with coverage reporting
  • Verify fixes against a previous audit baseline

Key features

  • Read-only repository auditing
  • Changed-scope and pull-request review
  • Secret and secret-history detection
  • Dependency and RLS checks
  • Evidence-backed findings with coverage limits
  • JSON, SARIF, HTML, and review reports

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

12/12 checks healthy over the last 47d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 8d ago via OSV.dev · codebase-doctor (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads497Package downloads in the last 30 days.
Last commit5d agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How Codebase Doctor works

What codebase-doctor does

codebase-doctor provides read-only checks for repositories handled by coding agents. Its audit scope includes committed secrets, secret history, dependency issues, unsafe Dockerfiles, workflow injection, RLS mistakes, accessibility regressions, broken imports, and related source-level findings. The server is intended for verification rather than remediation: findings tell an authorized human or external coding agent what to fix, while the audit itself does not write to the repository.

Each finding includes supporting evidence, and reports include coverage information describing checks that were skipped or only partially completed. This distinction matters when interpreting a clean result: incomplete coverage is reported instead of being presented as a clean audit.

How it works

The audit pipeline builds a source graph and examines the working tree, Git changes, and—when relevant—repository history. Changed-scope audits can compare the merge base with a selected base reference, while review mode narrows findings to added diff lines so unrelated older issues do not determine a pull-request verdict.

Secret-history analysis examines up to the most recent 200 commits across all branches without checking out, rewriting, or executing repository content. Matched secret values are withheld from findings, fingerprints, errors, and reports, including SARIF output. Deleted secrets can therefore remain visible as historical exposure without revealing their contents.

Review results use the verdicts NO_CHANGES, APPROVE, COMMENT, or REQUEST_CHANGES. Baseline comparison can limit gating to findings that are new in the diff. An empty diff produces NO_CHANGES, rather than treating the review as an approval.

Setup and configuration

The package can be run without a separate installation:

Terminal
npx -y codebase-doctor audit .

It can also be installed globally with npm install -g codebase-doctor. Common commands include audit, review, verify, bisect, and demo. Audits support text, JSON, SARIF, brief, and HTML output; reviews additionally support Markdown and GitHub workflow annotations.

Useful controls include --changed, --base, --exclude, --fail-on, --require-complete, --baseline, and --timeout. PostgreSQL catalog inspection is opt-in with --with-database, and OSV advisory lookup for lockfile packages is opt-in with --with-advisories. Database checks can be limited by schema and statement timeout.

Tools and capabilities

  • Audit a full repository or the scope affected by Git changes.
  • Review pull-request changes and emit a machine-readable verdict.
  • Detect private-key material, provider-token patterns, paired AWS credentials, credential-bearing URLs, and high-confidence sensitive assignments.
  • Inspect dependency lockfiles for npm, pnpm, Yarn, Bun, Poetry, and uv projects.
  • Check SQL RLS configuration, with optional live PostgreSQL catalog access.
  • Compare a report with a baseline and verify whether fixes landed.
  • Produce JSON, SARIF, HTML, brief, Markdown, or GitHub workflow output.
  • Write coverage receipts and optionally sign them with an Ed25519 private key.

Limitations and notes

Secret detection is precision-first rather than exhaustive. A Git-ignored .env file is not treated as a finding solely because it exists, while a tracked file containing a real credential can be reported. Review scope can omit findings on unchanged lines unless --all-findings is used; a full audit still reports them.

Incomplete coverage should be treated as an operational condition, not as evidence that the repository is clean. The --require-complete option makes an incomplete audit exit with status 2. Review exit status 1 requests changes, while status 2 indicates an operational failure and never represents a clean result.

The demo command creates a disposable Git fixture containing a secret and broken import, audits it, shows the blast radius, and exits 1 to demonstrate the CI gate. It does not touch files outside its temporary directory.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Codebase Doctor

codebase-doctor is an MCP server that connects coding agents to read-only codebase audits. Its main tools cover repository auditing, changed-scope review, secret and dependency checks, RLS checks, and review verdicts. It reports findings with evidence and coverage limitations without modifying repository files or exposing matched secret values.

Install it with `npx -y codebase-doctor` for a one-off run, or use `npm install -g codebase-doctor` for a global installation. The package provides commands including `audit`, `review`, `verify`, `bisect`, and `demo`.

Use `codebase-doctor review . --base origin/main` to review pull-request changes against a base reference. Review mode audits changed scope, narrows findings to added diff lines, and emits a verdict; `--all-findings` disables that narrowing.

Yes. Its secret-history check examines up to the most recent 200 commits across all branches, including secrets later removed from the working tree. Matched values are withheld from findings and reports, so exposed credentials still need to be rotated or revoked by an authorized human or external agent.

It includes coverage limitations in audit and review results when checks were skipped or only partially completed. Use `--require-complete` to exit with status 2 when coverage is incomplete instead of treating the result as verified.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewCodebase Doctor AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/codebase-doctor?style=directory)](https://allmcps.com/mcp/codebase-doctor)
HTML Embed
<a href="https://allmcps.com/mcp/codebase-doctor"><img src="https://allmcps.com/api/badge/codebase-doctor?style=directory" alt="Codebase Doctor on AllMCPs" /></a>