diff --git a/nginx.conf b/nginx.conf index ae4fd7fa98e7..32b0fdd48183 100644 --- a/nginx.conf +++ b/nginx.conf @@ -161,6 +161,13 @@ http { rewrite ^/docs/([a-zA-Z][a-zA-Z])/tokenomics/$ $scheme://$http_host/docs/$1/resources/tokenomics/ permanent; rewrite ^/docs/([a-zA-Z][a-zA-Z])/token-api/$ $scheme://$http_host/docs/$1/token-api/quick-start/ permanent; rewrite ^/docs/([a-zA-Z][a-zA-Z])/token-api/evm/get-transfers-evm-by-address/$ $scheme://$http_host/docs/$1/token-api/evm/get-transfers-evm/ permanent; + rewrite ^/docs/([a-zA-Z][a-zA-Z])/subgraphs/mcp/claude/$ $scheme://$http_host/docs/$1/ai-suite/subgraph-mcp/ permanent; + rewrite ^/docs/([a-zA-Z][a-zA-Z])/subgraphs/mcp/cline/$ $scheme://$http_host/docs/$1/ai-suite/subgraph-mcp/ permanent; + rewrite ^/docs/([a-zA-Z][a-zA-Z])/subgraphs/mcp/cursor/$ $scheme://$http_host/docs/$1/ai-suite/subgraph-mcp/ permanent; + rewrite ^/docs/([a-zA-Z][a-zA-Z])/subgraphs/mcp/cline/$ $scheme://$http_host/docs/$1/ai-suite/subgraph-mcp/ permanent; + rewrite ^/docs/([a-zA-Z][a-zA-Z])/token-api/mcp/cline/$ $scheme://$http_host/docs/$1/ai-suite/token-api-mcp/ permanent; + rewrite ^/docs/([a-zA-Z][a-zA-Z])/token-api/mcp/cline/$ $scheme://$http_host/docs/$1/ai-suite/token-api-mcp/ permanent; + rewrite ^/docs/([a-zA-Z][a-zA-Z])/token-api/mcp/cline/$ $scheme://$http_host/docs/$1/ai-suite/token-api-mcp/ permanent; # Temporary redirects (302) rewrite ^/docs/en/querying/graph-client/$ $scheme://$http_host/docs/en/subgraphs/querying/graph-client/README/ redirect; rewrite ^/docs/en/developing/graph-ts/$ $scheme://$http_host/docs/en/subgraphs/developing/creating/graph-ts/README/ redirect; diff --git a/website/next.config.js b/website/next.config.js index 6fd1e9a9160a..e1338f8b251e 100644 --- a/website/next.config.js +++ b/website/next.config.js @@ -70,6 +70,13 @@ const withNextra = nextra({ type: 'children', title: t('global.navigation.tokenApi'), }, + '---4': { + type: 'separator', + }, + 'ai-suite': { + type: 'children', + title: t('global.navigation.ai-suite'), + }, '---5': { type: 'separator', }, diff --git a/website/src/layout/Layout.tsx b/website/src/layout/Layout.tsx index 5f377c84fc64..fce5483d21fb 100644 --- a/website/src/layout/Layout.tsx +++ b/website/src/layout/Layout.tsx @@ -43,6 +43,7 @@ import { SocialGitHub, SocialTelegram, SocialX, + Sparkle, Stack, Subgraph, Substreams, @@ -198,6 +199,9 @@ export default function Layout({ pageOpts, children }: NextraThemeLayoutProps } + if (routeWithoutLocale === '/ai-suite' || routeWithoutLocale.startsWith('/ai-suite/')) { + return + } if (routeWithoutLocale === '/indexing' || routeWithoutLocale.startsWith('/indexing/')) { return } diff --git a/website/src/pages/en/ai-suite/_meta-titles.json b/website/src/pages/en/ai-suite/_meta-titles.json new file mode 100644 index 000000000000..5eb482a7092b --- /dev/null +++ b/website/src/pages/en/ai-suite/_meta-titles.json @@ -0,0 +1,6 @@ +{ + "graph-assistant": "Graph Assistant", + "ai-introduction": "The Graph's AI", + "subgraph-mcp": "Subgraph MCP", + "token-api-mcp": "Token API MCP" +} diff --git a/website/src/pages/en/ai-suite/_meta.js b/website/src/pages/en/ai-suite/_meta.js new file mode 100644 index 000000000000..c9e51dfd35fb --- /dev/null +++ b/website/src/pages/en/ai-suite/_meta.js @@ -0,0 +1,8 @@ +import titles from './_meta-titles.json' + +export default { + 'ai-introduction': titles['ai-introduction'], + 'graph-assistant': titles['graph-assistant'], + 'subgraph-mcp': titles['subgraph-mcp'], + 'token-api-mcp': titles['token-api-mcp'], +} diff --git a/website/src/pages/en/ai-suite/ai-introduction.mdx b/website/src/pages/en/ai-suite/ai-introduction.mdx new file mode 100644 index 000000000000..9b661875bb18 --- /dev/null +++ b/website/src/pages/en/ai-suite/ai-introduction.mdx @@ -0,0 +1,60 @@ +--- +title: The Graph's AI +--- + +Build with speed and scale faster with The Graph's AI. + +## Using AI on The Graph + +Instead of relying on static datasets or centralized APIs, you can now access live blockchain data through our **agentic** app, [Graph Assistant](/ai-suite/graph-assistant/introduction/), and use our AI-native tooling, [Subgraph MCP](/ai-suite/subgraph-mcp/introduction/), and [Token API MCP](/ai-suite/token-api-mcp/introduction/). + +### Why Use Onchain Data with AI? + +Using onchain data with AI unlocks powerful new ways to interact with and understand blockchain ecosystems. + +- **AI for Non-Technical End Users**: AI can turn complex onchain data into accessible insights. Assistants powered by AI enable you to explore and analyze blockchain data without coding. +- **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. + +## AI for Non-Technical/End Users + +[Graph Assistant](/ai-suite/graph-assistant/introduction/) is a powerful **agentic** application that empowers users to easily interact with blockchain data. Ask questions in simple, natural language and get rich, AI powered insights. Both technical developers and non-technical product teams can move faster, make smarter decisions, and gain a clearer understanding than ever before. + +### Benefits of Using Graph Assistant + +- **Natural language Input**: You don't need to write complex queries or sift through dashboards. Simply ask your question in plain English and get clear, structured results. +- **Multi-source support**: Works across multiple Subgraphs and Token API. The Assistant automatically determines which data source to use, so you don't have to switch tools or manage endpoints. +- **Schema-free access**: You don't need to understand the schema. You can refer to tokens, protocols, dates, or addresses using natural language. The Assistant takes care of the rest. + +### Conversational Querying with Graph Assistant + +**Example queries:** + +- "List the top-5 swaps by USD value in the last 24 hours." +- "Give me the daily volume on Uniswap." +- "List the 20 most recently registered .eth names." +- "What's the best liqudity pool to put my ETH into?" +- "What is the total delegated stake in The Graph network?" + +[Graph Assistant](/ai-suite/graph-assistant/introduction/) will eventually be a one-stop shop for interacting with The Graph. Right now, it's an agentic AI app that uses state-of-the-art AI techniques, LLMs, and MCPs to understand and answer your questions about [Subgraphs](/subgraphs/developing/subgraphs/) and [Token API](/token-api/quick-start/) data. + +## AI for Developers + +### 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. + +### Subgraph MCP + +The [Subgraph MCP](/ai-suite/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. + +### Token API MCP + +The [Token API MCP](/ai-suite/token-api-mcp/introduction/) MCP server enables models to access onchain token data. It supports querying token metadata, wallet balances, transfer history, and top token holders through simple prompts. + +#### Benefits of Using Subgraph and Token API MCPs + +- 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 +- Get wallet balances, transfer history, and top token holders diff --git a/website/src/pages/en/ai-suite/graph-assistant/_meta.js b/website/src/pages/en/ai-suite/graph-assistant/_meta.js new file mode 100644 index 000000000000..74da5e0686a7 --- /dev/null +++ b/website/src/pages/en/ai-suite/graph-assistant/_meta.js @@ -0,0 +1,6 @@ +export default { + 'quick-start': '', + introduction: '', + 'how-to-guide': '', + faq: '', +} diff --git a/website/src/pages/en/ai-suite/graph-assistant/faq.mdx b/website/src/pages/en/ai-suite/graph-assistant/faq.mdx new file mode 100644 index 000000000000..8addf9935524 --- /dev/null +++ b/website/src/pages/en/ai-suite/graph-assistant/faq.mdx @@ -0,0 +1,26 @@ +--- +title: Graph Assistant FAQ +sidebarTitle: 'FAQ' +--- + +This page summarizes some of the most common questions for developers using Graph Assistant. + +1. What is The Graph Assistant? + +The Graph Assistant is an AI-powered chat interface that lets you query blockchain data in plain English. Under the hood, it translates your questions into GraphQL calls against Subgraphs and the Token API, then returns results, no coding required. + +2. What is an agentic application? + +An agentic application combines AI-driven reasoning with external data sources or APIs to take autonomous actions on your behalf. In this case, Graph Assistant acts as an “agent” that interprets your natural-language prompts, builds and dispatches GraphQL queries, and formats the results so that you don't need to write or manage queries yourself. + +3. Which networks and data does Graph Assistant support? + +The Assistant has access to Subgraphs across multiple chains. If a Subgraph is published to The Graph Network and is being indexed, the Assistant can automatically route queries to it. The Assistant also has access to the Token API on Ethereum Mainnet, BSC, Unichain, Arbitrum-One, Optimism, and Polygon. + +4. Is there a usage limit or quota? + +Yes, 10 questions per hour. + +5. What if the Assistant can't interpret my question? + +When the Assistant fails to parse your intent (for example, ambiguous token name, missing context, or an unsupported request), it will prompt you for clarification. For instance, it might ask, “Did you mean XYZ on Ethereum or XYZ on Arbitrum?” or “Please specify a date range for this query.” If you continue to see parsing errors, check that you're using correct token symbols or specifying networks and time frames clearly. diff --git a/website/src/pages/en/ai-suite/graph-assistant/how-to-guide.mdx b/website/src/pages/en/ai-suite/graph-assistant/how-to-guide.mdx new file mode 100644 index 000000000000..463130894ad8 --- /dev/null +++ b/website/src/pages/en/ai-suite/graph-assistant/how-to-guide.mdx @@ -0,0 +1,56 @@ +--- +title: How To Use The Graph Assistant +sidebarTitle: 'How-to Guide' +--- + +## Overview + +You type a natural language question into the chat interface, such as: + +```yaml +'On Uniswap, return the top-10 pools by total value locked in USD.' +``` + +> [!IMPORTANT] All users can process 10 free queries per user per hour. + +> [!NOTE] Disclaimer: By using Graph Assistant, you acknowledge that your requests may be logged and used to improve the performance of the underlying agents. Do not share sensitive, personal, or private information. + +### Behind the Scenes + +The Assistant: + +1. Interprets your intent +2. Maps it to the correct Subgraphs or Token API endpoint +3. Executes optimized queries +4. Returns clean, structured results + +You don't need to write queries or understand a Subgraph's schema, you simply ask. + +### Example Use Cases + +**Protocol Analytics** + +- “Compare daily active users on Aave vs. Compound in May 2025.” +- “Show me the total value locked (TVL) for XYZDAO over the last quarter.” + +**Token Insights** + +- “What are the top 10 tokens by market cap on Ethereum right now?” +- “How many XYZ did I receive between May 1 and May 15?” + +**Historical Data Retrieval** + +- “Fetch the token price history of XYZ for the last six months.” +- “What was the average gas price on Ethereum during April?” + +**Portfolio Monitoring** + +- “List my wallet’s current token balances and their USD equivalents.” +- “Calculate profit/loss on XYZ since xyz date.” + +**Cross-Chain Comparison** + +- “Show me the 7-day trading volume of XYZ on Ethereum vs. Polygon.” +- “How many XYZ swaps occurred on Arbitrum yesterday?” + +To get started follow the [quickstart](/ai-suite/graph-assistant/quick-start/) and explore its capabilities. diff --git a/website/src/pages/en/ai-suite/graph-assistant/introduction.mdx b/website/src/pages/en/ai-suite/graph-assistant/introduction.mdx new file mode 100644 index 000000000000..65fdf0f96028 --- /dev/null +++ b/website/src/pages/en/ai-suite/graph-assistant/introduction.mdx @@ -0,0 +1,31 @@ +--- +title: Introduction +--- + +> [!IMPORTANT] Graph Assistant is still in **beta**. Expect breaking changes, rate limits, and potential downtime. + +[Graph Assistant](https://thegraph.com/graph-assistant) (Beta) gives instant, code-free access to blockchain data, transforming natural language into precise, AI-powered queries without the need to code. + +## Overview + +[Graph Assistant](https://thegraph.com/graph-assistant) is an advanced, [agentic](/en/ai-suite/graph-assistant/faq/) easy-to-use chat interface for querying blockchain data using natural language. Unlike a basic chatbot, Graph Assistant can understand your intent, build complex queries, and execute them automatically. This gives you rich, AI-powered insights from onchain data without writing any code. + +- **Automatically** interprets user intent, generates precise queries, executes them via The Graph's Subgraphs and Token API, and presents structured, AI-powered answers without requiring any code. +- **Removes** the technical complexity found in traditional dashboards or chatbots. It provides composable insights directly from indexed Subgraphs and Token datasets. + +## Core Features + +| Feature | Description | +| --- | --- | +| **Friendly Interface** | Conversational access to blockchain data via natural language. You simply ask questions, the Assistant fetches the answer, and renders results. | +| **Backed by Subgraphs** | Uses subgraphs to index protocol-specific data like transactions, events, and protocol metrics. | +| **Backed by Token API** | Uses Token API for token-level information like balances, transfers, and metadata. | +| **No Setup Required** | No need to configure data sources or write queries. | +| **Automatic Query Building** | The Assistant performs complex queries such as fetching historical token volumes, protocol analytics, or cross-chain data and handles filtering, pagination, and joins across Subgraphs automatically. | + +## Help Shape What's Next + +This is in **beta**, and community input is essential. If you have ideas, questions, or run into anything unexpected, we'd love to hear from you: + +- Join the community on [Discord](https://discord.com/invite/graphprotocol): Provide feedback and stay in the loop with other builders. You'll be able to join the `#graph-assistant` channel to share your experience directly. +- Interested in going deeper? Reach out to become a dedicated beta tester so your specific use case can be better supported. diff --git a/website/src/pages/en/ai-suite/graph-assistant/quick-start.mdx b/website/src/pages/en/ai-suite/graph-assistant/quick-start.mdx new file mode 100644 index 000000000000..13f8478b8d2b --- /dev/null +++ b/website/src/pages/en/ai-suite/graph-assistant/quick-start.mdx @@ -0,0 +1,44 @@ +--- +title: Quick Start +--- + +> [!IMPORTANT] Graph Assistant is still in **beta**. Expect breaking changes, rate limits, and potential downtime. + +This guide provides step-by-step instructions for getting started with Graph Assistant quickly. + +## Step-by Step + +### Step 1. Create an Account + +Go to: [Graph Assistant](https://thegraph.com/graph-assistant) + +- Click Sign Up (or Log In if you already have an account). +- Use your Google, GitHub, X, email or wallet credentials to log in. +- No additional setup is required. + +### Step 2. Open the Assistant Chat + +After logging in: + +- You'll see Graph Assistant's interface. +- At the bottom of the page, you will find a chat input bar. This is where you will interact with the Assistant. + +### Step 3: Ask Your First Question + +> [!IMPORTANT] All users can process 10 free queries per user per hour. + +In the input bar, type a natural-language query (everyday language). + +Example: + +```yaml +Show me the 24-hour trading volume of XYZ token on Ethereum +``` + +> [!NOTE] Disclaimer: By using Graph Assistant, you acknowledge that your requests may be logged and used to improve the performance of the AI interface. Do not share sensitive, personal, or private information. + +The Assistant will: + +- Digest your question +- Fetch onchain data using Subgraphs or the Token API +- Return a clean, formatted response with the data you need diff --git a/website/src/pages/en/subgraphs/mcp/_meta.js b/website/src/pages/en/ai-suite/subgraph-mcp/_meta.js similarity index 75% rename from website/src/pages/en/subgraphs/mcp/_meta.js rename to website/src/pages/en/ai-suite/subgraph-mcp/_meta.js index 8630d4da27b3..6f527b4e53e4 100644 --- a/website/src/pages/en/subgraphs/mcp/_meta.js +++ b/website/src/pages/en/ai-suite/subgraph-mcp/_meta.js @@ -1,4 +1,5 @@ export default { + introduction: '', claude: '', cline: '', cursor: '', diff --git a/website/src/pages/en/subgraphs/mcp/claude.mdx b/website/src/pages/en/ai-suite/subgraph-mcp/claude.mdx similarity index 87% rename from website/src/pages/en/subgraphs/mcp/claude.mdx rename to website/src/pages/en/ai-suite/subgraph-mcp/claude.mdx index 027b272cb942..ff3caa4e3e7f 100644 --- a/website/src/pages/en/subgraphs/mcp/claude.mdx +++ b/website/src/pages/en/ai-suite/subgraph-mcp/claude.mdx @@ -2,17 +2,7 @@ title: Claude Desktop --- -The Subgraph [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) server enables Claude to interact directly with Subgraphs on The Graph Network. This integration allows you to find relevant Subgraphs for specific keywords and contracts, explore Subgraph schemas, and execute GraphQL queries—all through natural language conversations with Claude. - -## What You Can Do - -The Subgraph MCP integration enables you to: - -- Access the GraphQL schema for any Subgraph on The Graph Network -- Execute GraphQL queries against any Subgraph deployment -- Find top Subgraph deployments for a given keyword or contract address -- Get 30-day query volume for Subgraph deployments -- Ask natural language questions about Subgraph data without writing GraphQL queries manually +This guide walks you through the integration of Subgraph [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) to access Subgraph data via natural language conversations with Claude. ## Prerequisites diff --git a/website/src/pages/en/subgraphs/mcp/cline.mdx b/website/src/pages/en/ai-suite/subgraph-mcp/cline.mdx similarity index 89% rename from website/src/pages/en/subgraphs/mcp/cline.mdx rename to website/src/pages/en/ai-suite/subgraph-mcp/cline.mdx index 156221d9a127..eb8044bfe991 100644 --- a/website/src/pages/en/subgraphs/mcp/cline.mdx +++ b/website/src/pages/en/ai-suite/subgraph-mcp/cline.mdx @@ -2,7 +2,7 @@ title: Cline --- -The Subgraph [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) server enables Cline to interact directly with Subgraphs on The Graph Network. This integration allows you to explore Subgraph schemas, execute GraphQL queries, and find relevant Subgraphs for specific contracts—all through natural language conversations with Cline. +This guide walks you through the integration of Subgraph [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) to access Subgraph data through natural language conversations with Cline. ## Prerequisites diff --git a/website/src/pages/en/subgraphs/mcp/cursor.mdx b/website/src/pages/en/ai-suite/subgraph-mcp/cursor.mdx similarity index 88% rename from website/src/pages/en/subgraphs/mcp/cursor.mdx rename to website/src/pages/en/ai-suite/subgraph-mcp/cursor.mdx index 298f43ece048..6291caf4b06b 100644 --- a/website/src/pages/en/subgraphs/mcp/cursor.mdx +++ b/website/src/pages/en/ai-suite/subgraph-mcp/cursor.mdx @@ -2,7 +2,7 @@ title: Cursor --- -The Subgraph [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) server enables Cursor to interact directly with Subgraphs on The Graph Network. This integration allows you to explore Subgraph schemas, execute GraphQL queries, and find relevant Subgraphs for specific contracts—all through natural language conversations with Cursor. +This guide walks you through the integration of Subgraph [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) to access Subgraph data through natural language conversations with Cline. ## Prerequisites diff --git a/website/src/pages/en/ai-suite/subgraph-mcp/introduction.mdx b/website/src/pages/en/ai-suite/subgraph-mcp/introduction.mdx new file mode 100644 index 000000000000..da1272cf9a36 --- /dev/null +++ b/website/src/pages/en/ai-suite/subgraph-mcp/introduction.mdx @@ -0,0 +1,22 @@ +--- +title: Subgraph MCP Introduction +sidebarTitle: 'Introduction' +--- + +Subgraph MCP server is an open-source implementation of [Anthropic's Model Context Protocol](https://modelcontextprotocol.io/introduction). + +It presents The Graph's Subgraph data through a set of MCP tools that any MCP-compatible client can call. With these tools, clients can search for relevant Subgraphs, inspect GraphQL schemas, and run queries against specific deployments on The Graph Network all within a single, standardized interface. + +The server itself does not hold a language model. Instead, it translates incoming MCP requests into Subgraph queries and returns the structured results, allowing the client's LLM to transform a natural-language prompt into actionable blockchain data. + +Think of it as a USB-C hub: it standardizes the plug-and-play connection between AI agents and The Graph's Subgraph ecosystem. + +## What You Can Do + +- Access GraphQL schemas for any Subgraph on The Graph Network +- Run GraphQL queries on any Subgraph deployment +- Discover top Subgraph deployments by keyword or contract address +- Retrieve 30-day query volumes for Subgraph deployments +- Ask questions about Subgraph data without writing GraphQL manually + +The Subgraph MCP server allows smooth integration with [Claude](/ai-suite/subgraph-mcp/claude/), [Cline](/ai-suite/subgraph-mcp/cline/), or [Cursor](/ai-suite/subgraph-mcp/cursor/), making blockchain data queries with The Graph Network a conversational experience. diff --git a/website/src/pages/en/token-api/mcp/_meta.js b/website/src/pages/en/ai-suite/token-api-mcp/_meta.js similarity index 75% rename from website/src/pages/en/token-api/mcp/_meta.js rename to website/src/pages/en/ai-suite/token-api-mcp/_meta.js index 8630d4da27b3..6f527b4e53e4 100644 --- a/website/src/pages/en/token-api/mcp/_meta.js +++ b/website/src/pages/en/ai-suite/token-api-mcp/_meta.js @@ -1,4 +1,5 @@ export default { + introduction: '', claude: '', cline: '', cursor: '', diff --git a/website/src/pages/en/token-api/mcp/claude.mdx b/website/src/pages/en/ai-suite/token-api-mcp/claude.mdx similarity index 100% rename from website/src/pages/en/token-api/mcp/claude.mdx rename to website/src/pages/en/ai-suite/token-api-mcp/claude.mdx diff --git a/website/src/pages/en/token-api/mcp/cline.mdx b/website/src/pages/en/ai-suite/token-api-mcp/cline.mdx similarity index 100% rename from website/src/pages/en/token-api/mcp/cline.mdx rename to website/src/pages/en/ai-suite/token-api-mcp/cline.mdx diff --git a/website/src/pages/en/token-api/mcp/cursor.mdx b/website/src/pages/en/ai-suite/token-api-mcp/cursor.mdx similarity index 100% rename from website/src/pages/en/token-api/mcp/cursor.mdx rename to website/src/pages/en/ai-suite/token-api-mcp/cursor.mdx diff --git a/website/src/pages/en/ai-suite/token-api-mcp/introduction.mdx b/website/src/pages/en/ai-suite/token-api-mcp/introduction.mdx new file mode 100644 index 000000000000..d35905196d22 --- /dev/null +++ b/website/src/pages/en/ai-suite/token-api-mcp/introduction.mdx @@ -0,0 +1,23 @@ +--- +title: Token API MCP Introduction +sidebarTitle: 'Introduction' +--- + +Token API MCP server is an open-source implementation of [Anthropic's Model Context Protocol](https://modelcontextprotocol.io/introduction). + +It makes on-chain token data, including metadata, balances, transfers, and holder statistics, accessible through a set of MCP tools. Any compatible client can use these tools to fetch and analyze token information through a standardized interface. + +The server itself does not host any language model. It simply converts MCP calls into data look-ups and returns structured results, letting the client's own LLM incorporate the results. + +Think of it as a USB-C hub: it standardizes the plug-and-play connection between AI agents and The Graph's Token API data. + +## What You Can Do + +- Retrieve token metadata including name, symbol, decimals, total supply, and contract address +- Get token balances for any wallet address holding a supported ERC-20 token +- Fetch token transfer activity including sender, receiver, amount, and timestamp +- Identify top holders and analyze token distribution +- Ask natural language questions about token data without writing smart contract calls +- Access historical transfer data to analyze token movement over time + +The Token MCP server provides [Claude](/ai-suite/token-api-mcp/claude/), [Cline](/ai-suite/token-api-mcp/cline/), and [Cursor](/ai-suite/token-api-mcp/cursor/) with direct, conversational access to onchain token data. diff --git a/website/src/pages/en/global.json b/website/src/pages/en/global.json index 4364984ad90c..f1d954fe756e 100644 --- a/website/src/pages/en/global.json +++ b/website/src/pages/en/global.json @@ -6,6 +6,7 @@ "subgraphs": "Subgraphs", "substreams": "Substreams", "sps": "Substreams-Powered Subgraphs", + "ai-suite": "AI Suite", "tokenApi": "Token API", "indexing": "Indexing", "resources": "Resources", diff --git a/website/src/pages/en/resources/_meta.js b/website/src/pages/en/resources/_meta.js index aa8e2d0ec6a8..38c56cf56c43 100644 --- a/website/src/pages/en/resources/_meta.js +++ b/website/src/pages/en/resources/_meta.js @@ -7,5 +7,4 @@ export default { roles: titles.roles ?? '', 'migration-guides': titles['migration-guides'] ?? '', 'subgraph-studio-faq': '', - 'claude-mcp': '', } diff --git a/website/src/pages/en/resources/claude-mcp.mdx b/website/src/pages/en/resources/claude-mcp.mdx deleted file mode 100644 index 44ed075cffda..000000000000 --- a/website/src/pages/en/resources/claude-mcp.mdx +++ /dev/null @@ -1,122 +0,0 @@ ---- -title: Claude MCP ---- - -This guide walks you through configuring Claude Desktop to use The Graph ecosystem's [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) resources: Token API and Subgraph. These integrations allow you to interact with blockchain data through natural language conversations with Claude. - -## What You Can Do - -With these integrations, you can: - -- **Token API**: Access token and wallet information across multiple blockchains -- **Subgraph**: Find relevant Subgraphs for specific keywords and contracts, explore Subgraph schemas, and execute GraphQL queries - -## Prerequisites - -- [Node.js](https://nodejs.org/en/download/) installed and available in your path -- [Claude Desktop](https://claude.ai/download) installed -- API keys: - - Token API key from [The Graph Market](https://thegraph.market/) - - Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) - -## Configuration Steps - -### 1. Open Configuration File - -Navigate to your `claude_desktop_config.json` file: - -> **Claude Desktop** > **Settings** > **Developer** > **Edit Config** - -Paths by operating system: - -- OSX: `~/Library/Application Support/Claude/claude_desktop_config.json` -- Windows: `%APPDATA%\Claude\claude_desktop_config.json` -- Linux: `.config/Claude/claude_desktop_config.json` - -### 2. Add Configuration - -Replace the contents of the existing config file with: - -```json -{ - "mcpServers": { - "token-api": { - "command": "npx", - "args": ["@pinax/mcp", "--sse-url", "https://token-api.mcp.thegraph.com/sse"], - "env": { - "ACCESS_TOKEN": "ACCESS_TOKEN" - } - }, - "subgraph": { - "command": "npx", - "args": ["mcp-remote", "--header", "Authorization:${AUTH_HEADER}", "https://subgraphs.mcp.thegraph.com/sse"], - "env": { - "AUTH_HEADER": "Bearer GATEWAY_API_KEY" - } - } - } -} -``` - -### 3. Add Your API Keys - -Replace: - -- `ACCESS_TOKEN` with your Token API key from [The Graph Market](https://thegraph.market/) -- `GATEWAY_API_KEY` with your Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) - -### 4. Save and Restart - -- Save the configuration file -- Restart Claude Desktop - -### 5. Add The Graph Resources in Claude - -After configuration: - -1. Start a new conversation in Claude Desktop -2. Click on the context menu (top right) -3. Add "Subgraph Server Instructions" as a resource by entering `graphql://subgraph` for Subgraph MCP - -> **Important**: You must manually add The Graph resources to your chat context for each conversation where you want to use them. - -### 6. Run Queries - -Here are some example queries you can try after setting up the resources: - -### Subgraph Queries - -``` -What are the top pools in Uniswap? -``` - -``` -Who are the top Delegators of The Graph Protocol? -``` - -``` -Please make a bar chart for the number of active loans in Compound for the last 7 days -``` - -### Token API Queries - -``` -Show me the current price of ETH -``` - -``` -What are the top tokens by market cap on Ethereum? -``` - -``` -Analyze this wallet address: 0x... -``` - -## Troubleshooting - -If you encounter issues: - -1. **Verify Node.js Installation**: Ensure Node.js is correctly installed by running `node -v` in your terminal -2. **Check API Keys**: Verify that your API keys are correctly entered in the configuration file -3. **Enable Verbose Logging**: Add `--verbose true` to the args array in your configuration to see detailed logs -4. **Restart Claude Desktop**: After making changes to the configuration, always restart Claude Desktop diff --git a/website/src/pages/en/subgraphs/_meta-titles.json b/website/src/pages/en/subgraphs/_meta-titles.json index f095d374344f..3fd405eed29a 100644 --- a/website/src/pages/en/subgraphs/_meta-titles.json +++ b/website/src/pages/en/subgraphs/_meta-titles.json @@ -2,6 +2,5 @@ "querying": "Querying", "developing": "Developing", "guides": "How-to Guides", - "best-practices": "Best Practices", - "mcp": "MCP" + "best-practices": "Best Practices" } diff --git a/website/src/pages/en/subgraphs/_meta.js b/website/src/pages/en/subgraphs/_meta.js index 4365293ffc72..45841d5f3355 100644 --- a/website/src/pages/en/subgraphs/_meta.js +++ b/website/src/pages/en/subgraphs/_meta.js @@ -6,7 +6,6 @@ export default { querying: titles.querying ?? '', developing: titles.developing ?? '', billing: '', - mcp: titles.mcp ?? '', guides: titles.guides, 'best-practices': titles['best-practices'], 'fair-use-policy': '', diff --git a/website/src/pages/en/token-api/_meta-titles.json b/website/src/pages/en/token-api/_meta-titles.json index 7ed31e0af95d..b606a87808a1 100644 --- a/website/src/pages/en/token-api/_meta-titles.json +++ b/website/src/pages/en/token-api/_meta-titles.json @@ -1,5 +1,4 @@ { - "mcp": "MCP", "evm": "EVM Endpoints", "monitoring": "Monitoring Endpoints", "faq": "FAQ" diff --git a/website/src/pages/en/token-api/_meta.js b/website/src/pages/en/token-api/_meta.js index f67576d7f612..39b28f89b7b4 100644 --- a/website/src/pages/en/token-api/_meta.js +++ b/website/src/pages/en/token-api/_meta.js @@ -2,7 +2,6 @@ import titles from './_meta-titles.json' export default { 'quick-start': '', - mcp: titles.mcp ?? '', evm: titles.evm ?? '', monitoring: titles.monitoring ?? '', faq: '',