ENS MCP Server

by justaname-id

5 stars
1.5k downloads
Not rated
GitHub Website

About

Integrates with the Ethereum Name Service to resolve ENS names to addresses, perform lookups, retrieve records, check availability, get prices, and explore name history through configurable Ethereum network providers.

Details

Author
justaname-id
Repository
JustaName-id/ens-mcp-server
GitHub stars
5
Downloads
1,504
License
MIT License
Categories
Cloud Service, Other, AI, Design, Developer Tools, Search, Knowledge Base, Infrastructure, Frontend
Tags
#crypto, #evm, #web-research

- Resolve ENS names to Ethereum addresses
- Perform reverse lookups from addresses to names
- Fetch text records like email, URL, or avatar
- Check ENS name availability for registration
- Retrieve comprehensive records for any ENS name
- List subdomains with owner information
- Get historical events for an ENS name
- Query registration price with optional duration

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name ENS MCP Server
    Command (node, npx, python, etc.) npx
    Arguments
    • Argument 1 -y
    • Argument 2 mcp-server-ens
    Environment
    • PROVIDER_URL https://your-provider-url.com,https://your-backup-provider.com

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

1. Clone the repository or create a new project:

git clone https://github.com/JustaName-id/ens-mcp-server

2. Install dependencies:

npm i

3. Configure Ethereum providers:
Create a .env file in the project root with the following (optional):

PROVIDER_URL=https://your-provider-url.com,https://your-backup-provider.com

If no providers are specified, the server will use these defaults:
- https://eth.drpc.org
- https://eth.llamarpc.com
- https://ethereum.publicnode.com
- https://rpc.ankr.com/eth

Add the following to your claude_desktop_config.json:

claude mcp add ens -- npx -y mcp-server-ens

With custom providers:

claude mcp add ens -e PROVIDER_URL="https://your-provider-url.com" -- npx -y mcp-server-ens

Verify it's connected:

claude mcp list

resolve-name

Resolve an ENS name to an Ethereum address. Required input: name (string) - The ENS name to resolve (e.g., 'vitalik.eth'). Returns the corresponding Ethereum address or an error message.

reverse-lookup

Get the ENS name for an Ethereum address. Required input: address (string) - The Ethereum address to look up. Returns the corresponding ENS name or an indication that no name was found.

get-text-record

Get a text record for an ENS name. Required inputs: name (string) - The ENS name to query; key (string) - The record key to look up (e.g., 'email', 'url', 'avatar', 'description', 'twitter', etc.). Returns the value of the specified text record or indication that no record was found.

check-availability

Check if an ENS name is available for registration. Required input: name (string) - The ENS name to check. Returns availability status and owner information if registered.

get-all-records

Get all available information for an ENS name. Required input: name (string) - The ENS name to query. Returns comprehensive information including resolver address, text records, addresses, content hash, ownership, and expiration details.

get-subdomains

Get subdomains for an ENS name. Required input: name (string) - The ENS name to query for subdomains. Returns a list of subdomains with their owner information.

get-name-history

Get the history of an ENS name. Required input: name (string) - The ENS name to check history for. Returns historical events related to the name, including transfers, resolver changes, and registration events.

get-registration-price

Get the price to register an ENS name. Required input: name (string) - The ENS name to check price for. Optional input: duration (number, default: 1) - Registration duration in years. Returns registration price breakdown including base price, premium, and total.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "ens mcp server": {
            "env": {
                "PROVIDER_URL": "https://your-provider-url.com,https://your-backup-provider.com"
            },
            "args": [
                "-y",
                "mcp-server-ens"
            ],
            "command": "npx"
        }
    }
}

Linux

{
    "env": {
        "PROVIDER_URL": "https://your-provider-url.com,https://your-backup-provider.com"
    },
    "args": [
        "-y",
        "mcp-server-ens"
    ],
    "command": "npx"
}

Macos

{
    "env": {
        "PROVIDER_URL": "https://your-provider-url.com,https://your-backup-provider.com"
    },
    "args": [
        "-y",
        "mcp-server-ens"
    ],
    "command": "npx"
}

Windows

{
    "env": {
        "PROVIDER_URL": "https://your-provider-url.com,https://your-backup-provider.com"
    },
    "args": [
        "/c",
        "npx",
        "-y",
        "mcp-server-ens"
    ],
    "command": "cmd"
}

ENS MCP Server

MCP Server for Ethereum Name Service (ENS), enabling Claude to interact with the ENS system to resolve names, check availability, retrieve records, and more.

npm package: https://www.npmjs.com/package/mcp-server-ens

Tools

resolve-name

Resolve an ENS name to an Ethereum address - Required inputs: - name (string): The ENS name to resolve (e.g., 'vitalik.eth') - Returns: The corresponding Ethereum address or an error message

reverse-lookup

Get the ENS name for an Ethereum address - Required inputs: - address (string): The Ethereum address to look up - Returns: The corresponding ENS name or an indication that no name was found

get-text-record

Get a text record for an ENS name - Required inputs: - name (string): The ENS name to query - key (string): The record key to look up (e.g., 'email', 'url', 'avatar', 'description', 'twitter', etc.) - Returns: The value of the specified text record or indication that no record was found

check-availability

Check if an ENS name is available for registration - Required inputs: - name (string): The ENS name to check - Returns: Availability status and owner information if registered

get-all-records

Get all available information for an ENS name - Required inputs: - name (string): The ENS name to query - Returns: Comprehensive information including resolver address, text records, addresses, content hash, ownership, and expiration details

get-subdomains

Get subdomains for an ENS name - Required inputs: - name (string): The ENS name to query for subdomains - Returns: List of subdomains with their owner information

get-name-history

Get the history of an ENS name - Required inputs: - name (string): The ENS name to check history for - Returns: Historical events related to the name, including transfers, resolver changes, and registration events

get-registration-price

Get the price to register an ENS name - Required inputs: - name (string): The ENS name to check price for - Optional inputs: - duration (number, default: 1): Registration duration in years - Returns: Registration price breakdown including base price, premium, and total

Setup

Prerequisites

- Node.js (v16 or higher) - npm or yarn - Access to Ethereum RPC providers (public or private)

Installation

1. Clone the repository or create a new project:

git clone https://github.com/JustaName-id/ens-mcp-server

2. Install dependencies:

npm i

3. Configure Ethereum providers:
Create a .env file in the project root with the following (optional):

PROVIDER_URL=https://your-provider-url.com,https://your-backup-provider.com

If no providers are specified, the server will use these defaults:
- https://eth.drpc.org
- https://eth.llamarpc.com
- https://ethereum.publicnode.com
- https://rpc.ankr.com/eth

Usage with Claude Desktop

Add the following to your claude_desktop_config.json:

Using npx

{
  "mcpServers": {
    "ens": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-server-ens"
      ],
      "env": {
        "PROVIDER_URL": "https://your-provider-url.com,https://your-backup-provider.com"
      }
    }
  }
}

Using local script

{
  "mcpServers": {
    "ens": {
      "command": "node",
      "args": [
        "/path/to/your/server.js"
      ],
      "env": {
        "PROVIDER_URL": "https://your-provider-url.com,https://your-backup-provider.com"
      }
    }
  }
}

Usage with Claude Code

claude mcp add ens -- npx -y mcp-server-ens

With custom providers:

claude mcp add ens -e PROVIDER_URL="https://your-provider-url.com" -- npx -y mcp-server-ens

Verify it's connected:

claude mcp list

Error Handling

The server implements robust error handling for various scenarios:
- Network errors connecting to Ethereum providers
- Invalid ENS names or Ethereum addresses
- ENS-specific errors
- General operational errors

All errors are normalized into user-friendly messages while preserving technical details for debugging.

Publishing

To publish as an npm package:

npm publish --access public

Troubleshooting

If you encounter errors:
- Verify your Ethereum providers are working and accessible
- Check that the ENS names you're querying are formatted correctly
- Ensure you have the latest version of the ENS libraries
- Try using multiple providers by comma-separating them in the PROVIDER_URL environment variable

License

This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.