Docs
Search⌘ K
  • Home
  • About The Graph
  • Supported Networks
  • Protocol Contracts
  • AI Tooling
  • Subgraphs
    • Substreams
      • Indexing
        • Data Services
          • Resources

            3 minutes

            The Graph’s AI

            Using AI on The Graph

            Instead of relying on static datasets or centralized APIs, you can now use our AI-native tooling via the Subgraph MCP and agent skills for both Subgraphs and Substreams.

            Why Use Onchain Data with AI?

            Using onchain data with AI unlocks powerful new ways to interact with and understand blockchain ecosystems.

            AI for Developers

            You can use AI to interact directly with The Graph’s data through your agents or build AI-powered applications on top of it. This streamlines development and opens up more intuitive, dynamic use cases.

            Enable Natural Language Access to Onchain Data

            Model Context Protocol⁠ (MCP) servers connect to Claude, Cline, and Cursor. They enable models to understand, query, and interact with structured onchain data using natural language. MCPs remove the need to write low-level queries or interact with APIs directly.

            Agent Skills extend AI coding assistants like Claude Code and Cursor with deep, specialized knowledge of The Graph’s protocols. This covers development patterns, best practices, and debugging techniques out of the box.

            Subgraph MCP

            The Subgraph MCP server connects models to Subgraphs on The Graph Network. It allows language models to explore Subgraph schemas, execute GraphQL queries, find relevant Subgraphs by keyword or contract, and surface usage metrics using natural language.

            Benefits of Using Subgraph MCP

            • Query Subgraphs and token data using natural language
            • Access GraphQL schemas and token metadata without manual queries
            • Find Subgraphs by keyword or contract and check 30-day usage
            • Retrieve real-time data from The Graph and onchain token sources

            Agent Skills for Subgraphs

            Subgraph Skills is a collection of AI agent skills that provide expert knowledge for developing, testing, and deploying Subgraphs. Skills are available as Claude Code plugins or OpenClaw skills.

            Available Subgraph Skills

            SkillWhat It Covers
            Subgraph DevelopmentSchema design, manifest configuration, AssemblyScript handlers, contract bindings, Subgraph Composition, and common patterns (ERC20, DEX, NFT, Lending, etc.)
            Subgraph OptimizationPruning, @derivedFrom, immutable entities, avoiding eth_calls, timeseries, aggregations, and grafting
            Subgraph TestingMatchstick unit testing, the Subgraph Linter, mock events, entity assertions, and CI/CD integration

            Agent Skills for Substreams

            Substreams Skills enhance AI coding assistants with specialized Substreams expertise. Install once and your assistant automatically applies Substreams best practices when working on relevant projects. Beyond authoring modules, the skills can discover existing packages on the substreams.dev⁠ registry, inspect their module graphs and protobuf schemas, and generate ready-to-run sink commands.

            Available Skills

            SkillWhat It Covers
            substreams-devManifest configuration, Rust module types (map, store, index), protobuf schema design, performance optimization, and debugging
            substreams-sqlCDC database sinks, relational mappings, PostgreSQL and ClickHouse patterns, and blockchain data modeling
            substreams-testingUnit, integration, and performance testing; FireCore tooling; and CI/CD pipelines
            ⁠Edit on GitHub⁠

            Protocol ContractsOverview
            On this page
            • Using AI on The Graph
            • Why Use Onchain Data with AI?
            • AI for Developers
            • Enable Natural Language Access to Onchain Data
            • Subgraph MCP
            • Agent Skills for Subgraphs
            • Agent Skills for Substreams
            The GraphStatusTestnetBrand AssetsForumSecurityPrivacy PolicyTerms of Service