---
title: The Graph’s AI
description: Build with speed and scale faster with The Graph’s MCPs and skills.
---

## 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](/subgraphs/tooling/subgraph-mcp/introduction/) 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](https://modelcontextprotocol.io/introduction) (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](/subgraphs/tooling/subgraph-mcp/introduction/) 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](/subgraphs/tooling/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

| Skill | What It Covers |
| --- | --- |
| **Subgraph Development** | Schema design, manifest configuration, AssemblyScript handlers, contract bindings, Subgraph Composition, and common patterns (ERC20, DEX, NFT, Lending, etc.) |
| **Subgraph Optimization** | Pruning, `@derivedFrom`, immutable entities, avoiding `eth_calls`, timeseries, aggregations, and grafting |
| **Subgraph Testing** | Matchstick unit testing, the Subgraph Linter, mock events, entity assertions, and CI/CD integration |

### Agent Skills for Substreams

[Substreams Skills](/substreams/tooling/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](https://substreams.dev/) registry, inspect their module graphs and protobuf schemas, and generate ready-to-run sink commands.

#### Available Skills

| Skill | What It Covers |
| --- | --- |
| **`substreams-dev`** | Manifest configuration, Rust module types (map, store, index), protobuf schema design, performance optimization, and debugging |
| **`substreams-sql`** | CDC database sinks, relational mappings, PostgreSQL and ClickHouse patterns, and blockchain data modeling |
| **`substreams-testing`** | Unit, integration, and performance testing; FireCore tooling; and CI/CD pipelines |
