Docs
Search⌘ K
  • Home
  • About The Graph
  • Supported Networks
  • Protocol Contracts
  • Subgraphs
    • Substreams
      • The Graph’s AI
      • Indexing
        • Graph Horizon
          • 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, Substreams 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

            Substreams MCP

            The Substreams MCP server lets AI agents search, inspect, and analyze Substreams packages — from registry discovery to sink deployment. It supports dual transport for local clients and SSE/HTTP for remote agents.

            Tools

            ToolDescription
            search_substreamsSearch the substreams.dev package registry by keyword, network, or sort order
            inspect_packageInspect a .spkg file to see its full module graph, protobuf types, and metadata
            list_package_modulesLightweight alternative to inspect_package — returns module names, types, and inputs/outputs
            get_sink_configAnalyze a package’s sink configuration and generate ready-to-run CLI commands

            Benefits of Using Substreams MCP

            • Discover Substreams packages across any supported chain without leaving your AI assistant
            • Inspect module graphs and protobuf schemas using natural language
            • Generate deployment CLI commands automatically from sink configurations

            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 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.

            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⁠

            Substreams SearchOverview
            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
            • Substreams MCP
            • Agent Skills for Subgraphs
            • Agent Skills for Substreams
            The GraphStatusTestnetBrand AssetsForumSecurityPrivacy PolicyTerms of Service