Mcp Server Analyzer

io.github.Anselmoo由 GitHub 账号 Anselmoo 发布v0.4.1更新于 Oct 24, 2026

MCP server for Python, JavaScript, and TypeScript code analysis with Ruff, ty, Vulture, and Biome

已验证STDIO仅桌面开发者工具数据与分析

概览

AI 生成的概览

一个本地 MCP 服务器,让助手用 Ruff、ty、Vulture 和 Biome 对 Python 及 JavaScript/TypeScript 代码做检查、格式化、类型检查和死代码扫描。

可以做什么
用 Ruff 对 Python 代码做 lint 和格式化,并可输出适合 GitHub Actions、GitLab CI 等流水线的 CI 格式结果。用 ty 做 Python 类型检查,用 Vulture 找出未使用的导入、函数和变量。用 Biome 对 JavaScript 和 TypeScript 代码做 lint 和格式化。运行 Ruff、ty、Vulture 的组合分析,返回 0 到 100 的加权质量评分。
适用场景
适合需要助手审查或清理项目中 Python 或 JS/TS 代码的场景:发现风格问题和潜在缺陷、检查类型安全、清理死代码,或在提交和代码审查前快速给出质量评估。
运行要求
作为本地 stdio 进程运行,通常通过 uvx(PyPI 包)或 Docker 启动。需要 Python 3.13+ 以及 uv 或 pip;Biome 的 JS/TS 分析需要 Node.js 22+。未声明需要账号、API 密钥或环境变量。
安装前请注意
传给工具的代码会写入临时文件进行分析,随后删除;README 称不会发起外部网络请求,也不收集遥测数据。格式化工具可能改写代码,应用前应检查改动。分析以本地子进程方式运行,所安装分析工具的版本会影响结果。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Mcp Server Analyzer,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

MCP Server Analyzer for Python 🐍🔍

[SafeSkill 92/100]

[CI/CD Pipeline] [PyPI version] [Python 3.13+] [Docker] [License: MIT] [Code Coverage] [AgentSeal MCP] [Docs]

A powerful Model Context Protocol (MCP) server that provides comprehensive Python code analysis using Ruff for linting, ty for type checking, 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...

[Install with UV in VS Code] [Install with UV in VS Code Insiders]

[Install with Docker in VS Code] [Install 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 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 the mcp.json file.

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 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
  • 🧠 ty Type Checking: Fast Python type analysis with rule-based diagnostics
  • 🧹 Dead Code Detection: Find unused imports, functions, and variables with VULTURE
  • ⚡ Biome JS/TS Analysis: Fast linting and formatting for JavaScript and TypeScript
  • 📊 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
ty-checkType-check Python code with tyType safety, incorrect return values
vulture-scanDead code detectionUnused imports, functions, variables
biome-checkLint JS/TS code with BiomeStyle violations, potential errors
biome-formatFormat JS/TS code with BiomeCode formatting and consistency
analyze-codeCombined Ruff + ty + Vulture analysisComplete 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"]  }}

Claude Code (project-level)

Place .mcp.json at your project root:

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

🧪 Development

Prerequisites

  • Python 3.13+
  • uv (recommended) or pip
  • Node.js 22+ (for Biome JS/TS analysis)
  • Docker (optional)

Setup

bash
# Clone repositorygit clone https://github.com/anselmoo/mcp-server-analyzer.gitcd mcp-server-analyzer
# Install Python dependenciesuv sync --dev
# Install Biome (JS/TS analyzer)npm ci
# Run testsuv run pytest
# Run type checksuv run ty check src tests
# Run pre-commit hooksuv tool run pre-commit run --all-files
# Build Docker imagedocker build -t mcp-server-analyzer .

Testing

bash
# 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::TestAnalyzers::test_ruff_with_sample_code

📊 Quality Metrics

The server provides quality scoring based on:

  • Ruff Issues: Style violations, potential bugs, complexity metrics
  • ty Diagnostics: Static typing errors and warnings
  • 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
  • Security Policy: See SECURITY.md for vulnerability reporting

🔍 Data Handling & Transparency

  • In-memory only: Code passed to tools is written to a temporary file, analyzed, and the file is deleted immediately — nothing is persisted between calls.
  • No network calls: The server makes no outbound network connections during analysis.
  • No telemetry: No usage data, analytics, or crash reports are collected.
  • Subprocess isolation: ruff, ty, and vulture are invoked with fixed argument lists — no shell expansion or arbitrary command execution.

📚 Documentation

🤝 Contributing

Contributions are welcome! Please see CONTRIBUTING.md for details.

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes using Conventional Commits
  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 the LICENSE file for details.

🙏 Acknowledgments


Made with ❤️ for better Python code quality

来源:README.md,提交 ba675ff

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.4.1最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分