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 分