Dune Query MCP

by olaxbt

Integrations

  • Enables configuration through environment variables for API access and server settings, particularly for storing the Dune Analytics API key.

  • Provides a web interface and REST API endpoints as an alternative to the MCP service, allowing access to Dune Analytics data through HTTP requests.

  • Used for source code management and enables contribution to the project through a structured branching workflow.

デューンクエリMCP

モデル制御プロトコル (MCP) を介して Dune Analytics データをインテリジェント エージェントに接続する最新のブリッジ。

概要

dune-query-mcpは、ブロックチェーンデータ分析をAIアプリケーションにシームレスに統合することを可能にします。Dune Analyticsの強力なクエリ機能とモデル制御プロトコルを活用することで、LLMやその他のAIシステムは、シンプルな自然言語によるインタラクションを通じてオンチェーンデータにアクセスできるようになります。

コア機能

データ取得ツール

道具説明使用事例
get_latest_result事前に計算されたクエリ結果を取得します既存データへのクイックアクセス
run_queryオンデマンドでクエリを実行するリアルタイムデータ分析

データ形式

すべてのデータは CSV 形式で返され、次の情報が提供されます。

  • ユニバーサルな互換性
  • ほとんどのデータ分析ツールで簡単に解析可能
  • 人間が読める出力

はじめる

システム要件

クイックセットアップ

  1. クローンとナビゲート
    git clone https://github.com/olaxbt/dune-query-mcp-mcp.git cd dune-query-mcp
  2. 環境設定
    # Create virtual environment python -m venv .venv # Activate it source .venv/bin/activate # Linux/Mac # or .venv\Scripts\activate # Windows # Install dependencies pip install -r requirements.txt
  3. APIアクセスを構成する
    # Copy example config cp .env.example .env # Edit with your API key echo "DUNE_API_KEY=your_key_here" > .env

使用法

サービスの実行

dune-query-mcp には、次の 2 つの実行方法があります。

MCPサービスとして
python run.py

これにより、デフォルトのポート 8000 で MCP サービスが開始されます。

Webサーバーとして
python flask_app.py

これにより、Web インターフェースと REST API エンドポイントへのアクセスが提供されます。

アプリケーションとの統合

MCPクライアント統合
from mcp.client import Client # Connect to Dune-query-mcp client = Client("http://localhost:8000") # Get latest results for a query csv_data = client.call("get_latest_result", query_id=1234567) # Execute a query query_results = client.call("run_query", query_id=1234567)
REST API
終点方法説明
/dune/health得るサービスヘルスチェック
/dune/query/{query_id}/latest得る最新の結果を取得
/dune/query/{query_id}/execute役職クエリを実行する

REST呼び出しの例:

curl -X GET http://localhost:5000/dune/query/1234567/latest

建築

dune-query-mcp/ ├── app/ # Application core │ ├── __init__.py # Flask & MCP setup │ ├── routes/ # API endpoint definitions │ │ └── dune_routes/ # Dune Analytics routes │ │ └── templates/ # Web interface │ └── templates/ # Web interface ├── config/ # Configuration files ├── logs/ # Runtime logs ├── flask_app.py # Web server entry point ├── run.py # MCP server entry point └── requirements.txt # Dependencies

詳細設定

環境変数

変数目的デフォルト
DUNE_API_KEYDune API の認証なし(必須)
ポートサーバーポート8000

パフォーマンスチューニング

大量のクエリ実行の場合:

# Set a higher timeout for long-running queries export DUNE_QUERY_TIMEOUT=600 # 10 minutes in seconds

トラブルシューティング

よくある問題と解決策:

問題解決
APIキーエラー有効なキーを持つ.envファイルが存在することを確認する
タイムアウトエラー複雑なクエリのタイムアウトを増やす
CSV解析の問題クエリが適切な表形式データを返すかどうかを確認します

貢献

貢献を歓迎します!以下の手順に従ってください。

  1. リポジトリをフォークする
  2. 機能ブランチを作成する: git checkout -b feature/amazing-feature
  3. 変更をコミットします: git commit -am 'Add some amazing feature'
  4. ブランチにプッシュ: git push origin feature/amazing-feature
  5. プルリクエストを開く

ライセンス

このプロジェクトはMITライセンスの下で公開されています。詳細はLICENSEファイルをご覧ください。

謝辞

-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

モデル制御プロトコルを介して Dune Analytics ブロックチェーン データを AI アプリケーションに接続するブリッジ。これにより、LLM は自然言語による対話を通じてオンチェーン データにアクセスできるようになります。

  1. 概要
    1. コア機能
      1. データ取得ツール
      2. データ形式
    2. はじめる
      1. システム要件
      2. クイックセットアップ
    3. 使用法
      1. サービスの実行
      2. アプリケーションとの統合
    4. 建築
      1. 詳細設定
        1. 環境変数
        2. パフォーマンスチューニング
      2. トラブルシューティング
        1. 貢献
          1. ライセンス
            1. 謝辞

              Related MCP Servers

              • -
                security
                F
                license
                -
                quality
                A Model Context Protocol server that enables AI assistants to access Flow blockchain data and perform operations such as checking balances, resolving domains, executing scripts, and submitting transactions.
                Last updated -
                JavaScript
                • Linux
                • Apple
              • A
                security
                F
                license
                A
                quality
                Implements the Model Context Protocol to allow AI models to access and interact with blockchain data, including reading contract states, retrieving events, and accessing transaction information across various networks.
                Last updated -
                10
                45
                30
                TypeScript
              • -
                security
                -
                license
                -
                quality
                A Model Context Protocol server that provides onchain tools for AI applications to interact with the Hashkey Network, enabling cryptocurrency transfers, smart contract deployment, and blockchain interactions.
                Last updated -
                TypeScript
                MIT License
              • -
                security
                F
                license
                -
                quality
                A Solana blockchain interaction server that allows AI tools to query blockchain data using natural language, access structured token information, and generate human-readable explanations of complex blockchain concepts.
                Last updated -
                7
                Python
                • Linux
                • Apple

              View all related MCP servers

              ID: ada80zl0zr