Skip to content

MCP Server Analyzer

SafeSkill 92/100 CI/CD Pipeline PyPI version License: MIT

A Model Context Protocol (MCP) server providing comprehensive Python code analysis via Ruff linting, ty type checking, and Vulture dead code detection.

Quick Start

uvx mcp-server-analyzer
pip install mcp-server-analyzer
mcp-server-analyzer
docker run -i --rm ghcr.io/anselmoo/mcp-server-analyzer
git clone https://github.com/Anselmoo/mcp-server-analyzer.git
cd mcp-server-analyzer
uv sync --dev
uv run mcp-server-analyzer

Client Configuration

Add to claude_desktop_config.json:

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

Add to .vscode/mcp.json:

{
  "servers": {
    "analyzer": {
      "type": "stdio",
      "command": "uvx",
      "args": ["mcp-server-analyzer"]
    }
  }
}

Add to settings.json:

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

Place .mcp.json at the project root:

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

Features

Feature Description
Ruff linting Style violations, potential errors, auto-fix hints
Ruff formatting Code formatting and consistency
ty type checking Fast static type analysis
Vulture dead code Unused imports, functions, variables
Combined analysis Quality score (0-100) across all tools
CI output formats json, gitlab, github, sarif

Data Handling

  • Code is written to a temporary file, analyzed, then immediately deleted — nothing is persisted.
  • The server makes no outbound network calls during analysis.
  • No telemetry or usage data is collected.

Available Tools

See the Tools Reference for full parameter documentation.

Tool Purpose
ruff-check Lint Python code
ruff-format Format Python code
ruff-check-ci CI/CD optimized output
ty-check Type-check Python code
vulture-scan Dead code detection
analyze-code Combined analysis + score