https://github.com/anselmoo/mcp-server-analyzer
MCP server for Python code analysis with RUFF linting and VULTURE dead code detection
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.3%) to scientific vocabulary
Keywords
Repository
MCP server for Python code analysis with RUFF linting and VULTURE dead code detection
Basic Info
Statistics
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 4
- Releases: 1
Topics
Metadata Files
README.md
MCP Server Analyzer for Python 🐍🔍
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.
🚀 Quick Start
VS Code Integration (One-Click Install)
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
mcpkey is needed when using themcp.jsonfile.
Using uvx (recommended):
json
{
"mcp": {
"servers": {
"analyzer": {
"command": "uvx",
"args": ["mcp-server-analyzer"]
}
}
}
}
Using Docker:
json
{
"mcp": {
"servers": {
"analyzer": {
"command": "docker",
"args": ["run", "-i", "--rm", "ghcr.io/anselmoo/mcp-server-analyzer"]
}
}
}
}
Universal Installation
```bash
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 ```
📋 Features
- 🔍 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
📈 Analysis Examples
RUFF Linting Preview
See comprehensive linting analysis examples: 📋 RUFF Analysis Preview
VULTURE Dead Code Detection Preview
Explore dead code detection capabilities: 🧹 VULTURE Analysis Preview
🛠️ Available Tools
| 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 |
🔧 Configuration
Claude Desktop
Add to your claude_desktop_config.json:
json
{
"mcpServers": {
"analyzer": {
"command": "uvx",
"args": ["mcp-server-analyzer"]
}
}
}
Zed
Add to your Zed settings.json:
json
"context_servers": {
"analyzer": {
"command": "uvx",
"args": ["mcp-server-analyzer"]
}
}
🧪 Development
Prerequisites
Setup
```bash
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 . ```
Testing
```bash
Run all tests
uv run pytest tests/ -v
Run with coverage
uv run pytest --cov=src/mcpserveranalyzer --cov-report=html
Test specific functionality
uv run pytest tests/testserver.py::TestAnalyzer::testruff_analysis ```
📊 Quality Metrics
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)
🔒 Security
- 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
📚 Documentation
- MCP Specification - Learn about Model Context Protocol
- FastMCP Framework - High-performance MCP implementation
- RUFF Documentation - Python linter and formatter
- VULTURE Documentation - Dead code finder
🤝 Contributing
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
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Astral for RUFF and uv
- Jendrik Seipp for VULTURE
- Model Context Protocol team
- FastMCP framework
Made with ❤️ for better Python code quality
Owner
- Name: Anselm Hahn
- Login: Anselmoo
- Kind: user
- Location: Switzerland
- Repositories: 100
- Profile: https://github.com/Anselmoo
GitHub Events
Total
- Release event: 1
- Issue comment event: 5
- Public event: 1
- Push event: 4
- Pull request event: 3
- Create event: 2
Last Year
- Release event: 1
- Issue comment event: 5
- Public event: 1
- Push event: 4
- Pull request event: 3
- Create event: 2
Issues and Pull Requests
Last synced: 6 months ago
Packages
- Total packages: 1
-
Total downloads:
- pypi 314 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 1
- Total maintainers: 1
pypi.org: mcp-server-analyzer
MCP server for Python code analysis with RUFF linting and VULTURE dead code detection
- Homepage: https://github.com/anselmoo/mcp-server-analyzer
- Documentation: https://github.com/anselmoo/mcp-server-analyzer
- License: MIT
-
Latest release: 0.1.1
published 7 months ago
Rankings
Maintainers (1)
Dependencies
- actions/cache v4 composite
- actions/checkout v4 composite
- actions/download-artifact v4 composite
- actions/setup-python v5 composite
- actions/upload-artifact v4 composite
- astral-sh/setup-uv v4 composite
- codecov/codecov-action v4 composite
- docker/build-push-action v6 composite
- docker/login-action v3 composite
- docker/metadata-action v5 composite
- docker/setup-buildx-action v3 composite
- pypa/gh-action-pypi-publish release/v1 composite
- sigstore/cosign-installer v3.7.0 composite
- sigstore/gh-action-sigstore-python v3.0.1 composite
- ghcr.io/astral-sh/uv python3.12-bookworm-slim build
- python 3.12-slim-bookworm build
- fastmcp >=0.3.0
- pydantic >=2.0.0
- ruff >=0.8.0
- vulture >=2.11
- annotated-types 0.7.0
- anyio 4.9.0
- attrs 25.3.0
- authlib 1.6.1
- backports-asyncio-runner 1.2.0
- backports-datetime-fromisoformat 2.0.3
- bandit 1.8.6
- black 25.1.0
- certifi 2025.7.14
- cffi 1.17.1
- cfgv 3.4.0
- charset-normalizer 3.4.2
- click 8.2.1
- colorama 0.4.6
- coverage 7.10.1
- cryptography 45.0.5
- cyclopts 3.22.3
- distlib 0.4.0
- dnspython 2.7.0
- docstring-parser 0.17.0
- docutils 0.22
- dparse 0.6.4
- email-validator 2.2.0
- exceptiongroup 1.3.0
- fastmcp 2.10.6
- filelock 3.12.4
- h11 0.16.0
- httpcore 1.0.9
- httpx 0.28.1
- httpx-sse 0.4.1
- identify 2.6.12
- idna 3.10
- iniconfig 2.1.0
- jinja2 3.1.6
- jsonschema 4.25.0
- jsonschema-specifications 2025.4.1
- markdown-it-py 3.0.0
- markupsafe 3.0.2
- marshmallow 4.0.0
- mcp 1.12.2
- mcp-server-analyzer 0.1.1
- mdurl 0.1.2
- mypy 1.17.0
- mypy-extensions 1.1.0
- nodeenv 1.9.1
- openapi-pydantic 0.5.1
- packaging 25.0
- pathspec 0.12.1
- pbr 6.1.1
- platformdirs 4.3.8
- pluggy 1.6.0
- pre-commit 4.2.0
- psutil 6.0.0
- pycparser 2.22
- pydantic 2.11.7
- pydantic-core 2.33.2
- pydantic-settings 2.10.1
- pygments 2.19.2
- pyperclip 1.9.0
- pytest 8.4.1
- pytest-asyncio 1.1.0
- pytest-cov 6.2.1
- python-dotenv 1.1.1
- python-multipart 0.0.20
- pywin32 311
- pyyaml 6.0.2
- referencing 0.36.2
- requests 2.32.4
- rich 14.1.0
- rich-rst 1.3.1
- rpds-py 0.26.0
- ruamel-yaml 0.18.14
- ruamel-yaml-clib 0.2.12
- ruff 0.12.7
- safety 3.2.9
- safety-schemas 0.0.5
- setuptools 80.9.0
- shellingham 1.5.4
- sniffio 1.3.1
- sse-starlette 3.0.2
- starlette 0.47.2
- stevedore 5.4.1
- tomli 2.2.1
- typer 0.16.0
- typing-extensions 4.14.1
- typing-inspection 0.4.1
- urllib3 2.5.0
- uvicorn 0.35.0
- virtualenv 20.32.0
- vulture 2.14