Skip to content

Use GraphOps with AI agents

Install GraphOps agent skills and connect the docs MCP server so coding agents call RPC, Subgraphs and Substreams correctly.

Help your coding agent write working code against GraphOps on the first attempt. GraphOps publishes agent skills, short instructions your agent loads when a task needs them, and an MCP server for the documentation. The skills tell the agent which service fits a task, how to authenticate, how to keep requests bounded and what to do when a request fails.

To have your agent do this setup for you, paste the setup prompt from AI agent quickstart.

Install the skills

GraphOps publishes four skills:

SkillLoads when a task
graphopsChooses between services, uses an API key, or explains an error code.
graphops-rpcReads chain state, calls contracts, fetches logs or submits transactions.
graphops-subgraphsQueries indexed entities with GraphQL.
graphops-substreamsStreams blocks or module output, backfills a range, or runs a sink.

The skills are listed at https://docs.graphops.xyz/.well-known/agent-skills/index.json, the Agent Skills Discovery(opens in a new tab) location that skill installers read. To install all four with the open-source skills installer, run npx skills add https://docs.graphops.xyz.

You can also download one skill from https://docs.graphops.xyz/.well-known/agent-skills/<name>/SKILL.md and save it where your agent reads skills. For example, Claude Code reads ~/.claude/skills/<name>/SKILL.md.

An agent that doesn't support skills can still read https://docs.graphops.xyz/skill.md, the general skill, as plain instructions.

The skills contain instructions and links only, never scripts.

An agent that starts from a service endpoint can find that service's skill in the service's RFC 9727(opens in a new tab) API catalog at /.well-known/api-catalog, and in the merged catalog at https://graphops.xyz/.well-known/api-catalog. No registered link relation names an agent skill yet, so the catalog entry links the skill's SKILL.md with the extension relation https://docs.graphops.xyz/ai-agents#skill-link-relation and the type text/markdown.

Give the agent an API key

The skills read each service's key from an environment variable, so the key never has to appear in the conversation:

ServiceVariable
RPCGRAPHOPS_RPC_API_KEY
SubgraphsGRAPHOPS_SUBGRAPHS_API_KEY
SubstreamsSUBSTREAMS_API_KEY

Create a separate key for the environment your agent works in, with a label that names it, so you can revoke it without affecting your applications. Requests your agent sends use credits like any other request. The skills tell the agent to stop on credits_exhausted instead of retrying; to keep an agent's usage in check, set a spending limit on automatic top-ups and watch usage.

See API keys to create and revoke keys.

Connect the docs MCP server

The docs MCP server lets an agent search and read these docs, explain an error code, and list the supported networks with their endpoints, without leaving its session. It needs no API key.

ToolUse
searchSearch the docs.
list_pagesList every docs page.
get_pageRead one page in Markdown.
explain_errorExplain an error code and what to do next.
list_networksList each service's supported networks and endpoints.

Add https://docs.graphops.xyz/api/mcp as a remote MCP server using the Streamable HTTP transport. For example, in Claude Code, run claude mcp add --transport http graphops-docs https://docs.graphops.xyz/api/mcp.

Keep the skills current

Each skill states its version and the URL it was published at, and tells the agent to compare its copy with the published one at the start of a task. When your agent reports that your GraphOps skills are out of date, install them again.

Next steps

Last updated