Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

MCP server for Python code analysis with RUFF linting and VULTURE dead code detection

License

NotificationsYou must be signed in to change notification settings

Anselmoo/mcp-server-analyzer

Repository files navigation

CI/CD PipelinePyPI versionPython 3.10+DockerLicense: MITCode Coverage

A powerfulModel Context Protocol (MCP) server that provides comprehensive Python code analysis usingRUFF for linting andVULTURE 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...

Install with UV in VS CodeInstall with UV in VS Code Insiders

Install with Docker in VS CodeInstall with Docker in VS Code Insiders

For manual installation, add the following JSON block to your User Settings (JSON) file in VS Code. You can do this by pressingCtrl + Shift + P and typingPreferences: 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 themcp 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"]      }    }  }}

Universal Installation

# Install with uvx (recommended)uvx install mcp-server-analyzer# Install with pippip install mcp-server-analyzer# Run with Dockerdocker run ghcr.io/anselmoo/mcp-server-analyzer:latest# Install from sourcegit clone https://github.com/anselmoo/mcp-server-analyzer.gitcd mcp-server-analyzeruv sync --devuv 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

ToolDescriptionUse Case
ruff-checkLint Python code with RUFFStyle violations, potential errors
ruff-formatFormat Python code with RUFFCode formatting and consistency
ruff-check-ciCI/CD optimized RUFF outputGitHub Actions, GitLab CI
vulture-scanDead code detectionUnused imports, functions, variables
analyze-codeCombined RUFF + VULTURE analysisComplete code quality assessment

🔧 Configuration

Claude Desktop

Add to yourclaude_desktop_config.json:

{"mcpServers": {"analyzer": {"command":"uvx","args": ["mcp-server-analyzer"]    }  }}

Zed

Add to your Zed settings.json:

"context_servers": {"analyzer": {"command":"uvx","args": ["mcp-server-analyzer"]  }}

🧪 Development

Prerequisites

  • Python 3.10+
  • uv (recommended) or pip
  • Docker (optional)

Setup

# Clone repositorygit clone https://github.com/anselmoo/mcp-server-analyzer.gitcd mcp-server-analyzer# Install dependenciesuv sync --dev# Run testsuv run pytest# Run pre-commit hooksuv tool run pre-commit run --all-files# Build Docker imagedocker build -t mcp-server-analyzer.

Testing

# Run all testsuv run pytest tests/ -v# Run with coverageuv run pytest --cov=src/mcp_server_analyzer --cov-report=html# Test specific functionalityuv run pytest tests/test_server.py::TestAnalyzer::test_ruff_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 withSigstore
  • Container Signing: Docker images signed withCosign
  • 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

🤝 Contributing

Contributions are welcome! Please see ourContributing Guide for details.

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📝 License

This project is licensed under the MIT License - see theLICENSE file for details.

🙏 Acknowledgments


Made with ❤️ for better Python code quality

About

MCP server for Python code analysis with RUFF linting and VULTURE dead code detection

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp