btx_fix_mcp
Code review and automated fixing tools - available as CLI and MCP server.
What is btx_fix_mcp?
btx_fix_mcp provides comprehensive code analysis:
- 18+ Quality Analyses: Complexity, maintainability, duplication, type coverage, dead code
- Security Scanning: Bandit integration for vulnerability detection
- Cache Optimization: Evidence-based
@lru_cacherecommendations - Documentation Coverage: Docstring completeness analysis
Two ways to use it:
| Mode | Best For |
|---|---|
| CLI | Direct command-line usage, CI/CD pipelines, scripts |
| MCP Server | Integration with Claude Desktop, AI-assisted workflows |
Quick Start
Installation
# Recommended: uv
pip install uv
uv pip install btx_fix_mcp
# Alternative: pip
pip install btx_fix_mcp
# Development
git clone https://github.com/bitranox/btx_fix_mcp
cd btx_fix_mcp && make dev
CLI Usage (Simple)
# Deploy configuration (recommended first step) - this creates a config file with the settings for all tests to adjust
btx_fix_mcp config-deploy --target app
# Review uncommitted git changes (default)
btx_fix_mcp review all
# Review all files
btx_fix_mcp review all --mode full
# Run specific analysis
btx_fix_mcp review quality
btx_fix_mcp review security
# Cache optimization with profiling (recommended)
btx_fix_mcp review profile -- python -m your_app # Profile your app
btx_fix_mcp review profile -- pytest tests/ # Or profile tests
btx_fix_mcp review cache # Then analyze
# Clean up analysis data
btx_fix_mcp review clean # Delete all
btx_fix_mcp review clean -s profile # Delete profile only
btx_fix_mcp review clean --dry-run # Preview deletion
MCP Server Usage (Simple)
Add to Claude Desktop config (~/.config/claude/claude_desktop_config.json):
{
"mcpServers": {
"btx-review": {
"command": "python",
"args": ["-m", "btx_fix_mcp.servers.review"]
}
}
}
Then in Claude Desktop:
"Review the code quality of this project"
Documentation
Getting Started
| Document | Description |
|---|---|
| CLI Quickstart | Start using CLI in 5 minutes |
| MCP Quickstart | Set up MCP server for Claude Desktop |
| Installation Guide | All installation methods |
User Guides
| Document | Description |
|---|---|
| CLI Reference | All CLI commands and options |
| MCP Tools Reference | MCP tools and resources |
| Configuration | All configuration options |
| Cache Profiling | LRU cache optimization guide |
Development
| Document | Description |
|---|---|
| Development Guide | Setup, testing, make targets |
| Architecture | System design overview |
| Contributing | How to contribute |
Features Overview
Analyses Available
| Analysis | Description | CLI Command |
|---|---|---|
| Scope | File discovery, git changes | review scope |
| Quality | Complexity, maintainability, duplication | review quality |
| Security | Vulnerability scanning (Bandit) | review security |
| Dependencies | Outdated packages, vulnerabilities | review deps |
| Documentation | Docstring coverage | review docs |
| Performance | Hotspot detection, profiling | review perf |
| Cache | LRU cache optimization | review cache |
Quality Metrics
| Metric | Tool | Threshold |
|---|---|---|
| Cyclomatic Complexity | radon | ≤10 |
| Function Length | custom | ≤50 lines |
| Nesting Depth | custom | ≤3 levels |
| Maintainability Index | radon | ≥20 |
| Type Coverage | mypy | ≥80% |
| Docstring Coverage | interrogate | ≥80% |
Requirements
- Python 3.13+
- Git (optional)
Git Integration
Git is optional but enables additional features:
| Feature | Without Git | With Git |
|---|---|---|
| Scope Mode | --mode full scans all files |
--mode git scans only uncommitted changes (default) |
| Code Churn | Skipped | Analyzes frequently modified files |
| Branch Info | Shows "N/A" | Displays current branch |
When git is not available:
--mode gitautomatically falls back to--mode fullwith a warning- Code churn analysis is skipped silently
- Cache analysis works without git (uses in-memory file backup)
- All other analyses work normally
License
Links
Metadata
Release files for btx-fix-mcp 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| btx_fix_mcp-2.0.1.tar.gz | 564.2 kB | Without provenance | Details for btx_fix_mcp-2.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| btx_fix_mcp-2.0.1-py3-none-any.whl | Python 3 | none | any | Details for btx_fix_mcp-2.0.1-py3-none-any.whl |
Total release size: 755.4 kB
Release files / btx_fix_mcp-2.0.1.tar.gz
| Download URL | btx_fix_mcp-2.0.1.tar.gz |
|---|---|
| Size | 564.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4f39893f973fb4b21a9f565270fbfc986f6061e6d2b4e5c490b4a303d16eba3a
|
|
BLAKE2b-256 checksum How to use checksums |
cfa76978c59bbd4c3db88b7fb2e7505b0d2e242c1e1d67ece82ce934e480746d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / btx_fix_mcp-2.0.1-py3-none-any.whl
| Download URL | btx_fix_mcp-2.0.1-py3-none-any.whl |
|---|---|
| Size | 191.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
84ed73df683e5848464ab08c3fb2638714c41be86de24a99d5f08f65b7c287d0
|
|
BLAKE2b-256 checksum How to use checksums |
a27344e09cdb67faff3e64ce5c87456f33cc2d6a01237e15f70adc76b0866297
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for btx-fix-mcp 2.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.