MCP Server Demo
About
An MCP server for Ethereum Name Service resolutions
Details
- Author
- josheleonard
- Downloads
- 306
- Categories
- Other
Jump to
- ENS name resolution (address to name)
- ENS address lookup (name to address)
- Server-Sent Events (SSE) for real-time communication
- Express.js HTTP server
- Built with MCP SDK and Zod validation
Install dependencies (npm install), build the server (npm run build), then start it (npm run start). The server listens on port 8080 and exposes two tools: get-ens-name (address → ENS name) and get-ens-address (ENS name → address), accessible via an SSE endpoint and a messages endpoint.
MCP Server Demo
This project demonstrates a Model Context Protocol (MCP) server implementation that provides Ethereum Name Service (ENS) lookup functionality. It's built using the MCP SDK and provides a simple HTTP server with Server-Sent Events (SSE) support.
Features
- ENS name resolution (address → name)
- ENS address lookup (name → address)
- Server-Sent Events (SSE) for real-time communication
- Express.js HTTP server
Available Tools
The server provides two main tools:
1. get-ens-name: Resolves an Ethereum address to its associated ENS name
- Input: Ethereum address (format: 0x...)
- Output: ENS name or "No ENS name found"
2. get-ens-address: Looks up the Ethereum address for an ENS name
- Input: ENS name (e.g., "vitalik.eth")
- Output: Ethereum address or "No ENS address found"
Technical Stack
- @modelcontextprotocol/sdk - MCP SDK for server implementation
- Express.js - Web server framework
- Viem - Ethereum interaction library
- Zod - Runtime type validation
Getting Started
1. Install dependencies:
npm install
2. Build the server:
npm run build
3. Start the server:
npm run start
The server will start on port 8080.
API Endpoints
- GET /sse - Establishes an SSE connection
- POST /messages - Handles incoming messages/requests
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



