autofix-agent
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.
AutoFixAgent
IDE-grade automated refactoring agent — detect once, fix everywhere, deterministic-first.
AutoFixAgent receives a request like detect("UnnecessaryCast"), finds (or authors and caches) the
cheapest capable detector and fixer, returns occurrences, and applies IntelliJ-grade deterministic
fixes — verifying each batch compiles and passes tests before reporting success. AI writes the
algorithms once; the cached algorithms do the rest.
OpenCode / any MCP client / Gradle plugin / GitHub Action
│ MCP (stdio) · CLI
┌─────────────────────▼─────────────────────────────────┐
│ Core (FastMCP + asyncio) │
│ MCP tools · CLI verbs · Job manager │
│ ┌──────────────┐ ┌───────────────────────────┐ │
│ │ Rule registry│ │ AI author layer │ │
│ │ + artifact │ │ (synthesize · self-verify)│ │
│ │ cache │ └───────────────────────────┘ │
│ └──────┬───────┘ │
│ ┌──────▼───────────────────────────────────────┐ │
│ │ Engines: OpenRewrite (Java) · ast-grep │ │
│ │ (JS/TS +) · ts-morph sidecar · ESLint · │ │
│ │ Joern (data flow, call graph) │ │
│ └──────────────────────────────────────────────┘ │
│ Verification gate (worktree + build + test) │
│ Workspace Profile (derived + .autofix/config.yaml) │
│ Toolchain cache (~/.cache/autofixagent/tools) │
└───────────────────────────────────────────────────────┘Why
IntelliJ can fix Unnecessary cast in one keystroke; CI tooling reports the same finding a
thousand times and waits for humans. AutoFixAgent closes that gap:
Cache-first: the detect/fix algorithm for a rule is authored once (AI-assisted), verified against golden samples, and cached keyed by
(rule, language, engine, engine_version). The second request is instant and deterministic.Deterministic-first: engines run before the LLM. Occurrences are tagged
deterministic | AI_ONLY; only the latter ever need a model.Safe by construction: fixes apply on a branch in a temp git worktree, pass a compile/test gate, and come back as a diff with per-occurrence verdicts. The agent never mutates the caller's checkout and never installs anything into the target.
Related MCP server: CodePecker
Quickstart
pip install git+https://github.com/sleroy/autofix-agent.git
autofix-agent doctor -w /path/to/repo # toolchain + workspace profile check
autofix-agent detect UseDiamondOperator -w /path/to/repo
autofix-agent fix UseDiamondOperator -w /path/to/repo --applyMCP (OpenCode / any MCP client):
{
"mcpServers": {
"autofix-agent": {
"command": "autofix-agent",
"args": ["mcp"]
}
}
}Tools: detect, fix, fix_batch, job_status, rules, explain, doctor.
See docs/mcp.md for the contract.
Engines
Selection rule: the best engine per language — technologies multiply on purpose.
Language | Detect | Fix | Deep analysis |
Java | OpenRewrite search recipes, PMD/Checkstyle | OpenRewrite recipes (Maven CLI goal / Gradle init-script — build files never touched), JavaParser | Joern (data flow, call graph) |
JS/TS | ast-grep YAML rules, ESLint | ast-grep | Joern |
Python | ast-grep / tree-sitter | LibCST (lossless concrete tree, codemod framework) | — |
Others (Go, Kotlin, Rust, ...) | ast-grep (tree-sitter grammars) | ast-grep | — |
Range-edit contract: every fix — engine or AI-authored — is expressed as ranged edits
(start, end, replacement) spliced into the original text. Full-file rewrites are forbidden;
comments, formatting and blame survive. See src/autofixagent/edits.py.
All engines are pinned and checksummed in ~/.cache/autofixagent/tools (see
autofix-agent doctor, air-gap tarball supported).
Status
M0 — scaffold. Roadmap: M1 CLI detect+fix (ast-grep + OpenRewrite) → M2 MCP server → M3 verification gate → M4 AI author layer → M5 Gradle plugin → M6 GitHub Action → M7 Joern data-flow rules → M8 concurrency hardening.
License
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
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
295k+ bug-fix patterns with MCP Hub proxy, PII filtering, and code search
Static MCP server scan: injection, secrets, tool poisoning. SARIF + rules catalog.
Scan any public GitHub MCP-server repo for security issues. 37 MCP-specific L1 rules, 8 languages.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI clients to perform local code search, indexing, and analysis across Java, JavaScript/TypeScript, .NET/C#, and Python projects through the MCP protocol.1Apache 2.0
- FlicenseAqualityNot gradedmaintenanceMCP server that reviews and fixes code across four dimensions (security, standards, production readiness, sustainability), runs tests to verify fixes, and provides findings with diffs.1-
- AlicenseNot gradedqualityCmaintenanceProvides evidence-backed, transactional code refactoring for JavaScript/TypeScript and other languages via MCP, enabling semantic renames, signature changes, edits, and safe bulk operations with preview, atomic apply, and rollback.MIT
- AlicenseAqualityCmaintenanceEnables MCP clients to run deterministic AST safety audits, secret scanning, and sandboxed test execution on codebases, with human approval required before any remediation action.5MIT