Skip to content

ENS Omnigraph MCP (AI agents)

Every ENSNode instance exposes the ENS Omnigraph API over the Model Context Protocol at /api/mcp, using the streamable-HTTP transport. This lets MCP clients — Cursor, Claude Desktop, and any agent that speaks MCP — run Omnigraph queries directly.

It’s first-party and built in: the same endpoint works locally (http://localhost:4334/api/mcp) and against any hosted instance, so there’s nothing to install or deploy — point your client at a URL and go.

The server exposes a single, read-only tool:

  • omnigraph_query — accepts a GraphQL query (and optional variables) and returns the raw { data, errors } JSON, exactly as the HTTP endpoint does. Because it’s the full Omnigraph behind one tool, an agent can answer any question the Omnigraph can — resolve records, search Domains, list a user’s Domains, and much more — without a fixed, hand-written tool per use case.

Point your MCP client at the endpoint. For a NameHash-hosted instance:

mcp.json
{
"mcpServers": {
"ensnode-omnigraph": {
"url": "https://api.v2-sepolia.ensnode.io/api/mcp"
}
}
}

For local development, use your instance’s URL instead:

mcp.json
{
"mcpServers": {
"ensnode-omnigraph": {
"url": "http://localhost:4334/api/mcp"
}
}
}

The MCP endpoint runs whatever GraphQL you hand it — it does not author queries for you. To discover the schema and write correct queries:

  • Explore interactively in the GraphiQL playground at /api/omnigraph.
  • Browse the Omnigraph Schema Reference and Omnigraph examples.
  • Give your agent the ensskills omnigraph skill, which teaches the unified ENSv1 + ENSv2 datamodel, resolution, pagination, and vetted example queries — so it writes queries that work the first time.
  • Want to call the same API over plain HTTP, curl, or your own GraphQL client? See the ENS Omnigraph API (GraphQL) guide.
  • Building integration code rather than driving an agent? Use enssdk (typed client) or enskit (React).