Skip to main content
Glama

Ethereum RPC MCP Server

by 0xKoda

以太坊 RPC MCP 服务器

用于与以太坊区块链交互的模型上下文协议 (MCP) 服务器。

概述

该 MCP 服务器提供通过标准 JSON-RPC 方法查询以太坊区块链数据的工具。它使 AI 助手和应用程序能够通过标准化协议与以太坊区块链进行交互。

特征

该 MCP 服务器提供了三种关键的以太坊 RPC 方法作为工具:

  • eth_getCode :检索特定以太坊地址的代码
  • eth_gasPrice :获取以太坊网络上的当前 gas 价格
  • eth_getBalance :检查以太坊账户的余额

注:更多内容即将推出

用法

添加到光标

要将此 MCP 添加到 Cursor:

  1. 首先,克隆此存储库:
    git clone https://github.com/yourusername/eth-mpc.git
  2. 前往 Cursor 设置 → MCP → 添加新的 MCP 服务器
  3. 输入名称(例如“eth-mcp”)
  4. 选择“命令”作为类型
  5. 输入脚本的完整路径:
    node /path/to/eth-mpc/index.js

将以太坊 MCP 添加到 Cursor

  1. 点击“添加”以启用服务器

一旦添加,以太坊 RPC 工具将可在 Cursor 中使用。

该服务器使用 stdio 传输,使其与 Claude Desktop、Cursor 等 MCP 客户端兼容。

使用 MCP Inspector 进行测试

MCP Inspector 是一款用于测试和调试 MCP 服务器的开发工具。它提供了一个交互式界面,无需完整的 AI 客户端即可测试 MCP 服务器的功能。

运行检查器

要使用检查器测试您的以太坊 RPC MCP 服务器:

要运行检查器:

npx @modelcontextprotocol/inspector
  1. 输入命令和路径
  2. 检查器将连接到您正在运行的 MCP 服务器并显示可用的工具。

使用 Inspector 测试工具

检查器允许您:

  • 查看可用的工具及其描述
  • 使用不同的参数测试每个工具
  • 以结构化格式查看回复
  • 调试 MCP 服务器实施过程中的任何问题

例如,要测试eth_getBalance工具:

  1. 在检查器界面中选择工具
  2. 输入有效的以太坊地址(例如, 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 - Vitalik 的地址)
  3. 使用默认区块参数( latest
  4. 提交请求并查看响应

与 MCP 客户端集成

该 MCP 服务器可以与任何兼容 MCP 的客户端集成,包括:

  • 克劳德桌面
  • 克劳德·科德
  • 光标(上面的说明)
  • 克莱恩
  • 其他 MCP 兼容应用程序

集成后,客户端应用程序可以使用该服务器提供的工具直接查询以太坊区块链数据。

了解 MCP

模型上下文协议 (MCP) 是一项开放标准,允许 AI 模型与各种工具和服务进行交互。它为开发者提供了一种标准化的方式,可以向 AI 助手公开 API、数据源和功能。

了解有关 MCP 的更多信息

像这样的 MCP 服务器构成了生态系统的一部分,允许 AI 助手跨多个服务执行复杂任务,而无需为每个服务进行定制集成。

📚官方文档模型上下文协议概述

执照

麻省理工学院

贡献

欢迎贡献代码!欢迎提交 Pull 请求。

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

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.

为 AI 助手提供通过标准 JSON-RPC 方法与以太坊区块链交互的工具,从而实现对账户余额、gas 价格和智能合约代码的查询。

  1. 概述
    1. 特征
      1. 用法
        1. 添加到光标
      2. 使用 MCP Inspector 进行测试
        1. 运行检查器
        2. 使用 Inspector 测试工具
      3. 与 MCP 客户端集成
        1. 了解 MCP
          1. 了解有关 MCP 的更多信息
        2. 执照
          1. 贡献

            Related MCP Servers

            • -
              security
              F
              license
              -
              quality
              Enables secure interactions with cryptocurrency daemon RPC interfaces through AI assistants, supporting transaction management, wallet operations, and daemon monitoring for Bitcoin-derived cryptocurrencies.
              Last updated -
              1
              TypeScript
              • Apple
            • -
              security
              A
              license
              -
              quality
              A secure system enabling AI assistants to interact with blockchain data and prepare transactions while ensuring users maintain exclusive control over their private keys and transaction signing.
              Last updated -
              3
              TypeScript
              MIT License
            • -
              security
              A
              license
              -
              quality
              Provides onchain tools for Claude AI to interact with the Base blockchain and Coinbase API, enabling wallet management, fund transfers, and smart contract deployment.
              Last updated -
              136
              204
              TypeScript
              MIT License
              • Apple
              • Linux
            • -
              security
              A
              license
              -
              quality
              A comprehensive toolkit for building AI agents with blockchain capabilities, enabling interactions with multiple blockchain networks for tasks like wallet management, fund transfers, smart contract interactions, and cross-chain asset bridging.
              Last updated -
              2
              TypeScript
              GPL 3.0
              • Linux
              • Apple

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/0xKoda/eth-mcp'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server