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.

Dune 쿼리 MCP

모델 제어 프로토콜(MCP)을 통해 Dune Analytics 데이터를 지능형 에이전트에 연결하는 현대적인 브리지입니다.

개요

dune-query-mcp는 블록체인 데이터 분석을 AI 애플리케이션에 원활하게 통합할 수 있도록 지원합니다. Dune Analytics의 강력한 쿼리 기능과 모델 제어 프로토콜(MCP)을 활용하여 LLM 및 기타 AI 시스템이 간단하고 자연스러운 언어 상호작용을 통해 온체인 데이터에 액세스할 수 있도록 지원합니다.

핵심 역량

데이터 검색 도구

도구설명사용 사례
get_latest_result미리 계산된 쿼리 결과를 검색합니다.기존 데이터에 빠르게 액세스
run_query필요에 따라 쿼리를 실행합니다.실시간 데이터 분석

데이터 형식

모든 데이터는 CSV 형식으로 반환되며 다음이 제공됩니다.

  • 범용 호환성
  • 대부분의 데이터 분석 도구로 쉽게 구문 분석 가능
  • 사람이 읽을 수 있는 출력

시작하기

시스템 요구 사항

빠른 설정

  1. 복제 및 탐색지엑스피1
  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는 두 가지 실행 방법을 제공합니다.

MCP 서비스로서
python run.py

이렇게 하면 기본 포트 8000에서 MCP 서비스가 시작됩니다.

웹 서버로서
python flask_app.py

이를 통해 웹 인터페이스와 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