About MCP Server Demo
MCP Server Demo is an MCP server example that resolves Ethereum addresses to ENS names and ENS names to addresses. It is intended to demonstrate ENS lookup tools over an Express.js HTTP server with Server-Sent Events support.
Key features
- 01Resolve Ethereum addresses to ENS names
- 02Look up addresses from ENS names
- 03SSE communication
- 04Express.js HTTP server
Use cases
- 01Find the ENS name associated with an address
- 02Resolve an ENS name such as vitalik.eth to an address
MCP support
The server exposes `get-ens-name` and `get-ens-address` tools to MCP clients. It supports SSE communication over its HTTP server.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEMCP 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:
-
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"
-
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
-
Install dependencies:
npm install -
Build the server:
npm run build -
Start the server:
npm run start
The server will start on port 8080.
API Endpoints
GET /sse- Establishes an SSE connectionPOST /messages- Handles incoming messages/requests
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.