BM

blockscout/mcp-server

开发工具官方

本页由 AI 翻译,技术细节请以原文为准。 查看原文

47 stars 30 forks 质量 75 趋势 8NOASSERTION

blockscout/mcp-server 是从 https://github.com/blockscout/mcp-server. 导入的 MCP 服务器候选服务器。

概览

blockscout/mcp-server 是从 https://github.com/blockscout/mcp-server. 导入的 MCP 服务器候选服务器。

概述(AI 翻译)

模型上下文协议(MCP)是一种开放协议,旨在允许人工智能代理、集成开发环境(IDE)和自动化工具通过上下文感知API来使用、查询和分析结构化数据。

该服务器包裹了 Blockscout API,并通过 MCP 公开区块链数据——余额、代币、NFT、合约元数据,使 AI 代理和工具(如 Claude、Cursor 或 IDE)能够上下文访问和分析。

主要功能:

  • 为人工智能工具提供上下文区块链数据访问
  • 通过Blockscout PRO API配置支持多链,并支持Chainscout元数据丰富
  • 版本化REST API:为所有MCP工具提供标准的、友好的网页界面。完整文档请参见 API.md。
  • 为MCP主机使用服务器提供自定义说明
  • 智能上下文优化,在保持数据可访问性的情况下保护LLM令牌
  • 智能响应切片,支持可配置页面大小,防止上下文溢出
  • 使用Base64URL编码字符串代替复杂参数的不透明光标分页
  • 自动截断大型数据字段,带有清晰的指示和访问指导
  • 标准化工具响应模型,包含结构化JSON响应和后续指令

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Blockscout MCP Server

The Model Context Protocol (MCP) is an open protocol designed to allow AI agents, IDEs, and automation tools to consume, query, and analyze structured data through context-aware APIs.

This server wraps Blockscout APIs and exposes blockchain data—balances, tokens, NFTs, contract metadata—via MCP so that AI agents and tools (like Claude, Cursor, or IDEs) can access and analyze it contextually.

Key Features:

  • Contextual blockchain data access for AI tools
  • Multi-chain support via Blockscout PRO API configuration with Chainscout metadata enrichment
  • Versioned REST API: Provides a standard, web-friendly interface to all MCP tools. See API.md for full documentation.
  • Custom instructions for MCP host to use the server
  • Intelligent context optimization to conserve LLM tokens while preserving data accessibility
  • Smart response slicing with configurable page sizes to prevent context overflow
  • Opaque cursor pagination using Base64URL-encoded strings instead of complex parameters
  • Automatic truncation of large data fields with clear indicators and access guidance
  • Standardized ToolResponse model with structured JSON responses and follow-up instructions
  • Enhanced observability with MCP progress notifications and periodic updates for long-running operations

Enhanced Analysis with Agent Skills

For more powerful and efficient blockchain analysis, install the Blockscout Analysis skill from the agent-skills repository. This skill provides AI agents with structured guidance for execution strategies, response handling, security best practices, and workflow orchestration.

Learn more: See the agent-skills README for full capabilities and installation instructions.

Configuring MCP Clients

Blockscout PRO API Key

Configuring the Blockscout MCP server with an AI agent requires a Blockscout PRO API key. Most of the data tools route their requests through the authenticated Blockscout PRO API gateway, so without a valid key those tools fail fast before making any upstream request.

To obtain a key, register on the Blockscout Developer Portal (the free tier does not require a credit card) and generate an API key; keys are prefixed proapi_. Then supply it when configuring your client, as shown in the sections below.

在 GitHub 查看完整 README

安装

docker run --rm -i ghcr.io/blockscout/mcp-server:latest
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "blockscout": { "url": "https://mcp.blockscout.com/mcp", "timeout": 180000, "headers": { "Blockscout-MCP-Pro-Api-Key": "proapi_your_key_here" } } } }