使用说明
ENS MCP 服务器
为您的AI助手提供ENS(以太坊名称服务)的本地访问权限。查找ENS名称、配置文件信息、检查名称可用性、获取定价、探索子名称和查询链上记录——所有这些都是通过自然语言完成的。
安装
连接到ENS MCP服务器:
https://ens-mcp.namespace.ninja/mcp
Cursor
添加 ~/.cursor/mcp.json:
{
"mcpServers": {
"ens": {
"url": "https://ens-mcp.namespace.ninja/mcp"
}
}
}
VS Code
添加 .vscode/mcp.json:
{
"servers": {
"ens": {
"type": "http",
"url": "https://ens-mcp.namespace.ninja/mcp"
}
}
}
Claude Code
claude mcp add --transport http ens https://ens-mcp.namespace.ninja/mcp
Claude Desktop
添加到您的配置文件中:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - 窗户:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"ens": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://ens-mcp.namespace.ninja/mcp"]
}
}
}
Codex
codex mcp add ens --url https://ens-mcp.namespace.ninja/mcp
OpenCode
添加到您的 opencode.json:
{
"mcp": {
"ens": {
"type": "remote",
"url": "https://ens-mcp.namespace.ninja/mcp",
"enabled": true
}
}
}
Antigravity
打开MCP Store面板(从侧面板中的“…”下拉列表中),然后添加一个自定义服务器:
https://ens-mcp.namespace.ninja/mcp
Windsurf
添加 ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"ens": {
"serverUrl": "https://ens-mcp.namespace.ninja/mcp"
}
}
}
Zed
添加到Zed设置中:
{
"context_servers": {
"ens": {
"url": "https://ens-mcp.namespace.ninja/mcp"
}
}
}
Gemini CLI
添加 ~/.gemini/settings.json:
{
"mcpServers": {
"ens": {
"httpUrl": "https://ens-mcp.namespace.ninja/mcp"
}
}
}
Warp
首选 设置 > MCP服务器 > 添加MCP服务器 并添加:
{
"ens": {
"url": "https://ens-mcp.namespace.ninja/mcp"
}
}
Kiro
添加 ~/.kiro/settings/mcp.json:
{
"mcpServers": {
"ens": {
"url": "https://ens-mcp.namespace.ninja/mcp"
}
}
}
Roo Code
添加到您的Roo代码MCP配置中:
{
"mcpServers": {
"ens": {
"type": "streamable-http",
"url": "https://ens-mcp.namespace.ninja/mcp"
}
}
}
Other Clients
对于支持远程MCP的客户端:
{
"mcpServers": {
"ens": {
"url": "https://ens-mcp.namespace.ninja/mcp"
}
}
}
对于需要mcp-remote的客户端:
{
"mcpServers": {
"ens": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://ens-mcp.namespace.ninja/mcp"]
}
}
}
Self-Hosting
您还可以使用npm包自托管ENS MCP服务器。
标准运输:
npx -y ens-mcp
HTTP传输:
npx -y ens-mcp --http --port 8080
服务器将在以下时间可用 http://localhost:8080/mcp.
环境变量:
| 变量 | 描述 | 默认值 |
|---|---|---|
RPC_URL |
以太坊主网RPC URL | Viem提供的公共RPC |
SUBGRAPH_URL |
ENS子图URL | ENSNode公共子图 |
自定义RPC和子图示例:
RPC_URL=https://your-rpc-provider.com SUBGRAPH_URL=https://your-subgraph-provider.com npx -y ens-mcp
💬 自然语言查询示例
安装ENS MCP后,您可以询问以下问题:
1️⃣ Basic Lookup
> Who owns vitalik.eth?
2️⃣ Resolver & Expiry
> What is the resolver and expiry date of vitalik.eth?
3️⃣ Records & Addresses
> Give me the ETH address and Twitter handle for vitalik.eth.
4️⃣ Reverse Lookup
> What ENS names are owned by 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045?
5️⃣ Subnames
> List all subdomains under base.eth.
6️⃣ Portfolio Analysis
> Show me all ENS names owned by this address and tell me which ones are expiring soon.
7️⃣ Conditional Acquisition Strategy
> I want to get example.eth. How much does it cost for 2 years? And if it’s not available, give me the owner details and socials so I can contact them.
8️⃣ Names for Address
> What are the names owned by 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045?
9️⃣ Subnames for Name
> What are the subnames under vitalik.eth?
1️⃣0️⃣ Name History
> when was the last time vitalik.eth changed its content hash?
可用工具
| 工具 | 说明 |
|---|---|
is_name_available |
检查ENS名称当前是否可用于注册 |
get_name_price |
获取给定持续时间内名称的注册价格(秒) |
get_profile_details |
获取完整的ENS配置文件:所有者、解析器、到期日、文本记录、地址记录和contenthash |
get_names_for_address |
列出给定地址持有的所有ENS名称 |
get_subnames_for_name |
检索在父ENS名称下注册的所有子域 |
get_name_history |
检索任何ENS名称的事件历史记录 |
get_subgraph_records |
查询与名称关联的所有记录键 |
贡献
欢迎捐款。欢迎打开PR。
建于❤️ 通过 命名空间 忍者🥷