MCP.Market

Safe Fix MCP server

by pamela-0·io.github.pamela-0/safe-fix-mcp·v0.1.1·1 stars

Finds real dead code and proposes a safe, test-gated branch+PR to remove it.

A88/100grade A
What users say
No reviews yet
Be the first
Safety scan
A88/100

full report

Adoption
New

1 stars18 downloads/wk

Reviews

Write one

Nobody has reviewed Safe Fix yet.

If you have run it, two minutes of your experience saves the next person an afternoon.

Safe Fix tools (2)

write = sends, deletes, buys or posts

Read from the package source without running it. The installed server may list more.

  • propose_removal_pr

    Propose a real branch+PR removing only unused imports (single-name import lines, >= 90% vulture confidence) from a Python repository. Runs the repo's own full test suite as a safety gate before ever committing or pushing — a failure there reverts everything and nothing is committed or pushed. If `gh` isn't available or PR creation otherwise fails, the branch is still committed and pushed for real;

  • scan_dead_code

    Scan a Python repository for real dead code (vulture) and dependency issues (deptry). Read-only — never modifies anything. Returns a human-readable list of findings, or "No real candidates found."

Public scan report

scanner v0.1.10 · 2026-11-02 · same rubric, same numbers if you re-run it

no findings
  • Code scan6 source files scanned25/25
  • –Live reliabilityno gateway calls yet and no remote to proben/a
  • –Tool poisoningtools not inspected (local package is not executed); not countedn/a
  • Auth qualitylocal package, no credentials required12/15
  • Maintenancelast push 73 days ago12/15
  • Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
Overall 88/100. Components that don't apply are left out of the denominator. Any critical finding is an F.RubricAppeal a findingJSON

How Safe Fix compares

Against every graded MCP server, from our own scans and uptime checks. Updated after each scan run.

Safety score
88/100
higher than 75% of 48,255 servers
Tools
2
the typical server has 7
Tools that change things
0%
typical: 0%. Fewer write tools means less an agent can break
GitHub stars
1
more than 65% of 28,688 servers
Downloads a week
18
more than 5% of 12,191 servers with a package

What its tools let an agent do: 2 read

Install Safe Fix in Claude Code, Cursor or VS Code

claude mcp add safe-fix-mcp -- uvx safe-fix-mcp
Add to Cursor

What the publisher says

From the Safe Fix repository's README, as published. We do not edit it. Read it on GitHub

safe-fix-mcp

<!-- mcp-name: io.github.pamela-0/safe-fix-mcp -->

A real MCP server that finds dead code in a Python repository and proposes a branch + PR for the one class of finding that's actually safe to auto-remove: unused imports on a single-name import line. Everything else it finds — unused functions, classes, unused dependencies — stays report-only. A human always merges. This tool never merges anything itself.

Why this exists

Most "dead code" tools stop at reporting. The ones that go further usually delete with no safety net. This does neither: it drafts a real, minimal, reviewable PR, gated on the target repo's own full test suite actually passing after the removal — not a heuristic, a real pytest run. If the suite fails, nothing is committed or pushed; the repo is left exactly as it started.

Tools

scandeadcode(repopath=".", minconfidence=60)

Read-only. Runs vulture (dead code) and deptry (dependency issues) and returns a human-readable list of findings. Never modifies anything.

proposeremovalpr(repo_path=".")

  • Refuses on a dirty working tree — never edits on top of uncommitted work.
  • Filters to unused imports at ≥90% vulture confidence, on single-name import lines only (from x import y, z is skipped — removing the whole line would silently remove z too).
  • Creates a real branch, removes the qualifying imports, runs the repo's real full test suite.
  • Only on a real pass: commits, pushes, and tries to open a PR via gh pr create.
  • If gh isn't installed/authenticated, the branch is still committed and pushed for real — only PR creation degrades, with the real error returned so you can open it manually.

Install

pip install safe-fix-mcp

Add to your MCP client config (e.g. Claude Code):

claude mcp add safe-fix-mcp -- safe-fix-mcp

Or run directly for local testing:

python -m safe_fix_mcp.server

Installing from source instead of PyPI:

pip install -e .

Skill

A SKILL.md ships inside this same package — not a separate download — and teaches Claude when and how to use the two tools correctly (e.g. that proposeremovalpr only ever auto-removes single-name unused imports, never functions/classes/dependencies). Install it into your project:

safe-fix-mcp-install-skill

Run it from the project root you want the skill active in — it writes to .claude/skills/safe-fix-mcp/SKILL.md relative to your current directory.

Requirements

  • Python ≥ 3.10
  • git on PATH
  • gh (GitHub CLI) on PATH and authenticated, if you want proposeremovalpr to actually open the PR — without it, the branch still gets pushed for real, and the tool tells you to open the PR by hand.

Development

pip install -e ".[dev]"
pytest

Known limitation

vulture flags scandeadcode/proposeremovalpr themselves as "unused" — a known false-positive class, not a real bug: they're dispatched by the @mcp.tool() decorator at runtime, not called directly anywhere in the source, so static call-graph analysis can't see the real caller (the MCP framework itself).

Verifying it for real

scripts/verifyrealclient.py launches the packaged server as a real subprocess and talks to it with the real mcp.client.ClientSession — the same path a real MCP client uses. Useful as a smoke test after any change:

python scripts/verify_real_client.py

Nothing above is checked by us. What we check is on the safety report.

Safe Fix: common questions

Is Safe Fix MCP server safe?
Yes, by our scan: it is graded A (88/100). Read the Safe Fix safety report
How do I install Safe Fix?
It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
Does Safe Fix need an API key?
Not as far as the registry entry and our scan can tell: no credentials are declared or required.
Is Safe Fix maintained?
The last commit was 74 days ago (2026-08-21). The latest release is v0.1.1.
How does Safe Fix compare with other MCP servers?
safety score 88/100 (higher than 75% of 48,255 servers); tools 2 (the typical server has 7); tools that change things 0% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.