TS

trailofbits/slither-mcp

Developer tools公式

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

99 stars 11 forks 品質 69 トレンド 0AGPL-3.0

trailofbits/slither-mcp は、https://github.com/trailofbits/slither-mcp. からインポートされたMCPサーバー候補です。

概要

trailofbits/slither-mcp は、https://github.com/trailofbits/slither-mcp. からインポートされたMCPサーバー候補です。

概要(AI 翻訳)

Slitherを用いたSolidityスマートコントラクトの静的解析機能を提供するモデルコンテキストプロトコル(MCP)サーバーです。

概要

このMCPサーバーはSlitherの静的解析機能をラップし、Model Context Protocolを通じてアクセス可能にしています。Solidityプロジェクト(Foundry、Hardhatなど)を解析し、契約、関数、継承階層などの包括的なメタデータを生成できます。

また、Slither MCPは他の用途で使いやすいSlither APIとして使うこともできます。

特徴

  • キャッシュ:スリザー実行は{$PROJECT_PATH}/artifacts/project_facts.jsonにキャッシュされ、後続のロード速度が速くなります
  • MCPツール:MCPツールを通じた契約および機能情報の照会
  • セキュリティ分析:Slither検出器を運用し、フィルタリングで結果を閲覧する
  • 包括的分析:以下に関する詳細な情報を抽出します:
  • 契約メタデータ(抽象、インターフェース、ライブラリフラグ)
  • 関数シグネチャと修飾子
  • 継承階層
  • 関数呼び出し関係(内部、外部、ライブラリ呼び出し)
  • セキュリティ脆弱性およびコード品質の問題
  • ソースコードの位置

これはv1.0リリースですが、今後フィードバックが増えればAPIの変更が期待されています。

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

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

GitHub で README 全文を見る

インストール

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", } } }