Hedera Testnet Mirror Node MCP Server
OfficialHedera 测试网镜像节点 MCP 服务器
此代码库包含一个模型上下文协议 (MCP) 服务器,用于与 Hedera 测试网镜像节点 API 交互。该服务器使用FastMCP构建,这是一个用于创建 MCP 服务器的 TypeScript 框架。它使用Zod模式进行输入验证。
特征
端点集成:自动将以 OpenAPI 规范格式定义的 Hedera Mirror Node API 转换为与 MCP 兼容的工具。
服务器发送事件 (SSE) 支持:客户端无法通过 SSE 传输连接到此 MCP 服务器。
模式验证:确保请求参数符合使用 Zod 定义的模式。
Related MCP server: MyPostmanServer
先决条件
在运行服务器之前,请确保已安装以下内容:
Bun ,或者任何其他能够直接运行 Typescript 的环境。
安装
(1)克隆存储库
git clone https://github.com/hedera-dev/mirrornode-mcp-server(2)导航到项目目录
cd mirrornode-mcp-server(3)安装依赖项
npm install用法
要启动 MCP 服务器:
bun mcpServer.ts成功启动后,您应该看到:
MCP server started该服务器将可通过配置的 SSE 端点访问。
http://localhost:3333/hedera-testnet-mirror-node-api/sse
项目结构
mcpServer.ts:初始化并启动 MCP 服务器的入口点。openApiZod.ts:包含镜像节点 API 端点定义和使用zodiosAPI 客户端(如使用zod模式定义增强的axios)。请注意,此文件是使用
openapi-zod-client加上一些手动修改以编程方式生成的。
工作原理
(1)API客户端创建
使用createApiClient函数为 Hedera 测试网镜像节点创建一个 API 客户端。MCP 服务器充当此 HTTP API 客户端与其自身的 SSE 传输之间的代理。
(2)端点转换:
来自endpointDefinitions的每个端点定义都由convertZodiosToMcp函数处理,该函数:
验证端点是否使用
GET方法。将参数映射到 Zod 模式。
定义一个执行函数,进行相应的API调用并返回结果。
向 MCP 服务器注册该工具。
(3)服务器初始化:
MCP 服务器通过 SSE 传输启动。
依赖项
FastMCP :用于构建 MCP 服务器的框架。
Zod :TypeScript 优先的模式声明和验证库。
openapi-zod-client :从 OpenAPI 规范文件生成 Zodios 代码。
作者
执照
麻省理工学院
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA server for Model Context Protocol (MCP) that uses Server-Sent Events (SSE) for streaming communication, enabling tools like the HackerNews API to be accessed through a secure HTTP+SSE transport.29
- AlicenseNot gradedqualityDmaintenanceA lightweight Node.js-based MCP server that exposes custom tools via HTTP and Server-Sent Events (SSE) for clients like Postman. It allows users to register tools with type-safe validation to establish bidirectional communication with MCP clients.1,2701MIT
- FlicenseNot gradedqualityDmaintenanceA standalone MCP server that exposes API endpoints as tools for AI assistants by proxying requests to a target API defined in an OpenAPI specification. It supports various authentication methods and utilizes Server-Sent Events (SSE) to facilitate integration with clients like Claude and ChatGPT.
- FlicenseNot gradedqualityDmaintenanceMCP server that exposes Zulip REST API tools via SSE, enabling message retrieval, stream/topic listing, draft management, and notifications.
Related MCP Connectors
MCP server exposing the Backtest360 engine API as tools for AI agents.
MCP server for AI access to Swagger by SmartBear.
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/hedera-dev/mirrornode-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server