TS

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

99 stars 11 forks Качество 69 Тренд 0AGPL-3.0

trailofbits/slither-mcp — это кандидат на MCP-сервер, импортированный из https://github.com/trailofbits/slither-mcp.

Обзор

trailofbits/slither-mcp — это кандидат на MCP-сервер, импортированный из https://github.com/trailofbits/slither-mcp.

Обзор (машинный перевод)

Сервер Model Context Protocol (MCP), предоставляющий возможности статического анализа для смарт-контрактов Solidity с использованием Slither.

Обзор

Этот MCP-сервер охватывает функции статического анализа Slither, делая его доступным через протокол Model Context Protocol. Он может анализировать проекты Solidity (Foundry, Hardhat и др.) и генерировать комплексные метаданные о контрактах, функциях, иерархиях наследования и многом другом.

Также можно использовать Slither MCP как простой в использовании API Slither для других случаев.

Особенности

  • Кэширование: Запуски слизера кэшируются в {$PROJECT_PATH}/artifacts/project_facts.json для более быстрой последующей загрузки
  • MCP Tools: Запрос информации о контрактах и функциях через MCP-инструменты
  • Анализ безопасности: Запуск детекторов Slither и доступ к результатам с помощью фильтрации
  • Всесторонний анализ: Извлекает подробную информацию о:
  • Метаданные контракта (аннотация, интерфейс, флаги библиотеки)
  • Функциональные сигнатуры и модификаторы
  • Иерархии наследования
  • Связи вызовов функций (внутренние, внешние, библиотечные вызовы)
  • Уязвимости безопасности и вопросы качества кода
  • Расположение исходного кода

Хотя это версия версии 1.0, мы ожидаем изменений API по мере получения новых отзывов.

Эта страница переведена автоматически. Технические детали смотрите в оригинале.

README

Показан фрагмент оригинального README. Открыть оригинал.

Slither MCP Server

A Model Context Protocol (MCP) server that provides static analysis capabilities for Solidity smart contracts using Slither.

Overview

This MCP server wraps Slither static analysis functionality, making it accessible through the Model Context Protocol. It can analyze Solidity projects (Foundry, Hardhat, etc.) and generate comprehensive metadata about contracts, functions, inheritance hierarchies, and more.

You can also use Slither MCP as an easy-to-use Slither API for other use cases.

Features

  • Caching: Slither runs are cached to {$PROJECT_PATH}/artifacts/project_facts.json for faster subsequent loads
  • MCP Tools: Query contract and function information through MCP tools
  • Security Analysis: Run Slither detectors and access results with filtering
  • Comprehensive Analysis: Extracts detailed information about:
    • Contract metadata (abstract, interface, library flags)
    • Function signatures and modifiers
    • Inheritance hierarchies
    • Function call relationships (internal, external, library calls)
    • Security vulnerabilities and code quality issues
    • Source code locations

While this is a v1.0 release, we anticipate API changes as we receive more feedback.

Installation

This project uses UV for package management:

# Install dependencies
uv sync

# Or install in development mode
uv pip install -e .

Usage

Basic Usage

Start the Slither MCP server:

uv run slither-mcp

All tools accept a path parameter that specifies which Solidity project to analyze. Projects are automatically cached in /artifacts/project_facts.json for faster subsequent queries.

Use in Claude Code

claude mcp add --transport stdio --scope user slither -- uvx --from git+https://github.com/trailofbits/slither-mcp slither-mcp

Use in Cursor

Make sure uvx is on your Cursor path using sudo ln -s ~/.local/bin/uvx /usr/local/bin/uvx

In your ~/.cursor/mcp.json:

{
  "mcpServers": {
    "slither-mcp": {
      "command": "uvx --from git+https://github.com/trailofbits/slither-mcp slither-mcp",
    }
  }
}

Metrics and Privacy

Slither MCP includes opt-out metrics to help improve reliability by letting us know how often LLMs use each tool and their successful call rate. Metrics are enabled by default but can be permanently disabled.

What We Collect

Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "slither-mcp": { "command": "uvx --from git+https://github.com/trailofbits/slither-mcp slither-mcp", } } }