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.
1.15.2.
The Omnigraph GraphQL schema is bundled inside the SDK and consumed by the gql.tada TypeScript plugin to type your queries, so pin an exact version (no ^ or ~) of enssdk@1.15.2 (and enskit@1.15.2 when using React) to keep
your generated types matched to the deployed schema. Use these exact install commands:
npm install enssdk@1.15.2 # or, for React apps: npm install enskit@1.15.2 enssdk@1.15.2
The tool
Section titled “The tool”The server exposes a single, read-only tool:
omnigraph_query— accepts a GraphQLquery(and optionalvariables) 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.
Connect your client
Section titled “Connect your client”Point your MCP client at the endpoint. For a NameHash-hosted instance:
{ "mcpServers": { "ensnode-omnigraph": { "url": "https://api.v2-sepolia.ensnode.io/api/mcp" } }}For local development, use your instance’s URL instead:
{ "mcpServers": { "ensnode-omnigraph": { "url": "http://localhost:4334/api/mcp" } }}Authoring queries
Section titled “Authoring queries”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
ensskillsomnigraphskill, which teaches the unified ENSv1 + ENSv2 datamodel, resolution, pagination, and vetted example queries — so it writes queries that work the first time.
The Omnigraph is a read-only API, and so is this MCP server. It indexes and serves ENS state; it does not send transactions or mutate onchain data.
Where to go next
Section titled “Where to go next”- 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) orenskit(React).