Hedera Testnet Mirror Node MCP Server logo

Hedera Testnet Mirror Node MCP Server

by MCP-Mirror

This repository contains a Model Context Protocol (MCP) server that interfaces with the Hedera Testnet Mirror Node API. It converts Hedera Mirror Node APIs into MCP-compatible tools using FastMCP and Zod.

View on GitHub

Last updated: N/A

What is Hedera Testnet Mirror Node MCP Server?

This is an MCP server that acts as a proxy between a client and the Hedera Testnet Mirror Node API. It converts the Hedera Mirror Node APIs into tools that can be accessed via the MCP protocol.

How to use Hedera Testnet Mirror Node MCP Server?

  1. Clone the repository. 2. Navigate to the project directory. 3. Install dependencies using npm install. 4. Start the server using bun mcpServer.ts. The server will be accessible via the configured SSE endpoint.

Key features of Hedera Testnet Mirror Node MCP Server

  • Endpoint Integration: Converts Hedera Mirror Node APIs into MCP-compatible tools.

  • Server-Sent Events (SSE) Support: Provides an SSE endpoint for client connections.

  • Schema Validation: Ensures request parameters adhere to defined schemas using Zod.

  • Uses FastMCP framework for building MCP servers.

Use cases of Hedera Testnet Mirror Node MCP Server

  • Accessing Hedera Testnet Mirror Node data via MCP.

  • Building applications that require real-time updates from the Hedera Testnet.

  • Integrating Hedera Testnet data into existing MCP-based systems.

FAQ from Hedera Testnet Mirror Node MCP Server

What is FastMCP?

FastMCP is a TypeScript framework for creating MCP servers.

What is Zod?

Zod is a TypeScript-first schema declaration and validation library.

What is the purpose of openapi-zod-client?

openapi-zod-client generates Zodios code from an OpenAPI specification file, which is used to define the Hedera Mirror Node API endpoints.

What is the entry point of the server?

The entry point is mcpServer.ts, which initializes and starts the MCP server.

How does the server convert API endpoints?

Each endpoint definition is processed by the convertZodiosToMcp function, which validates the method, maps parameters to Zod schemas, defines an execution function, and registers the tool with the MCP server.