A powerful Model Context Protocol (MCP) server that provides comprehensive Python code analysis using RUFF for linting and VULTURE for dead code detection. Perfect for AI assistants, IDEs, and automated code review workflows.
For quick installation, use one of the one-click install buttons below...
For manual installation, add the following JSON block to your User Settings (JSON) file in VS Code. You can do this by pressing Ctrl + Shift + P
and typing Preferences: Open User Settings (JSON)
.
Optionally, you can add it to a file called .vscode/mcp.json
in your workspace. This will allow you to share the configuration with others.
Note that the
mcp
key is needed when using themcp.json
file.
Using uvx (recommended):
{
"mcp": {
"servers": {
"analyzer": {
"command": "uvx",
"args": ["mcp-server-analyzer"]
}
}
}
}
Using Docker:
{
"mcp": {
"servers": {
"analyzer": {
"command": "docker",
"args": ["run", "-i", "--rm", "ghcr.io/anselmoo/mcp-server-analyzer"]
}
}
}
}
# Install with uvx (recommended)
uvx install mcp-server-analyzer
# Install with pip
pip install mcp-server-analyzer
# Run with Docker
docker run ghcr.io/anselmoo/mcp-server-analyzer:latest
# Install from source
git clone https://github.com/anselmoo/mcp-server-analyzer.git
cd mcp-server-analyzer
uv sync --dev
uv run mcp-server-analyzer
- π RUFF Analysis: Comprehensive Python linting with auto-fixes
- π§Ή Dead Code Detection: Find unused imports, functions, and variables with VULTURE
- π Quality Scoring: Combined analysis with quality metrics
- π FastMCP Framework: High-performance MCP server implementation
- π³ Docker Ready: Multi-architecture containers with security signing
- π Secure: All releases signed with Sigstore for supply chain security
See comprehensive linting analysis examples: π RUFF Analysis Preview
Explore dead code detection capabilities: π§Ή VULTURE Analysis Preview
Tool | Description | Use Case |
---|---|---|
ruff-check |
Lint Python code with RUFF | Style violations, potential errors |
ruff-format |
Format Python code with RUFF | Code formatting and consistency |
ruff-check-ci |
CI/CD optimized RUFF output | GitHub Actions, GitLab CI |
vulture-scan |
Dead code detection | Unused imports, functions, variables |
analyze-code |
Combined RUFF + VULTURE analysis | Complete code quality assessment |
Add to your claude_desktop_config.json
:
{
"mcpServers": {
"analyzer": {
"command": "uvx",
"args": ["mcp-server-analyzer"]
}
}
}
Add to your Zed settings.json:
"context_servers": {
"analyzer": {
"command": "uvx",
"args": ["mcp-server-analyzer"]
}
}
# Clone repository
git clone https://github.com/anselmoo/mcp-server-analyzer.git
cd mcp-server-analyzer
# Install dependencies
uv sync --dev
# Run tests
uv run pytest
# Run pre-commit hooks
uv tool run pre-commit run --all-files
# Build Docker image
docker build -t mcp-server-analyzer .
# Run all tests
uv run pytest tests/ -v
# Run with coverage
uv run pytest --cov=src/mcp_server_analyzer --cov-report=html
# Test specific functionality
uv run pytest tests/test_server.py::TestAnalyzer::test_ruff_analysis
The server provides quality scoring based on:
- RUFF Issues: Style violations, potential bugs, complexity metrics
- Dead Code Detection: Unused imports, functions, variables
- Combined Score: Weighted quality assessment (0-100)
- Signed Releases: All releases signed with Sigstore
- Container Signing: Docker images signed with Cosign
- Trusted Publishing: PyPI releases use GitHub OIDC trusted publishing
- Vulnerability Scanning: Automated security scanning in CI/CD
- Supply Chain Security: SLSA Build Level 3 compliance
- MCP Specification - Learn about Model Context Protocol
- FastMCP Framework - High-performance MCP implementation
- RUFF Documentation - Python linter and formatter
- VULTURE Documentation - Dead code finder
Contributions are welcome! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Astral for RUFF and uv
- Jendrik Seipp for VULTURE
- Model Context Protocol team
- FastMCP framework
Made with β€οΈ for better Python code quality