Ens Registration Agent
An autonomous ENS registration service. Point your agent at this API, pay with USDC on Base via the x402 payment protocol, and get a .eth name registered on Ethereum mainnet. No need to interact with ENS contracts directly β the service handles the two-step commit-reveal process for you.
Installation
npx ens-registration-agentAsk AI about Ens Registration Agent
Powered by Claude Β· Grounded in docs
I know everything about Ens Registration Agent. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
ENS Registration Agent - MCP Server
An MCP server that exposes ENS registration capabilities to other AI agents.
Status: MVP Complete
All three core MCP tools are implemented and tested:
checkAvailability- Check if an ENS name is availablegetRegistrationPrice- Get the price for registering an ENS nameregisterName- Register an ENS name (commit-reveal process)
Quick Start
Prerequisites
Run Tests
deno task test
Start MCP Server
# Copy and configure environment
cp .env.example .env
# Edit .env with your RPC_URL and optionally PRIVATE_KEY
# Start the server
deno task dev
Configure with Claude Desktop
Add to your Claude Desktop config
(~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"ens-agent": {
"command": "deno",
"args": [
"run",
"--allow-net",
"--allow-env",
"--allow-read",
"/path/to/montevideo/src/main.ts"
],
"env": {
"NETWORK": "mainnet",
"RPC_URL": "https://eth-mainnet.g.alchemy.com/v2/YOUR_API_KEY"
}
}
}
}
MCP Tools
checkAvailability
Check if an ENS name is available for registration.
Input:
name(string): ENS name (must end with .eth)
Output:
{ "name": "example.eth", "available": true }
getRegistrationPrice
Get the price for registering an ENS name.
Input:
name(string): ENS name (must end with .eth)years(number, default: 1): Registration duration
Output:
{
"name": "example.eth",
"years": 1,
"baseWei": "3155760000000000",
"premiumWei": "0",
"totalWei": "3155760000000000",
"totalEth": "0.00315576"
}
registerName
Register an ENS name. Requires PRIVATE_KEY environment variable.
Input:
name(string): ENS name (must end with .eth)years(number, default: 1): Registration durationowner(string): Owner - accepts Ethereum address (0x...) or any ENS-resolvable name
Output:
{
"success": true,
"name": "example.eth",
"owner": "0x...",
"durationSeconds": 31536000,
"commitTxHash": "0x...",
"registerTxHash": "0x..."
}
Environment Variables
| Variable | Required | Description |
|---|---|---|
NETWORK | No | mainnet (default) or sepolia |
RPC_URL | No | RPC endpoint (uses public if not set) |
PRIVATE_KEY | For registerName | Wallet private key for transactions |
Tech Stack
- Runtime: Deno 2.x
- ENS: @ensdomains/ensjs v4 + viem v2
- MCP: @modelcontextprotocol/sdk v1
- Testing: Deno's built-in test runner
Project Structure
ens-registration-agent/
βββ deno.json # Deno config + imports
βββ .env.example # Required env vars
βββ src/
β βββ main.ts # MCP server entry point
β βββ ens/
β βββ client.ts # ENS client setup
β βββ availability.ts
β βββ pricing.ts
β βββ registration.ts
β βββ utils.ts
βββ tests/
βββ availability.test.ts
βββ pricing.test.ts
βββ registration.test.ts
Development with Devcontainer
For isolated development where Claude Code can run with
--dangerously-skip-permissions:
- Open in VS Code/Cursor β "Reopen in Container"
- Inside the container, run:
claude --dangerously-skip-permissions
The container includes Deno, Foundry (cast), GitHub CLI, and Claude Code. No
secrets (like PRIVATE_KEY) are mounted β only non-sensitive config. ENS
registrations should be done from the host.
Browser testing: To give the container access to Chrome on your host:
# On host
./scripts/launch-chrome-debug.sh
# From container, connect to host.docker.internal:9222
Contributing
Follow TDD (Test-Driven Development) with small, atomic commits:
- Write a failing test β commit
- Make the test pass β commit
- Refactor if needed β commit
Each commit should be independently revertible. Keep changes small and focused.
Commit messages
test: add failing test for Xfeat: implement Xrefactor: extract Y into Zfix: handle edge case in Xchore: update dependencies
Next Steps
- x402 payment integration for charging callers
- Test on Ethereum mainnet
- Deploy (Coolify at https://ens-registration.oskamai.com)
- ENS name for the agent (ens-registration-agent.ses.eth)
- Add to ERC-8004 registry (Base #19151, Mainnet #26433)
- Marketing β list on directories (see below)
- Extend existing names feature
- Base names / Celo names support
- Name suggestions
Agent Directories & Registries
- ERC-8004 β on-chain agent registry (Ethereum, Base, BNB Chain)
- agent.ai β professional network for AI agents
- AI Agents Directory β 2,100+ agents, 73+ categories
- awesome-ai-agents β popular GitHub list
- AI Agent Store β marketplace with free listing
- TrillionAgent β free to submit
- Google Cloud Agent Finder β Google's directory
