From dd98b332f328e7c1f79a07a138b4ec6c1a17bc68 Mon Sep 17 00:00:00 2001 From: Michael Macaulay Date: Fri, 9 May 2025 11:40:10 -0400 Subject: [PATCH 01/34] Claude initial draft --- .../en/subgraphs/developing/subgraph-mcp.mdx | 200 ++++++++++++++++++ 1 file changed, 200 insertions(+) create mode 100644 website/src/pages/en/subgraphs/developing/subgraph-mcp.mdx diff --git a/website/src/pages/en/subgraphs/developing/subgraph-mcp.mdx b/website/src/pages/en/subgraphs/developing/subgraph-mcp.mdx new file mode 100644 index 000000000000..07a695d8abec --- /dev/null +++ b/website/src/pages/en/subgraphs/developing/subgraph-mcp.mdx @@ -0,0 +1,200 @@ +--- +title: Subgraph MCP +--- + +## Using Claude Desktop to Access Subgraphs via MCP + +The Subgraph Model Context Protocol (MCP) server enables Claude 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 Claude. + +### What You Can Do + +With the Subgraph MCP integration, you can: + +- Access the GraphQL schema for any subgraph on The Graph Network +- Execute GraphQL queries against any subgraph deployment +- Find top subgraph deployments for a contract address on a specific chain +- Ask natural language questions about subgraph data without writing GraphQL queries manually + +### Requirements + +Before setting up the Subgraph MCP server, make sure you have: + +- **Claude Desktop**: Latest version installed +- **Rust**: Latest stable version (1.75+) +- **Gateway API key**: An API key from The Graph Network + +## Installation + +### Step 1: Install Rust (if not already installed) + +```bash +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh +``` + +Follow the on-screen instructions. For other platforms, see the [official Rust installation guide](https://www.rust-lang.org/tools/install). + +### Step 2: Install the Subgraph MCP Server + +```bash +# Clone the repository +git clone git@github.com:graphops/subgraph-mcp.git +cd subgraph-mcp + +# Build the project +cargo build --release +``` + +### Step 3: Get your Gateway API Key + +You'll need an API key from [Subgraph Studio](https://thegraph.com/studio/) to authenticate requests to The Graph Network. + +## Configuration + +### Configure Claude Desktop + +1. Open Claude Desktop and click on the top left corner to access Settings +2. Add the Subgraph MCP server to your `claude_desktop_config.json` + +Here's how to set up your configuration: + +```json +{ + "mcpServers": { + "subgraph": { + "command": "/path/to/your/subgraph-mcp/target/release/subgraph-mcp", + "env": { + "GATEWAY_API_KEY": "your-api-key-here" + } + } + } +} +``` + +#### Finding the Command Path + +After building the project, you need to specify the absolute path to the compiled binary: + +1. Navigate to your `subgraph-mcp` directory in the terminal +2. Run `pwd` to get the full path to the directory +3. Add `/target/release/subgraph-mcp` to that path + +For example, if `pwd` outputs `/Users/username/subgraph-mcp`, your full command path would be: `/Users/username/subgraph-mcp/target/release/subgraph-mcp` + +### Troubleshooting Installation + +If you encounter issues with the setup: + +1. Clean any existing build and rebuild: + + ```bash + cd subgraph-mcp + cargo clean + cargo build --release + ``` + +2. Ensure the executable has proper permissions: + ```bash + chmod +x target/release/subgraph-mcp + ``` + +## Using The Graph Resource in Claude + +After configuring Claude Desktop: + +1. Restart Claude Desktop +2. Start a new conversation +3. Click on the context menu (top right) +4. Add "The Graph" resource by adding `graphql://subgraph` to your chat context + +**Important**: Claude Desktop may not automatically utilize the Subgraph MCP. You must manually add "The Graph" resource to your chat context for each conversation where you want to use it. + +## Available Tools and Usage + +The Subgraph MCP provides several tools for interacting with subgraphs: + +### Schema Retrieval Tools + +- **Get schema by deployment ID**: Access the GraphQL schema using a deployment ID (0x...) +- **Get schema by subgraph ID**: Access the schema for the current deployment of a subgraph (5zvR82...) +- **Get schema by IPFS hash**: Access the schema using a subgraph's IPFS manifest hash (Qm...) + +### Query Execution Tools + +- **Execute query by deployment ID**: Run GraphQL queries against specific, immutable deployments +- **Execute query by subgraph ID**: Run GraphQL queries against the latest version of a subgraph + +### Discovery Tools + +- **Get top subgraph deployments**: Find the top 3 subgraph deployments indexing a specific contract on a particular chain + +## Natural Language Queries + +One of the most powerful features of the Subgraph MCP integration is the ability to ask questions in natural language. Claude will: + +1. Understand your goal (lookup, find subgraphs, query, get schema) +2. Find relevant deployments if needed +3. Fetch and interpret the subgraph schema +4. Convert your question into an appropriate GraphQL query +5. Execute the query and present the results in a readable format + +### Example Natural Language Queries + +``` +What are the pairs with maximum volume on 0xde0a7b5368f846f7d863d9f64949b688ad9818243151d488b4c6b206145b9ea3? + +Which tokens have the highest market cap in this subgraph? + +Show me the most recent 5 swaps for the USDC/ETH pair +``` + +## Using Both Token API MCP and Subgraph MCP Together + +You can configure Claude Desktop to use both the Token API MCP and Subgraph MCP simultaneously: + +```json +{ + "mcpServers": { + "token-api": { + "command": "path-to-bunx", + "args": ["@pinax/mcp", "--sse-url", "https://token-api.thegraph.com/sse"], + "env": { + "ACCESS_TOKEN": "access-token-from-graph-market" + } + }, + "subgraph": { + "command": "/path/to/subgraph-mcp/target/release/subgraph-mcp", + "env": { + "GATEWAY_API_KEY": "api-key-from-subgraph-studio" + } + } + } +} +``` + +For Token API access tokens, visit [The Graph Market](https://thegraph.com/explorer). For Subgraph Gateway API keys, visit [Subgraph Studio](https://thegraph.com/studio/). + +## Key Identifier Types + +When working with subgraphs, you'll encounter different types of identifiers: + +- **Subgraph ID** (e.g., `5zvR82...`): Logical identifier for a subgraph +- **Deployment ID** (e.g., `0x4d7c...`): Identifier for a specific, immutable deployment +- **IPFS Hash** (e.g., `QmTZ8e...`): Identifier for the manifest of a specific deployment + +## Example Interactions + +Here are some examples of how you can interact with Claude once the Subgraph MCP is set up: + +``` +Get the schema for subgraph deployment 0xYourDeploymentIdHere + +Run this query against subgraph 5zvR82YourSubgraphIdHere: { users(first: 1) { id } } + +Find the top subgraphs for contract 0x1f98431c8ad98523631ae4a59f267346ea31f984 on arbitrum-one +``` + +## Additional Resources + +- [The Graph Documentation](https://thegraph.com/docs/) +- [Subgraph MCP GitHub Repository](https://github.com/graphops/subgraph-mcp) +- [Token API MCP Documentation](https://thegraph.com/docs/en/token-api/mcp/claude/) From ebafea39a94b527b1e27eb5e9d19bc2bb1cc23e7 Mon Sep 17 00:00:00 2001 From: Michael Macaulay Date: Fri, 9 May 2025 12:08:16 -0400 Subject: [PATCH 02/34] Initial structure --- website/src/pages/en/subgraphs/_meta-titles.json | 3 ++- website/src/pages/en/subgraphs/_meta.js | 1 + website/src/pages/en/subgraphs/mcp/_meta.js | 5 +++++ .../{developing/subgraph-mcp.mdx => mcp/claude.mdx} | 2 +- website/src/pages/en/subgraphs/mcp/cline.mdx | 4 ++++ website/src/pages/en/subgraphs/mcp/cursor.mdx | 4 ++++ 6 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 website/src/pages/en/subgraphs/mcp/_meta.js rename website/src/pages/en/subgraphs/{developing/subgraph-mcp.mdx => mcp/claude.mdx} (99%) create mode 100644 website/src/pages/en/subgraphs/mcp/cline.mdx create mode 100644 website/src/pages/en/subgraphs/mcp/cursor.mdx diff --git a/website/src/pages/en/subgraphs/_meta-titles.json b/website/src/pages/en/subgraphs/_meta-titles.json index 3fd405eed29a..f095d374344f 100644 --- a/website/src/pages/en/subgraphs/_meta-titles.json +++ b/website/src/pages/en/subgraphs/_meta-titles.json @@ -2,5 +2,6 @@ "querying": "Querying", "developing": "Developing", "guides": "How-to Guides", - "best-practices": "Best Practices" + "best-practices": "Best Practices", + "mcp": "MCP" } diff --git a/website/src/pages/en/subgraphs/_meta.js b/website/src/pages/en/subgraphs/_meta.js index ed3e5db7a6f0..a74e3023caff 100644 --- a/website/src/pages/en/subgraphs/_meta.js +++ b/website/src/pages/en/subgraphs/_meta.js @@ -6,6 +6,7 @@ export default { querying: titles.querying, developing: titles.developing, billing: '', + mcp: titles.mcp, guides: titles.guides, 'best-practices': titles['best-practices'], } diff --git a/website/src/pages/en/subgraphs/mcp/_meta.js b/website/src/pages/en/subgraphs/mcp/_meta.js new file mode 100644 index 000000000000..8630d4da27b3 --- /dev/null +++ b/website/src/pages/en/subgraphs/mcp/_meta.js @@ -0,0 +1,5 @@ +export default { + claude: '', + cline: '', + cursor: '', +} diff --git a/website/src/pages/en/subgraphs/developing/subgraph-mcp.mdx b/website/src/pages/en/subgraphs/mcp/claude.mdx similarity index 99% rename from website/src/pages/en/subgraphs/developing/subgraph-mcp.mdx rename to website/src/pages/en/subgraphs/mcp/claude.mdx index 07a695d8abec..b0bfe4f00d5a 100644 --- a/website/src/pages/en/subgraphs/developing/subgraph-mcp.mdx +++ b/website/src/pages/en/subgraphs/mcp/claude.mdx @@ -1,5 +1,5 @@ --- -title: Subgraph MCP +title: Claude --- ## Using Claude Desktop to Access Subgraphs via MCP diff --git a/website/src/pages/en/subgraphs/mcp/cline.mdx b/website/src/pages/en/subgraphs/mcp/cline.mdx new file mode 100644 index 000000000000..2a2829819ac5 --- /dev/null +++ b/website/src/pages/en/subgraphs/mcp/cline.mdx @@ -0,0 +1,4 @@ +--- +title: Cline +--- + diff --git a/website/src/pages/en/subgraphs/mcp/cursor.mdx b/website/src/pages/en/subgraphs/mcp/cursor.mdx new file mode 100644 index 000000000000..7fdbaa454480 --- /dev/null +++ b/website/src/pages/en/subgraphs/mcp/cursor.mdx @@ -0,0 +1,4 @@ +--- +title: Cursor +--- + From d60f8d6e4312e626876d8738fefc218e81a4ce53 Mon Sep 17 00:00:00 2001 From: Michael Macaulay Date: Mon, 12 May 2025 12:59:13 -0400 Subject: [PATCH 03/34] Updating & scaffolding --- website/src/pages/en/subgraphs/mcp/claude.mdx | 184 ++++++------------ website/src/pages/en/subgraphs/mcp/cline.mdx | 117 +++++++++++ website/src/pages/en/subgraphs/mcp/cursor.mdx | 117 +++++++++++ 3 files changed, 296 insertions(+), 122 deletions(-) diff --git a/website/src/pages/en/subgraphs/mcp/claude.mdx b/website/src/pages/en/subgraphs/mcp/claude.mdx index b0bfe4f00d5a..97443a4c748f 100644 --- a/website/src/pages/en/subgraphs/mcp/claude.mdx +++ b/website/src/pages/en/subgraphs/mcp/claude.mdx @@ -2,100 +2,84 @@ title: Claude --- -## Using Claude Desktop to Access Subgraphs via MCP +The Subgraph Model Context Protocol (MCP) server enables Claude 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 Claude. -The Subgraph Model Context Protocol (MCP) server enables Claude 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 Claude. - -### What You Can Do +## What You Can Do With the Subgraph MCP integration, you can: -- Access the GraphQL schema for any subgraph on The Graph Network -- Execute GraphQL queries against any subgraph deployment -- Find top subgraph deployments for a contract address on a specific chain -- Ask natural language questions about subgraph data without writing GraphQL queries manually - -### Requirements - -Before setting up the Subgraph MCP server, make sure you have: - -- **Claude Desktop**: Latest version installed -- **Rust**: Latest stable version (1.75+) -- **Gateway API key**: An API key from The Graph Network +- Access the GraphQL schema for any Subgraph on The Graph Network +- Execute GraphQL queries against any Subgraph deployment +- Find top Subgraph deployments for a contract address on a specific chain +- Ask natural language questions about Subgraph data without writing GraphQL queries manually -## Installation +## Prerequisites -### Step 1: Install Rust (if not already installed) +- [Claude Desktop](https://claude.ai/download) installed (latest version) +- A Gateway API key from [Subgraph Studio](https://thegraph.com/studio/) +- [`npx`](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) or [`bunx`](https://bun.sh/) installed and available in your path -```bash -curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -``` +## Configuration -Follow the on-screen instructions. For other platforms, see the [official Rust installation guide](https://www.rust-lang.org/tools/install). +Create or edit your `claude_desktop_config.json` file. -### Step 2: Install the Subgraph MCP Server +> **Settings** > **Developer** > **Edit Config** -```bash -# Clone the repository -git clone git@github.com:graphops/subgraph-mcp.git -cd subgraph-mcp +- OSX: `~/Library/Application Support/Claude/claude_desktop_config.json` +- Windows: `%APPDATA%\Claude\claude_desktop_config.json` +- Linux: `.config/Claude/claude_desktop_config.json` -# Build the project -cargo build --release +```json label="claude_desktop_config.json" +{ + "mcpServers": { + "subgraph": { + "command": "npx", + "args": [ + "mcp-remote", + "--header", + "Authorization: Bearer GATEWAY_API_KEY", + "https://subgraph-ai.graphops.xyz/sse" + ] + } + } +} ``` -### Step 3: Get your Gateway API Key - -You'll need an API key from [Subgraph Studio](https://thegraph.com/studio/) to authenticate requests to The Graph Network. - -## Configuration +Replace `GATEWAY_API_KEY` with your API key from Subgraph Studio. -### Configure Claude Desktop - -1. Open Claude Desktop and click on the top left corner to access Settings -2. Add the Subgraph MCP server to your `claude_desktop_config.json` +## Using Both Token API MCP and Subgraph MCP Together -Here's how to set up your configuration: +You can configure Claude Desktop to use both the Token API MCP and Subgraph MCP simultaneously: -```json +```json label="claude_desktop_config.json" { "mcpServers": { - "subgraph": { - "command": "/path/to/your/subgraph-mcp/target/release/subgraph-mcp", + "token-api": { + "command": "npx", + "args": ["@pinax/mcp", "--sse-url", "https://token-api.thegraph.com/sse"], "env": { - "GATEWAY_API_KEY": "your-api-key-here" + "ACCESS_TOKEN": "ACCESS_TOKEN" } + }, + "subgraph": { + "command": "npx", + "args": [ + "mcp-remote", + "--header", + "Authorization: Bearer GATEWAY_API_KEY", + "https://subgraph-ai.graphops.xyz/sse" + ] } } } ``` -#### Finding the Command Path - -After building the project, you need to specify the absolute path to the compiled binary: - -1. Navigate to your `subgraph-mcp` directory in the terminal -2. Run `pwd` to get the full path to the directory -3. Add `/target/release/subgraph-mcp` to that path - -For example, if `pwd` outputs `/Users/username/subgraph-mcp`, your full command path would be: `/Users/username/subgraph-mcp/target/release/subgraph-mcp` - -### Troubleshooting Installation - -If you encounter issues with the setup: - -1. Clean any existing build and rebuild: +- For Token API access tokens, visit [The Graph Market](https://thegraph.com/explorer) +- For Subgraph Gateway API keys, visit [Subgraph Studio](https://thegraph.com/studio/) - ```bash - cd subgraph-mcp - cargo clean - cargo build --release - ``` +## Troubleshooting -2. Ensure the executable has proper permissions: - ```bash - chmod +x target/release/subgraph-mcp - ``` +To enable logs for the MCP, add the `--verbose true` option to your args array. ## Using The Graph Resource in Claude @@ -110,91 +94,47 @@ After configuring Claude Desktop: ## Available Tools and Usage -The Subgraph MCP provides several tools for interacting with subgraphs: +The Subgraph MCP provides several tools for interacting with Subgraphs: ### Schema Retrieval Tools - **Get schema by deployment ID**: Access the GraphQL schema using a deployment ID (0x...) -- **Get schema by subgraph ID**: Access the schema for the current deployment of a subgraph (5zvR82...) -- **Get schema by IPFS hash**: Access the schema using a subgraph's IPFS manifest hash (Qm...) +- **Get schema by Subgraph ID**: Access the schema for the current deployment of a Subgraph (5zvR82...) +- **Get schema by IPFS hash**: Access the schema using a Subgraph's IPFS manifest hash (Qm...) ### Query Execution Tools - **Execute query by deployment ID**: Run GraphQL queries against specific, immutable deployments -- **Execute query by subgraph ID**: Run GraphQL queries against the latest version of a subgraph +- **Execute query by Subgraph ID**: Run GraphQL queries against the latest version of a Subgraph ### Discovery Tools -- **Get top subgraph deployments**: Find the top 3 subgraph deployments indexing a specific contract on a particular chain +- **Get top Subgraph deployments**: Find the top 3 Subgraph deployments indexing a specific contract on a particular chain ## Natural Language Queries One of the most powerful features of the Subgraph MCP integration is the ability to ask questions in natural language. Claude will: -1. Understand your goal (lookup, find subgraphs, query, get schema) +1. Understand your goal (lookup, find Subgraphs, query, get schema) 2. Find relevant deployments if needed -3. Fetch and interpret the subgraph schema +3. Fetch and interpret the Subgraph schema 4. Convert your question into an appropriate GraphQL query 5. Execute the query and present the results in a readable format ### Example Natural Language Queries ``` -What are the pairs with maximum volume on 0xde0a7b5368f846f7d863d9f64949b688ad9818243151d488b4c6b206145b9ea3? +What are the pairs with maximum volume on deployment 0xde0a7b5368f846f7d863d9f64949b688ad9818243151d488b4c6b206145b9ea3? -Which tokens have the highest market cap in this subgraph? +Which tokens have the highest market cap in this Subgraph? Show me the most recent 5 swaps for the USDC/ETH pair ``` -## Using Both Token API MCP and Subgraph MCP Together - -You can configure Claude Desktop to use both the Token API MCP and Subgraph MCP simultaneously: - -```json -{ - "mcpServers": { - "token-api": { - "command": "path-to-bunx", - "args": ["@pinax/mcp", "--sse-url", "https://token-api.thegraph.com/sse"], - "env": { - "ACCESS_TOKEN": "access-token-from-graph-market" - } - }, - "subgraph": { - "command": "/path/to/subgraph-mcp/target/release/subgraph-mcp", - "env": { - "GATEWAY_API_KEY": "api-key-from-subgraph-studio" - } - } - } -} -``` - -For Token API access tokens, visit [The Graph Market](https://thegraph.com/explorer). For Subgraph Gateway API keys, visit [Subgraph Studio](https://thegraph.com/studio/). - ## Key Identifier Types -When working with subgraphs, you'll encounter different types of identifiers: +When working with Subgraphs, you'll encounter different types of identifiers: -- **Subgraph ID** (e.g., `5zvR82...`): Logical identifier for a subgraph +- **Subgraph ID** (e.g., `5zvR82...`): Logical identifier for a Subgraph - **Deployment ID** (e.g., `0x4d7c...`): Identifier for a specific, immutable deployment - **IPFS Hash** (e.g., `QmTZ8e...`): Identifier for the manifest of a specific deployment - -## Example Interactions - -Here are some examples of how you can interact with Claude once the Subgraph MCP is set up: - -``` -Get the schema for subgraph deployment 0xYourDeploymentIdHere - -Run this query against subgraph 5zvR82YourSubgraphIdHere: { users(first: 1) { id } } - -Find the top subgraphs for contract 0x1f98431c8ad98523631ae4a59f267346ea31f984 on arbitrum-one -``` - -## Additional Resources - -- [The Graph Documentation](https://thegraph.com/docs/) -- [Subgraph MCP GitHub Repository](https://github.com/graphops/subgraph-mcp) -- [Token API MCP Documentation](https://thegraph.com/docs/en/token-api/mcp/claude/) diff --git a/website/src/pages/en/subgraphs/mcp/cline.mdx b/website/src/pages/en/subgraphs/mcp/cline.mdx index 2a2829819ac5..cc0a46eb432f 100644 --- a/website/src/pages/en/subgraphs/mcp/cline.mdx +++ b/website/src/pages/en/subgraphs/mcp/cline.mdx @@ -2,3 +2,120 @@ title: Cline --- +The Subgraph Model Context Protocol (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. + +## Prerequisites + +- [Cline](https://cline.bot/) installed (latest version) +- A Gateway API key from [Subgraph Studio](https://thegraph.com/studio/) +- [`npx`](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) or [`bunx`](https://bun.sh/) installed and available in your path + +## Configuration + +Create or edit your `cline_mcp_settings.json` file. + +> **MCP Servers** > **Installed** > **Configure MCP Servers** + +```json label="cline_mcp_settings.json" +{ + "mcpServers": { + "subgraph": { + "command": "npx", + "args": [ + "mcp-remote", + "--header", + "Authorization: Bearer GATEWAY_API_KEY", + "https://subgraph-ai.graphops.xyz/sse" + ] + } + } +} +``` + +Replace `GATEWAY_API_KEY` with your API key from Subgraph Studio. + +## Using Both Token API MCP and Subgraph MCP Together + +You can configure Cline to use both the Token API MCP and Subgraph MCP simultaneously: + +```json label="cline_mcp_settings.json" +{ + "mcpServers": { + "token-api": { + "command": "npx", + "args": ["@pinax/mcp", "--sse-url", "https://token-api.thegraph.com/sse"], + "env": { + "ACCESS_TOKEN": "ACCESS_TOKEN" + } + }, + "subgraph": { + "command": "npx", + "args": [ + "mcp-remote", + "--header", + "Authorization: Bearer GATEWAY_API_KEY", + "https://subgraph-ai.graphops.xyz/sse" + ] + } + } +} +``` + +- For Token API access tokens, visit [The Graph Market](https://thegraph.com/explorer) +- For Subgraph Gateway API keys, visit [Subgraph Studio](https://thegraph.com/studio/) + +## Using The Graph Resource in Cline + +After configuring Cline: + +1. Restart Cline +2. Start a new conversation +3. Enable the Subgraph MCP from the context menu +4. Add "The Graph" resource to your chat context + +## Available Tools and Usage + +The Subgraph MCP provides several tools for interacting with Subgraphs: + +### Schema Retrieval Tools + +- **Get schema by deployment ID**: Access the GraphQL schema using a deployment ID (0x...) +- **Get schema by Subgraph ID**: Access the schema for the current deployment of a Subgraph (5zvR82...) +- **Get schema by IPFS hash**: Access the schema using a Subgraph's IPFS manifest hash (Qm...) + +### Query Execution Tools + +- **Execute query by deployment ID**: Run GraphQL queries against specific, immutable deployments +- **Execute query by Subgraph ID**: Run GraphQL queries against the latest version of a Subgraph + +### Discovery Tools + +- **Get top Subgraph deployments**: Find the top 3 Subgraph deployments indexing a specific contract on a particular chain + +## Natural Language Queries + +One of the most powerful features of the Subgraph MCP integration is the ability to ask questions in natural language. Cline will: + +1. Understand your goal (lookup, find Subgraphs, query, get schema) +2. Find relevant deployments if needed +3. Fetch and interpret the Subgraph schema +4. Convert your question into an appropriate GraphQL query +5. Execute the query and present the results in a readable format + +### Example Natural Language Queries + +``` +What are the pairs with maximum volume on deployment 0xde0a7b5368f846f7d863d9f64949b688ad9818243151d488b4c6b206145b9ea3? + +Which tokens have the highest market cap in this Subgraph? + +Show me the most recent 5 swaps for the USDC/ETH pair +``` + +## Key Identifier Types + +When working with Subgraphs, you'll encounter different types of identifiers: + +- **Subgraph ID** (e.g., `5zvR82...`): Logical identifier for a Subgraph +- **Deployment ID** (e.g., `0x4d7c...`): Identifier for a specific, immutable deployment +- **IPFS Hash** (e.g., `QmTZ8e...`): Identifier for the manifest of a specific deployment diff --git a/website/src/pages/en/subgraphs/mcp/cursor.mdx b/website/src/pages/en/subgraphs/mcp/cursor.mdx index 7fdbaa454480..42c8d6122433 100644 --- a/website/src/pages/en/subgraphs/mcp/cursor.mdx +++ b/website/src/pages/en/subgraphs/mcp/cursor.mdx @@ -2,3 +2,120 @@ title: Cursor --- +The Subgraph Model Context Protocol (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. + +## Prerequisites + +- [Cursor](https://www.cursor.com/) installed (latest version) +- A Gateway API key from [Subgraph Studio](https://thegraph.com/studio/) +- [`npx`](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) or [`bunx`](https://bun.sh/) installed and available in your path + +## Configuration + +Create or edit your `~/.cursor/mcp.json` file. + +> **Cursor Settings** > **MCP** > **Add new global MCP Server** + +```json label="mcp.json" +{ + "mcpServers": { + "subgraph": { + "command": "npx", + "args": [ + "mcp-remote", + "--header", + "Authorization: Bearer GATEWAY_API_KEY", + "https://subgraph-ai.graphops.xyz/sse" + ] + } + } +} +``` + +Replace `GATEWAY_API_KEY` with your API key from Subgraph Studio. + +## Using Both Token API MCP and Subgraph MCP Together + +You can configure Cursor to use both the Token API MCP and Subgraph MCP simultaneously: + +```json label="mcp.json" +{ + "mcpServers": { + "token-api": { + "command": "npx", + "args": ["@pinax/mcp", "--sse-url", "https://token-api.thegraph.com/sse"], + "env": { + "ACCESS_TOKEN": "ACCESS_TOKEN" + } + }, + "subgraph": { + "command": "npx", + "args": [ + "mcp-remote", + "--header", + "Authorization: Bearer GATEWAY_API_KEY", + "https://subgraph-ai.graphops.xyz/sse" + ] + } + } +} +``` + +- For Token API access tokens, visit [The Graph Market](https://thegraph.com/explorer) +- For Subgraph Gateway API keys, visit [Subgraph Studio](https://thegraph.com/studio/) + +## Using The Graph Resource in Cursor + +After configuring Cursor: + +1. Restart Cursor +2. Start a new conversation +3. Enable the Subgraph MCP from the MCP settings menu +4. Add "The Graph" resource to your chat context + +## Available Tools and Usage + +The Subgraph MCP provides several tools for interacting with Subgraphs: + +### Schema Retrieval Tools + +- **Get schema by deployment ID**: Access the GraphQL schema using a deployment ID (0x...) +- **Get schema by Subgraph ID**: Access the schema for the current deployment of a Subgraph (5zvR82...) +- **Get schema by IPFS hash**: Access the schema using a Subgraph's IPFS manifest hash (Qm...) + +### Query Execution Tools + +- **Execute query by deployment ID**: Run GraphQL queries against specific, immutable deployments +- **Execute query by Subgraph ID**: Run GraphQL queries against the latest version of a Subgraph + +### Discovery Tools + +- **Get top Subgraph deployments**: Find the top 3 Subgraph deployments indexing a specific contract on a particular chain + +## Natural Language Queries + +One of the most powerful features of the Subgraph MCP integration is the ability to ask questions in natural language. Cursor will: + +1. Understand your goal (lookup, find Subgraphs, query, get schema) +2. Find relevant deployments if needed +3. Fetch and interpret the Subgraph schema +4. Convert your question into an appropriate GraphQL query +5. Execute the query and present the results in a readable format + +### Example Natural Language Queries + +``` +What are the pairs with maximum volume on deployment 0xde0a7b5368f846f7d863d9f64949b688ad9818243151d488b4c6b206145b9ea3? + +Which tokens have the highest market cap in this Subgraph? + +Show me the most recent 5 swaps for the USDC/ETH pair +``` + +## Key Identifier Types + +When working with Subgraphs, you'll encounter different types of identifiers: + +- **Subgraph ID** (e.g., `5zvR82...`): Logical identifier for a Subgraph +- **Deployment ID** (e.g., `0x4d7c...`): Identifier for a specific, immutable deployment +- **IPFS Hash** (e.g., `QmTZ8e...`): Identifier for the manifest of a specific deployment From 780b7df6c43588980128df440fa3cecde7d8c55d Mon Sep 17 00:00:00 2001 From: Michael Macaulay Date: Tue, 13 May 2025 18:13:10 -0400 Subject: [PATCH 04/34] Latest edits --- website/src/pages/en/resources/_meta.js | 1 + website/src/pages/en/resources/claud-mcp.mdx | 123 ++++++++++++++++++ website/src/pages/en/subgraphs/mcp/claude.mdx | 60 +++------ 3 files changed, 139 insertions(+), 45 deletions(-) create mode 100644 website/src/pages/en/resources/claud-mcp.mdx diff --git a/website/src/pages/en/resources/_meta.js b/website/src/pages/en/resources/_meta.js index 66cf79a52b51..04b75af0eb85 100644 --- a/website/src/pages/en/resources/_meta.js +++ b/website/src/pages/en/resources/_meta.js @@ -7,4 +7,5 @@ export default { roles: titles.roles, 'migration-guides': titles['migration-guides'], 'subgraph-studio-faq': '', + 'claud-mcp': '', } diff --git a/website/src/pages/en/resources/claud-mcp.mdx b/website/src/pages/en/resources/claud-mcp.mdx new file mode 100644 index 000000000000..9e531865a312 --- /dev/null +++ b/website/src/pages/en/resources/claud-mcp.mdx @@ -0,0 +1,123 @@ +--- +title: Claude MCP +--- + +This guide walks you through configuring Claude Desktop to use The Graph ecosystem's Model Context Protocol (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**: Explore Subgraph schemas, execute GraphQL queries, and find relevant Subgraphs for specific contracts + +## 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 + +Follow these steps to configure both Token API and Subgraph MCP in Claude Desktop: + +### Step 1: Open Configuration File + +Edit your `claude_desktop_config.json` file: + +> **Claude Desktop** > **Settings** > **Developer** > **Edit Config** + +File locations 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` + +### Step 2: Add Configuration + +Replace the existing configuration with this template: + +```json +{ + "mcpServers": { + "token-api": { + "command": "npx", + "args": ["@pinax/mcp", "--sse-url", "https://token-api.thegraph.com/sse"], + "env": { + "ACCESS_TOKEN": "ACCESS_TOKEN" + } + }, + "subgraph": { + "command": "npx", + "args": [ + "mcp-remote", + "--header", + "Authorization: Bearer GATEWAY_API_KEY", + "https://subgraph-ai.graphops.xyz/sse" + ] + } + } +} +``` + +### Step 3: Add Your API Keys + +1. Replace `ACCESS_TOKEN` with your Token API key from [The Graph Market](https://thegraph.market/) +2. Replace `GATEWAY_API_KEY` with your Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +### Step 4: Save and Restart + +Save the configuration file and restart Claude Desktop. + +## Using 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 "The Graph" resource by entering `graphql://subgraph` for Subgraph MCP and/or `token-api://token-api` for Token API + +**Important**: You must manually add The Graph resources to your chat context for each conversation where you want to use them. + +## Example Queries + +Here are some example queries you can try after setting up the resources: + +### Subgraph Queries + +``` +What are the top pools in Uniswap? +``` + +``` +Top delegators of The Graph Protocol? +``` + +``` +Number of active loans in Compound for the last 7 days? Please make it a bar chart +``` + +### 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/mcp/claude.mdx b/website/src/pages/en/subgraphs/mcp/claude.mdx index 97443a4c748f..96aad7ac5e3d 100644 --- a/website/src/pages/en/subgraphs/mcp/claude.mdx +++ b/website/src/pages/en/subgraphs/mcp/claude.mdx @@ -1,5 +1,5 @@ --- -title: Claude +title: Claude Desktop --- The Subgraph Model Context Protocol (MCP) server enables Claude 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 Claude. @@ -15,13 +15,13 @@ With the Subgraph MCP integration, you can: ## Prerequisites -- [Claude Desktop](https://claude.ai/download) installed (latest version) +- [Node.js](https://nodejs.org/en) installed and available in your path +- [Claude Desktop](https://claude.ai/download) installed - A Gateway API key from [Subgraph Studio](https://thegraph.com/studio/) -- [`npx`](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) or [`bunx`](https://bun.sh/) installed and available in your path ## Configuration -Create or edit your `claude_desktop_config.json` file. +Edit your `claude_desktop_config.json` file. > **Settings** > **Developer** > **Edit Config** @@ -29,38 +29,11 @@ Create or edit your `claude_desktop_config.json` file. - Windows: `%APPDATA%\Claude\claude_desktop_config.json` - Linux: `.config/Claude/claude_desktop_config.json` -```json label="claude_desktop_config.json" -{ - "mcpServers": { - "subgraph": { - "command": "npx", - "args": [ - "mcp-remote", - "--header", - "Authorization: Bearer GATEWAY_API_KEY", - "https://subgraph-ai.graphops.xyz/sse" - ] - } - } -} -``` - -Replace `GATEWAY_API_KEY` with your API key from Subgraph Studio. - -## Using Both Token API MCP and Subgraph MCP Together - -You can configure Claude Desktop to use both the Token API MCP and Subgraph MCP simultaneously: +Paste the following settings into your config file: ```json label="claude_desktop_config.json" { "mcpServers": { - "token-api": { - "command": "npx", - "args": ["@pinax/mcp", "--sse-url", "https://token-api.thegraph.com/sse"], - "env": { - "ACCESS_TOKEN": "ACCESS_TOKEN" - } - }, "subgraph": { "command": "npx", "args": [ @@ -74,12 +47,9 @@ You can configure Claude Desktop to use both the Token API MCP and Subgraph MCP } ``` -- For Token API access tokens, visit [The Graph Market](https://thegraph.com/explorer) -- For Subgraph Gateway API keys, visit [Subgraph Studio](https://thegraph.com/studio/) - -## Troubleshooting +Replace `GATEWAY_API_KEY` with your API key from [Subgraph Studio](https://thegraph.com/studio/). -To enable logs for the MCP, add the `--verbose true` option to your args array. +Once you've entered your Gateway API key into your settings, you can save the file, and restart Claude desktop. ## Using The Graph Resource in Claude @@ -92,6 +62,10 @@ After configuring Claude Desktop: **Important**: Claude Desktop may not automatically utilize the Subgraph MCP. You must manually add "The Graph" resource to your chat context for each conversation where you want to use it. +## Troubleshooting + +To enable logs for the MCP, add the `--verbose true` option to your args array. + ## Available Tools and Usage The Subgraph MCP provides several tools for interacting with Subgraphs: @@ -125,16 +99,12 @@ One of the most powerful features of the Subgraph MCP integration is the ability ``` What are the pairs with maximum volume on deployment 0xde0a7b5368f846f7d863d9f64949b688ad9818243151d488b4c6b206145b9ea3? +``` +``` Which tokens have the highest market cap in this Subgraph? +``` +``` Show me the most recent 5 swaps for the USDC/ETH pair ``` - -## Key Identifier Types - -When working with Subgraphs, you'll encounter different types of identifiers: - -- **Subgraph ID** (e.g., `5zvR82...`): Logical identifier for a Subgraph -- **Deployment ID** (e.g., `0x4d7c...`): Identifier for a specific, immutable deployment -- **IPFS Hash** (e.g., `QmTZ8e...`): Identifier for the manifest of a specific deployment From 02235510b4b09f7476a21e06cc41595f37f5f776 Mon Sep 17 00:00:00 2001 From: Michael Macaulay <56690114+MichaelMacaulay@users.noreply.github.com> Date: Wed, 14 May 2025 09:12:37 -0400 Subject: [PATCH 05/34] Update website/src/pages/en/resources/claud-mcp.mdx Co-authored-by: Idalith <126833353+idalithb@users.noreply.github.com> --- website/src/pages/en/resources/claud-mcp.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/en/resources/claud-mcp.mdx b/website/src/pages/en/resources/claud-mcp.mdx index 9e531865a312..18ceef980522 100644 --- a/website/src/pages/en/resources/claud-mcp.mdx +++ b/website/src/pages/en/resources/claud-mcp.mdx @@ -19,7 +19,7 @@ With these integrations, you can: - Token API key from [The Graph Market](https://thegraph.market/) - Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) -## Configuration +## Configuration Steps Follow these steps to configure both Token API and Subgraph MCP in Claude Desktop: From 01809b1e22ebbf16d3d305589e5d52fb353408a6 Mon Sep 17 00:00:00 2001 From: Michael Macaulay <56690114+MichaelMacaulay@users.noreply.github.com> Date: Wed, 14 May 2025 09:12:51 -0400 Subject: [PATCH 06/34] Update website/src/pages/en/resources/claud-mcp.mdx Co-authored-by: Idalith <126833353+idalithb@users.noreply.github.com> --- website/src/pages/en/resources/claud-mcp.mdx | 1 - 1 file changed, 1 deletion(-) diff --git a/website/src/pages/en/resources/claud-mcp.mdx b/website/src/pages/en/resources/claud-mcp.mdx index 18ceef980522..9b61be5d584d 100644 --- a/website/src/pages/en/resources/claud-mcp.mdx +++ b/website/src/pages/en/resources/claud-mcp.mdx @@ -21,7 +21,6 @@ With these integrations, you can: ## Configuration Steps -Follow these steps to configure both Token API and Subgraph MCP in Claude Desktop: ### Step 1: Open Configuration File From 847714c8b964a5906541e60a4076d2b040da608f Mon Sep 17 00:00:00 2001 From: Michael Macaulay <56690114+MichaelMacaulay@users.noreply.github.com> Date: Wed, 14 May 2025 09:13:00 -0400 Subject: [PATCH 07/34] Update website/src/pages/en/resources/claud-mcp.mdx Co-authored-by: Idalith <126833353+idalithb@users.noreply.github.com> --- website/src/pages/en/resources/claud-mcp.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/en/resources/claud-mcp.mdx b/website/src/pages/en/resources/claud-mcp.mdx index 9b61be5d584d..afa259efa63a 100644 --- a/website/src/pages/en/resources/claud-mcp.mdx +++ b/website/src/pages/en/resources/claud-mcp.mdx @@ -22,7 +22,7 @@ With these integrations, you can: ## Configuration Steps -### Step 1: Open Configuration File +### 1. Open Configuration File Edit your `claude_desktop_config.json` file: From bd33950d597e013f17932831e3d25b33a1edfa10 Mon Sep 17 00:00:00 2001 From: Michael Macaulay <56690114+MichaelMacaulay@users.noreply.github.com> Date: Wed, 14 May 2025 09:13:09 -0400 Subject: [PATCH 08/34] Update website/src/pages/en/resources/claud-mcp.mdx Co-authored-by: Idalith <126833353+idalithb@users.noreply.github.com> --- website/src/pages/en/resources/claud-mcp.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/en/resources/claud-mcp.mdx b/website/src/pages/en/resources/claud-mcp.mdx index afa259efa63a..a124d7289d27 100644 --- a/website/src/pages/en/resources/claud-mcp.mdx +++ b/website/src/pages/en/resources/claud-mcp.mdx @@ -24,7 +24,7 @@ With these integrations, you can: ### 1. Open Configuration File -Edit your `claude_desktop_config.json` file: +Navigate to your `claude_desktop_config.json` file: > **Claude Desktop** > **Settings** > **Developer** > **Edit Config** From 11d52137e87db9d7b3b8f146acc278acdb45283f Mon Sep 17 00:00:00 2001 From: Michael Macaulay <56690114+MichaelMacaulay@users.noreply.github.com> Date: Wed, 14 May 2025 09:13:24 -0400 Subject: [PATCH 09/34] Update website/src/pages/en/resources/claud-mcp.mdx Co-authored-by: Idalith <126833353+idalithb@users.noreply.github.com> --- website/src/pages/en/resources/claud-mcp.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/en/resources/claud-mcp.mdx b/website/src/pages/en/resources/claud-mcp.mdx index a124d7289d27..2789629aa5b9 100644 --- a/website/src/pages/en/resources/claud-mcp.mdx +++ b/website/src/pages/en/resources/claud-mcp.mdx @@ -28,7 +28,7 @@ Navigate to your `claude_desktop_config.json` file: > **Claude Desktop** > **Settings** > **Developer** > **Edit Config** -File locations by operating system: +Paths by operating system: - OSX: `~/Library/Application Support/Claude/claude_desktop_config.json` - Windows: `%APPDATA%\Claude\claude_desktop_config.json` From 683b76cf1b7177ade64f492b3e1c797e56a30d30 Mon Sep 17 00:00:00 2001 From: Michael Macaulay <56690114+MichaelMacaulay@users.noreply.github.com> Date: Wed, 14 May 2025 09:13:37 -0400 Subject: [PATCH 10/34] Update website/src/pages/en/resources/claud-mcp.mdx Co-authored-by: Idalith <126833353+idalithb@users.noreply.github.com> --- website/src/pages/en/resources/claud-mcp.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/en/resources/claud-mcp.mdx b/website/src/pages/en/resources/claud-mcp.mdx index 2789629aa5b9..916abda709cb 100644 --- a/website/src/pages/en/resources/claud-mcp.mdx +++ b/website/src/pages/en/resources/claud-mcp.mdx @@ -34,7 +34,7 @@ Paths by operating system: - Windows: `%APPDATA%\Claude\claude_desktop_config.json` - Linux: `.config/Claude/claude_desktop_config.json` -### Step 2: Add Configuration +### 2. Add Configuration Replace the existing configuration with this template: From bfc1e9ad1fb90ab8392d47bd67cb4bb38cfd647a Mon Sep 17 00:00:00 2001 From: Michael Macaulay <56690114+MichaelMacaulay@users.noreply.github.com> Date: Wed, 14 May 2025 09:13:51 -0400 Subject: [PATCH 11/34] Update website/src/pages/en/subgraphs/mcp/claude.mdx Co-authored-by: Idalith <126833353+idalithb@users.noreply.github.com> --- website/src/pages/en/subgraphs/mcp/claude.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/en/subgraphs/mcp/claude.mdx b/website/src/pages/en/subgraphs/mcp/claude.mdx index 96aad7ac5e3d..e45a1b7b0974 100644 --- a/website/src/pages/en/subgraphs/mcp/claude.mdx +++ b/website/src/pages/en/subgraphs/mcp/claude.mdx @@ -66,7 +66,7 @@ After configuring Claude Desktop: To enable logs for the MCP, add the `--verbose true` option to your args array. -## Available Tools and Usage +## Available Subgraph Tools and Usage The Subgraph MCP provides several tools for interacting with Subgraphs: From a81989128b354bfc5f5d0ef469a1b54c2c9f4df1 Mon Sep 17 00:00:00 2001 From: Michael Macaulay <56690114+MichaelMacaulay@users.noreply.github.com> Date: Wed, 14 May 2025 09:14:52 -0400 Subject: [PATCH 12/34] Update website/src/pages/en/subgraphs/mcp/cursor.mdx Co-authored-by: Idalith <126833353+idalithb@users.noreply.github.com> --- website/src/pages/en/subgraphs/mcp/cursor.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/en/subgraphs/mcp/cursor.mdx b/website/src/pages/en/subgraphs/mcp/cursor.mdx index 42c8d6122433..27d37ced974a 100644 --- a/website/src/pages/en/subgraphs/mcp/cursor.mdx +++ b/website/src/pages/en/subgraphs/mcp/cursor.mdx @@ -73,7 +73,7 @@ After configuring Cursor: 3. Enable the Subgraph MCP from the MCP settings menu 4. Add "The Graph" resource to your chat context -## Available Tools and Usage +## Available Subgraph Tools and Usage The Subgraph MCP provides several tools for interacting with Subgraphs: From 12aecba8908951629d7d34b59969a0b3a008686f Mon Sep 17 00:00:00 2001 From: Michael Macaulay <56690114+MichaelMacaulay@users.noreply.github.com> Date: Wed, 14 May 2025 09:15:11 -0400 Subject: [PATCH 13/34] Update website/src/pages/en/subgraphs/mcp/cursor.mdx Co-authored-by: Idalith <126833353+idalithb@users.noreply.github.com> --- website/src/pages/en/subgraphs/mcp/cursor.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/en/subgraphs/mcp/cursor.mdx b/website/src/pages/en/subgraphs/mcp/cursor.mdx index 27d37ced974a..e961a943a786 100644 --- a/website/src/pages/en/subgraphs/mcp/cursor.mdx +++ b/website/src/pages/en/subgraphs/mcp/cursor.mdx @@ -92,7 +92,7 @@ The Subgraph MCP provides several tools for interacting with Subgraphs: - **Get top Subgraph deployments**: Find the top 3 Subgraph deployments indexing a specific contract on a particular chain -## Natural Language Queries +## Benefits of Natural Language Queries One of the most powerful features of the Subgraph MCP integration is the ability to ask questions in natural language. Cursor will: From f1b3419e420c80d80ae96caeb0059c6baf069590 Mon Sep 17 00:00:00 2001 From: Michael Macaulay <56690114+MichaelMacaulay@users.noreply.github.com> Date: Wed, 14 May 2025 09:15:44 -0400 Subject: [PATCH 14/34] Update website/src/pages/en/resources/claud-mcp.mdx Co-authored-by: Sahra <107348755+sahra-karakoc@users.noreply.github.com> --- website/src/pages/en/resources/claud-mcp.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/en/resources/claud-mcp.mdx b/website/src/pages/en/resources/claud-mcp.mdx index 916abda709cb..7cdf42dba24d 100644 --- a/website/src/pages/en/resources/claud-mcp.mdx +++ b/website/src/pages/en/resources/claud-mcp.mdx @@ -9,7 +9,7 @@ This guide walks you through configuring Claude Desktop to use The Graph ecosyst With these integrations, you can: - **Token API**: Access token and wallet information across multiple blockchains -- **Subgraph**: Explore Subgraph schemas, execute GraphQL queries, and find relevant Subgraphs for specific contracts +- **Subgraph**: Find relevant Subgraphs for specific keywords and contracts, explore Subgraph schemas, and execute GraphQL queries ## Prerequisites From babe814d993659b8c33c4220a49ee6a2853dbd3a Mon Sep 17 00:00:00 2001 From: Michael Macaulay <56690114+MichaelMacaulay@users.noreply.github.com> Date: Wed, 14 May 2025 09:15:56 -0400 Subject: [PATCH 15/34] Update website/src/pages/en/resources/claud-mcp.mdx Co-authored-by: Sahra <107348755+sahra-karakoc@users.noreply.github.com> --- website/src/pages/en/resources/claud-mcp.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/en/resources/claud-mcp.mdx b/website/src/pages/en/resources/claud-mcp.mdx index 7cdf42dba24d..eb696b824e65 100644 --- a/website/src/pages/en/resources/claud-mcp.mdx +++ b/website/src/pages/en/resources/claud-mcp.mdx @@ -91,7 +91,7 @@ What are the top pools in Uniswap? ``` ``` -Top delegators of The Graph Protocol? +Who are the top delegators of The Graph Protocol? ``` ``` From f1726e7e90d471eb4ea2804887580334bd92273a Mon Sep 17 00:00:00 2001 From: Michael Macaulay <56690114+MichaelMacaulay@users.noreply.github.com> Date: Wed, 14 May 2025 09:16:09 -0400 Subject: [PATCH 16/34] Update website/src/pages/en/resources/claud-mcp.mdx Co-authored-by: Sahra <107348755+sahra-karakoc@users.noreply.github.com> --- website/src/pages/en/resources/claud-mcp.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/en/resources/claud-mcp.mdx b/website/src/pages/en/resources/claud-mcp.mdx index eb696b824e65..ea79974fc64c 100644 --- a/website/src/pages/en/resources/claud-mcp.mdx +++ b/website/src/pages/en/resources/claud-mcp.mdx @@ -95,7 +95,7 @@ Who are the top delegators of The Graph Protocol? ``` ``` -Number of active loans in Compound for the last 7 days? Please make it a bar chart +Please make a bar chart for the number of active loans in Compound for the last 7 days ``` ### Token API Queries From c371fb667fd570e3071ce6b30a1d58d6c8afeaf4 Mon Sep 17 00:00:00 2001 From: Michael Macaulay <56690114+MichaelMacaulay@users.noreply.github.com> Date: Wed, 14 May 2025 09:16:23 -0400 Subject: [PATCH 17/34] Update website/src/pages/en/subgraphs/mcp/claude.mdx Co-authored-by: Sahra <107348755+sahra-karakoc@users.noreply.github.com> --- website/src/pages/en/subgraphs/mcp/claude.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/en/subgraphs/mcp/claude.mdx b/website/src/pages/en/subgraphs/mcp/claude.mdx index e45a1b7b0974..68c2fa4fe046 100644 --- a/website/src/pages/en/subgraphs/mcp/claude.mdx +++ b/website/src/pages/en/subgraphs/mcp/claude.mdx @@ -2,7 +2,7 @@ title: Claude Desktop --- -The Subgraph Model Context Protocol (MCP) server enables Claude 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 Claude. +The Subgraph Model Context Protocol (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 From 0250363c8bef5001c4a94655b4b9ea4ec51a2283 Mon Sep 17 00:00:00 2001 From: Michael Macaulay <56690114+MichaelMacaulay@users.noreply.github.com> Date: Wed, 14 May 2025 09:16:34 -0400 Subject: [PATCH 18/34] Update website/src/pages/en/subgraphs/mcp/claude.mdx Co-authored-by: Sahra <107348755+sahra-karakoc@users.noreply.github.com> --- website/src/pages/en/subgraphs/mcp/claude.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/website/src/pages/en/subgraphs/mcp/claude.mdx b/website/src/pages/en/subgraphs/mcp/claude.mdx index 68c2fa4fe046..164cb6a6ec37 100644 --- a/website/src/pages/en/subgraphs/mcp/claude.mdx +++ b/website/src/pages/en/subgraphs/mcp/claude.mdx @@ -10,6 +10,7 @@ With the Subgraph MCP integration, you can: - 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 - Find top Subgraph deployments for a contract address on a specific chain - Ask natural language questions about Subgraph data without writing GraphQL queries manually From 4e9ccc8f355f19781551c6a7c6c5a28ca87810df Mon Sep 17 00:00:00 2001 From: Michael Macaulay <56690114+MichaelMacaulay@users.noreply.github.com> Date: Wed, 14 May 2025 09:16:49 -0400 Subject: [PATCH 19/34] Update website/src/pages/en/subgraphs/mcp/claude.mdx Co-authored-by: Sahra <107348755+sahra-karakoc@users.noreply.github.com> --- website/src/pages/en/subgraphs/mcp/claude.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/src/pages/en/subgraphs/mcp/claude.mdx b/website/src/pages/en/subgraphs/mcp/claude.mdx index 164cb6a6ec37..7374dd629c5f 100644 --- a/website/src/pages/en/subgraphs/mcp/claude.mdx +++ b/website/src/pages/en/subgraphs/mcp/claude.mdx @@ -84,7 +84,8 @@ The Subgraph MCP provides several tools for interacting with Subgraphs: ### Discovery Tools -- **Get top Subgraph deployments**: Find the top 3 Subgraph deployments indexing a specific contract on a particular chain +- **Get top Subgraph deployments for a given keyword**: Find the top Subgraph deployments by query volume for a given keyword +- **Get top Subgraph deployments for a contract**: Find the top 3 Subgraph deployments indexing a specific contract on a particular chain ## Natural Language Queries From 77ef47fad2fa9174d09b74eaad6e6caa1f38f266 Mon Sep 17 00:00:00 2001 From: Michael Macaulay Date: Wed, 14 May 2025 10:15:45 -0400 Subject: [PATCH 20/34] Edits --- website/src/pages/en/resources/claud-mcp.mdx | 7 +++---- website/src/pages/en/subgraphs/mcp/claude.mdx | 12 ++++++++++-- website/src/pages/en/subgraphs/mcp/cline.mdx | 8 +++++++- website/src/pages/en/subgraphs/mcp/cursor.mdx | 19 ++++++++----------- 4 files changed, 28 insertions(+), 18 deletions(-) diff --git a/website/src/pages/en/resources/claud-mcp.mdx b/website/src/pages/en/resources/claud-mcp.mdx index ea79974fc64c..845d5ffd2571 100644 --- a/website/src/pages/en/resources/claud-mcp.mdx +++ b/website/src/pages/en/resources/claud-mcp.mdx @@ -21,7 +21,6 @@ With these integrations, you can: ## Configuration Steps - ### 1. Open Configuration File Navigate to your `claude_desktop_config.json` file: @@ -61,12 +60,12 @@ Replace the existing configuration with this template: } ``` -### Step 3: Add Your API Keys +### 3. Add Your API Keys 1. Replace `ACCESS_TOKEN` with your Token API key from [The Graph Market](https://thegraph.market/) 2. Replace `GATEWAY_API_KEY` with your Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) -### Step 4: Save and Restart +### 4. Save and Restart Save the configuration file and restart Claude Desktop. @@ -76,7 +75,7 @@ After configuration: 1. Start a new conversation in Claude Desktop 2. Click on the context menu (top right) -3. Add "The Graph" resource by entering `graphql://subgraph` for Subgraph MCP and/or `token-api://token-api` for Token API +3. Add "The Graph" 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. diff --git a/website/src/pages/en/subgraphs/mcp/claude.mdx b/website/src/pages/en/subgraphs/mcp/claude.mdx index 7374dd629c5f..2965757ae535 100644 --- a/website/src/pages/en/subgraphs/mcp/claude.mdx +++ b/website/src/pages/en/subgraphs/mcp/claude.mdx @@ -20,9 +20,11 @@ With the Subgraph MCP integration, you can: - [Claude Desktop](https://claude.ai/download) installed - A Gateway API key from [Subgraph Studio](https://thegraph.com/studio/) -## Configuration +## Configuration Steps -Edit your `claude_desktop_config.json` file. +### 1. Open Configuration File + +Navigate to your `claude_desktop_config.json` file: > **Settings** > **Developer** > **Edit Config** @@ -30,6 +32,8 @@ Edit your `claude_desktop_config.json` file. - Windows: `%APPDATA%\Claude\claude_desktop_config.json` - Linux: `.config/Claude/claude_desktop_config.json` +### 2. Add Configuration + Paste the following settings into your config file: ```json label="claude_desktop_config.json" @@ -48,8 +52,12 @@ Paste the following settings into your config file: } ``` +### 3. Add Your Gateway API Key + Replace `GATEWAY_API_KEY` with your API key from [Subgraph Studio](https://thegraph.com/studio/). +### 4. Save and Restart + Once you've entered your Gateway API key into your settings, you can save the file, and restart Claude desktop. ## Using The Graph Resource in Claude diff --git a/website/src/pages/en/subgraphs/mcp/cline.mdx b/website/src/pages/en/subgraphs/mcp/cline.mdx index cc0a46eb432f..a8ae715b126f 100644 --- a/website/src/pages/en/subgraphs/mcp/cline.mdx +++ b/website/src/pages/en/subgraphs/mcp/cline.mdx @@ -10,12 +10,16 @@ The Subgraph Model Context Protocol (MCP) server enables Cline to interact direc - A Gateway API key from [Subgraph Studio](https://thegraph.com/studio/) - [`npx`](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) or [`bunx`](https://bun.sh/) installed and available in your path -## Configuration +## Configuration Steps + +### 1. Open Configuration File Create or edit your `cline_mcp_settings.json` file. > **MCP Servers** > **Installed** > **Configure MCP Servers** +### 2. Add Configuration + ```json label="cline_mcp_settings.json" { "mcpServers": { @@ -32,6 +36,8 @@ Create or edit your `cline_mcp_settings.json` file. } ``` +### 3. Add Your API Key + Replace `GATEWAY_API_KEY` with your API key from Subgraph Studio. ## Using Both Token API MCP and Subgraph MCP Together diff --git a/website/src/pages/en/subgraphs/mcp/cursor.mdx b/website/src/pages/en/subgraphs/mcp/cursor.mdx index e961a943a786..60135f3acaec 100644 --- a/website/src/pages/en/subgraphs/mcp/cursor.mdx +++ b/website/src/pages/en/subgraphs/mcp/cursor.mdx @@ -10,12 +10,16 @@ The Subgraph Model Context Protocol (MCP) server enables Cursor to interact dire - A Gateway API key from [Subgraph Studio](https://thegraph.com/studio/) - [`npx`](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) or [`bunx`](https://bun.sh/) installed and available in your path -## Configuration +## Configuration Steps + +### 1. Open Configuration File Create or edit your `~/.cursor/mcp.json` file. > **Cursor Settings** > **MCP** > **Add new global MCP Server** +### 2. Add Configuration + ```json label="mcp.json" { "mcpServers": { @@ -32,6 +36,8 @@ Create or edit your `~/.cursor/mcp.json` file. } ``` +### 3. Add Your API Key + Replace `GATEWAY_API_KEY` with your API key from Subgraph Studio. ## Using Both Token API MCP and Subgraph MCP Together @@ -43,7 +49,7 @@ You can configure Cursor to use both the Token API MCP and Subgraph MCP simultan "mcpServers": { "token-api": { "command": "npx", - "args": ["@pinax/mcp", "--sse-url", "https://token-api.thegraph.com/sse"], + "args": ["@pinax/mcp", "--sse-url", "https://token-api.mcp.thegraph.com/sse"], "env": { "ACCESS_TOKEN": "ACCESS_TOKEN" } @@ -64,15 +70,6 @@ You can configure Cursor to use both the Token API MCP and Subgraph MCP simultan - For Token API access tokens, visit [The Graph Market](https://thegraph.com/explorer) - For Subgraph Gateway API keys, visit [Subgraph Studio](https://thegraph.com/studio/) -## Using The Graph Resource in Cursor - -After configuring Cursor: - -1. Restart Cursor -2. Start a new conversation -3. Enable the Subgraph MCP from the MCP settings menu -4. Add "The Graph" resource to your chat context - ## Available Subgraph Tools and Usage The Subgraph MCP provides several tools for interacting with Subgraphs: From 9dfb8f322c0125c73b430220dcf0cc3a3d61b656 Mon Sep 17 00:00:00 2001 From: Michael Macaulay Date: Wed, 14 May 2025 11:30:02 -0400 Subject: [PATCH 21/34] Latest updates New readme & new endpoint URL --- website/src/pages/en/resources/claud-mcp.mdx | 15 +-- website/src/pages/en/subgraphs/mcp/claude.mdx | 102 ++++++++++++++---- website/src/pages/en/subgraphs/mcp/cline.mdx | 42 +------- website/src/pages/en/subgraphs/mcp/cursor.mdx | 42 +------- 4 files changed, 94 insertions(+), 107 deletions(-) diff --git a/website/src/pages/en/resources/claud-mcp.mdx b/website/src/pages/en/resources/claud-mcp.mdx index 845d5ffd2571..788f51fa5c34 100644 --- a/website/src/pages/en/resources/claud-mcp.mdx +++ b/website/src/pages/en/resources/claud-mcp.mdx @@ -40,21 +40,12 @@ Replace the existing configuration with this template: ```json { "mcpServers": { - "token-api": { + "subgraph": { "command": "npx", - "args": ["@pinax/mcp", "--sse-url", "https://token-api.thegraph.com/sse"], + "args": ["mcp-remote", "--header", "Authorization:${AUTH_HEADER}", "https://subgraphs.mcp.thegraph.com/sse"], "env": { - "ACCESS_TOKEN": "ACCESS_TOKEN" + "AUTH_HEADER": "Bearer GATEWAY_API_KEY" } - }, - "subgraph": { - "command": "npx", - "args": [ - "mcp-remote", - "--header", - "Authorization: Bearer GATEWAY_API_KEY", - "https://subgraph-ai.graphops.xyz/sse" - ] } } } diff --git a/website/src/pages/en/subgraphs/mcp/claude.mdx b/website/src/pages/en/subgraphs/mcp/claude.mdx index 2965757ae535..dcfeab712ea6 100644 --- a/website/src/pages/en/subgraphs/mcp/claude.mdx +++ b/website/src/pages/en/subgraphs/mcp/claude.mdx @@ -6,23 +6,27 @@ The Subgraph Model Context Protocol (MCP) server enables Claude to interact dire ## What You Can Do -With the Subgraph MCP integration, you can: +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 -- Find top Subgraph deployments for a contract address on a specific chain +- 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 ## Prerequisites - [Node.js](https://nodejs.org/en) installed and available in your path -- [Claude Desktop](https://claude.ai/download) installed +- [Claude Desktop](https://claude.ai/download) installed (latest version) - A Gateway API key from [Subgraph Studio](https://thegraph.com/studio/) -## Configuration Steps +## Installation Options -### 1. Open Configuration File +### Option 1: Using npx (Recommended) + +#### Configuration Steps using npx + +#### 1. Open Configuration File Navigate to your `claude_desktop_config.json` file: @@ -32,33 +36,78 @@ Navigate to your `claude_desktop_config.json` file: - Windows: `%APPDATA%\Claude\claude_desktop_config.json` - Linux: `.config/Claude/claude_desktop_config.json` -### 2. Add Configuration +#### 2. Add Configuration Paste the following settings into your config file: -```json label="claude_desktop_config.json" +```json { "mcpServers": { "subgraph": { "command": "npx", - "args": [ - "mcp-remote", - "--header", - "Authorization: Bearer GATEWAY_API_KEY", - "https://subgraph-ai.graphops.xyz/sse" - ] + "args": ["mcp-remote", "--header", "Authorization:${AUTH_HEADER}", "https://subgraphs.mcp.thegraph.com/sse"], + "env": { + "AUTH_HEADER": "Bearer GATEWAY_API_KEY" + } } } } ``` -### 3. Add Your Gateway API Key +#### 3. Add Your Gateway API Key Replace `GATEWAY_API_KEY` with your API key from [Subgraph Studio](https://thegraph.com/studio/). -### 4. Save and Restart +#### 4. Save and Restart + +Once you've entered your Gateway API key into your settings, save the file and restart Claude Desktop. + +### Option 2: Building from Source + +#### Requirements + +- Rust (latest stable version recommended: 1.75+) + ```bash + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh + ``` + Follow the on-screen instructions. For other platforms, see the [official Rust installation guide](https://www.rust-lang.org/tools/install). + +#### Installation Steps + +1. **Clone and Build the Repository** + + ```bash + git clone git@github.com:graphops/subgraph-mcp.git + cd subgraph-mcp + cargo build --release + ``` + +2. **Find the Command Path** -Once you've entered your Gateway API key into your settings, you can save the file, and restart Claude desktop. + After building, the executable will be located at `target/release/subgraph-mcp` inside your project directory. + + - Navigate to your `subgraph-mcp` directory in terminal + - Run `pwd` to get the full path + - Combine the output with `/target/release/subgraph-mcp` + +3. **Configure Claude Desktop** + + Open your `claude_desktop_config.json` file as described above and add: + + ```json + { + "mcpServers": { + "subgraph": { + "command": "/path/to/your/subgraph-mcp/target/release/subgraph-mcp", + "env": { + "GATEWAY_API_KEY": "your-api-key-here" + } + } + } + } + ``` + + Replace `/path/to/your/subgraph-mcp/target/release/subgraph-mcp` with the actual path to the compiled binary. ## Using The Graph Resource in Claude @@ -73,7 +122,7 @@ After configuring Claude Desktop: ## Troubleshooting -To enable logs for the MCP, add the `--verbose true` option to your args array. +To enable logs for the MCP when using the npx option, add the `--verbose true` option to your args array. ## Available Subgraph Tools and Usage @@ -87,13 +136,20 @@ The Subgraph MCP provides several tools for interacting with Subgraphs: ### Query Execution Tools -- **Execute query by deployment ID**: Run GraphQL queries against specific, immutable deployments +- **Execute query by deployment ID/IPFS hash**: Run GraphQL queries against specific, immutable deployments - **Execute query by Subgraph ID**: Run GraphQL queries against the latest version of a Subgraph ### Discovery Tools -- **Get top Subgraph deployments for a given keyword**: Find the top Subgraph deployments by query volume for a given keyword -- **Get top Subgraph deployments for a contract**: Find the top 3 Subgraph deployments indexing a specific contract on a particular chain +- **Search subgraphs by keyword**: Find subgraphs by keyword in their display names, ordered by signal +- **Get deployment 30-day query counts**: Get aggregate query count over the last 30 days for multiple subgraph deployments +- **Get top Subgraph deployments for a contract**: Find the top 3 Subgraph deployments indexing a specific contract on a particular chain, ordered by query fees + +## Key Identifier Types + +- **Subgraph ID** (e.g., `5zvR82...`): Logical identifier for a subgraph. Use `execute_query_by_subgraph_id` or `get_schema_by_subgraph_id`. +- **Deployment ID** (e.g., `0x4d7c...`): Identifier for a specific, immutable deployment. Use `execute_query_by_deployment_id` or `get_schema_by_deployment_id`. +- **IPFS Hash** (e.g., `QmTZ8e...`): Identifier for the manifest of a specific, immutable deployment. Use `execute_query_by_deployment_id` (the gateway treats it like a deployment ID for querying) or `get_schema_by_ipfs_hash`. ## Natural Language Queries @@ -118,3 +174,7 @@ Which tokens have the highest market cap in this Subgraph? ``` Show me the most recent 5 swaps for the USDC/ETH pair ``` + +``` +Find the top subgraphs for contract 0x1f98431c8ad98523631ae4a59f267346ea31f984 on arbitrum-one +``` diff --git a/website/src/pages/en/subgraphs/mcp/cline.mdx b/website/src/pages/en/subgraphs/mcp/cline.mdx index a8ae715b126f..7b886647e803 100644 --- a/website/src/pages/en/subgraphs/mcp/cline.mdx +++ b/website/src/pages/en/subgraphs/mcp/cline.mdx @@ -20,17 +20,15 @@ Create or edit your `cline_mcp_settings.json` file. ### 2. Add Configuration -```json label="cline_mcp_settings.json" +```json { "mcpServers": { "subgraph": { "command": "npx", - "args": [ - "mcp-remote", - "--header", - "Authorization: Bearer GATEWAY_API_KEY", - "https://subgraph-ai.graphops.xyz/sse" - ] + "args": ["mcp-remote", "--header", "Authorization:${AUTH_HEADER}", "https://subgraphs.mcp.thegraph.com/sse"], + "env": { + "AUTH_HEADER": "Bearer GATEWAY_API_KEY" + } } } } @@ -40,36 +38,6 @@ Create or edit your `cline_mcp_settings.json` file. Replace `GATEWAY_API_KEY` with your API key from Subgraph Studio. -## Using Both Token API MCP and Subgraph MCP Together - -You can configure Cline to use both the Token API MCP and Subgraph MCP simultaneously: - -```json label="cline_mcp_settings.json" -{ - "mcpServers": { - "token-api": { - "command": "npx", - "args": ["@pinax/mcp", "--sse-url", "https://token-api.thegraph.com/sse"], - "env": { - "ACCESS_TOKEN": "ACCESS_TOKEN" - } - }, - "subgraph": { - "command": "npx", - "args": [ - "mcp-remote", - "--header", - "Authorization: Bearer GATEWAY_API_KEY", - "https://subgraph-ai.graphops.xyz/sse" - ] - } - } -} -``` - -- For Token API access tokens, visit [The Graph Market](https://thegraph.com/explorer) -- For Subgraph Gateway API keys, visit [Subgraph Studio](https://thegraph.com/studio/) - ## Using The Graph Resource in Cline After configuring Cline: diff --git a/website/src/pages/en/subgraphs/mcp/cursor.mdx b/website/src/pages/en/subgraphs/mcp/cursor.mdx index 60135f3acaec..e276412355f0 100644 --- a/website/src/pages/en/subgraphs/mcp/cursor.mdx +++ b/website/src/pages/en/subgraphs/mcp/cursor.mdx @@ -20,17 +20,15 @@ Create or edit your `~/.cursor/mcp.json` file. ### 2. Add Configuration -```json label="mcp.json" +```json { "mcpServers": { "subgraph": { "command": "npx", - "args": [ - "mcp-remote", - "--header", - "Authorization: Bearer GATEWAY_API_KEY", - "https://subgraph-ai.graphops.xyz/sse" - ] + "args": ["mcp-remote", "--header", "Authorization:${AUTH_HEADER}", "https://subgraphs.mcp.thegraph.com/sse"], + "env": { + "AUTH_HEADER": "Bearer GATEWAY_API_KEY" + } } } } @@ -40,36 +38,6 @@ Create or edit your `~/.cursor/mcp.json` file. Replace `GATEWAY_API_KEY` with your API key from Subgraph Studio. -## Using Both Token API MCP and Subgraph MCP Together - -You can configure Cursor to use both the Token API MCP and Subgraph MCP simultaneously: - -```json label="mcp.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: Bearer GATEWAY_API_KEY", - "https://subgraph-ai.graphops.xyz/sse" - ] - } - } -} -``` - -- For Token API access tokens, visit [The Graph Market](https://thegraph.com/explorer) -- For Subgraph Gateway API keys, visit [Subgraph Studio](https://thegraph.com/studio/) - ## Available Subgraph Tools and Usage The Subgraph MCP provides several tools for interacting with Subgraphs: From 43d9dc56cb2d20c849d60473c95f676eab0dbb1f Mon Sep 17 00:00:00 2001 From: Michael Macaulay Date: Wed, 14 May 2025 11:46:04 -0400 Subject: [PATCH 22/34] Final tweak --- website/src/pages/en/subgraphs/mcp/cursor.mdx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/website/src/pages/en/subgraphs/mcp/cursor.mdx b/website/src/pages/en/subgraphs/mcp/cursor.mdx index e276412355f0..e1fcb4e5d6a7 100644 --- a/website/src/pages/en/subgraphs/mcp/cursor.mdx +++ b/website/src/pages/en/subgraphs/mcp/cursor.mdx @@ -38,6 +38,10 @@ Create or edit your `~/.cursor/mcp.json` file. Replace `GATEWAY_API_KEY` with your API key from Subgraph Studio. +### 4. Restart Cursor + +Restart Cursor, and start a new chat. + ## Available Subgraph Tools and Usage The Subgraph MCP provides several tools for interacting with Subgraphs: From 64c454c4f7d7c91fe5d9558bbae14f7ae9756ba2 Mon Sep 17 00:00:00 2001 From: Michael Macaulay <56690114+MichaelMacaulay@users.noreply.github.com> Date: Wed, 14 May 2025 14:18:57 -0400 Subject: [PATCH 23/34] Update website/src/pages/en/resources/claud-mcp.mdx Co-authored-by: Idalith <126833353+idalithb@users.noreply.github.com> --- website/src/pages/en/resources/claud-mcp.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/en/resources/claud-mcp.mdx b/website/src/pages/en/resources/claud-mcp.mdx index 788f51fa5c34..47bb8713d354 100644 --- a/website/src/pages/en/resources/claud-mcp.mdx +++ b/website/src/pages/en/resources/claud-mcp.mdx @@ -35,7 +35,7 @@ Paths by operating system: ### 2. Add Configuration -Replace the existing configuration with this template: +Replace the contents of the existing config file with: ```json { From b460b6ed6cfb2f07e32026ceaaa986be53912ac3 Mon Sep 17 00:00:00 2001 From: Michael Macaulay <56690114+MichaelMacaulay@users.noreply.github.com> Date: Wed, 14 May 2025 14:20:00 -0400 Subject: [PATCH 24/34] Update website/src/pages/en/resources/claud-mcp.mdx Co-authored-by: Idalith <126833353+idalithb@users.noreply.github.com> --- website/src/pages/en/resources/claud-mcp.mdx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/website/src/pages/en/resources/claud-mcp.mdx b/website/src/pages/en/resources/claud-mcp.mdx index 47bb8713d354..cdb976744441 100644 --- a/website/src/pages/en/resources/claud-mcp.mdx +++ b/website/src/pages/en/resources/claud-mcp.mdx @@ -53,8 +53,9 @@ Replace the contents of the existing config file with: ### 3. Add Your API Keys -1. Replace `ACCESS_TOKEN` with your Token API key from [The Graph Market](https://thegraph.market/) -2. Replace `GATEWAY_API_KEY` with your Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) +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 From 67967352d47ff72f7eb174643153a20f84c380d9 Mon Sep 17 00:00:00 2001 From: Michael Macaulay <56690114+MichaelMacaulay@users.noreply.github.com> Date: Wed, 14 May 2025 14:20:20 -0400 Subject: [PATCH 25/34] Update website/src/pages/en/resources/claud-mcp.mdx Co-authored-by: Idalith <126833353+idalithb@users.noreply.github.com> --- website/src/pages/en/resources/claud-mcp.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/src/pages/en/resources/claud-mcp.mdx b/website/src/pages/en/resources/claud-mcp.mdx index cdb976744441..34f26cb3564a 100644 --- a/website/src/pages/en/resources/claud-mcp.mdx +++ b/website/src/pages/en/resources/claud-mcp.mdx @@ -59,7 +59,8 @@ Replace: ### 4. Save and Restart -Save the configuration file and restart Claude Desktop. +- Save the configuration file +- Restart Claude Desktop ## Using The Graph Resources in Claude From cc380a4f9140a199f3df62987dacc33bedf17c1e Mon Sep 17 00:00:00 2001 From: Michael Macaulay <56690114+MichaelMacaulay@users.noreply.github.com> Date: Wed, 14 May 2025 14:21:54 -0400 Subject: [PATCH 26/34] Update website/src/pages/en/resources/claud-mcp.mdx Co-authored-by: Idalith <126833353+idalithb@users.noreply.github.com> --- website/src/pages/en/resources/claud-mcp.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/en/resources/claud-mcp.mdx b/website/src/pages/en/resources/claud-mcp.mdx index 34f26cb3564a..03b70d388067 100644 --- a/website/src/pages/en/resources/claud-mcp.mdx +++ b/website/src/pages/en/resources/claud-mcp.mdx @@ -70,7 +70,7 @@ After configuration: 2. Click on the context menu (top right) 3. Add "The Graph" 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. +> **Important**: You must manually add The Graph resources to your chat context for each conversation where you want to use them. ## Example Queries From f2e1bb77af596ef300bf629e58d3d594344345e3 Mon Sep 17 00:00:00 2001 From: Michael Macaulay <56690114+MichaelMacaulay@users.noreply.github.com> Date: Wed, 14 May 2025 14:23:19 -0400 Subject: [PATCH 27/34] Update website/src/pages/en/subgraphs/mcp/claude.mdx Co-authored-by: Idalith <126833353+idalithb@users.noreply.github.com> --- website/src/pages/en/subgraphs/mcp/claude.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/en/subgraphs/mcp/claude.mdx b/website/src/pages/en/subgraphs/mcp/claude.mdx index dcfeab712ea6..34ab048ac452 100644 --- a/website/src/pages/en/subgraphs/mcp/claude.mdx +++ b/website/src/pages/en/subgraphs/mcp/claude.mdx @@ -118,7 +118,7 @@ After configuring Claude Desktop: 3. Click on the context menu (top right) 4. Add "The Graph" resource by adding `graphql://subgraph` to your chat context -**Important**: Claude Desktop may not automatically utilize the Subgraph MCP. You must manually add "The Graph" resource to your chat context for each conversation where you want to use it. +> **Important**: Claude Desktop may not automatically utilize the Subgraph MCP. You must manually add "The Graph" resource to your chat context for each conversation where you want to use it. ## Troubleshooting From ed669c4a815b067c39e75a8bee4ffd7c5c51f98f Mon Sep 17 00:00:00 2001 From: Michael Macaulay <56690114+MichaelMacaulay@users.noreply.github.com> Date: Wed, 14 May 2025 14:23:53 -0400 Subject: [PATCH 28/34] Update website/src/pages/en/subgraphs/mcp/claude.mdx Co-authored-by: Idalith <126833353+idalithb@users.noreply.github.com> --- website/src/pages/en/subgraphs/mcp/claude.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/en/subgraphs/mcp/claude.mdx b/website/src/pages/en/subgraphs/mcp/claude.mdx index 34ab048ac452..eeffcba0cc51 100644 --- a/website/src/pages/en/subgraphs/mcp/claude.mdx +++ b/website/src/pages/en/subgraphs/mcp/claude.mdx @@ -151,7 +151,7 @@ The Subgraph MCP provides several tools for interacting with Subgraphs: - **Deployment ID** (e.g., `0x4d7c...`): Identifier for a specific, immutable deployment. Use `execute_query_by_deployment_id` or `get_schema_by_deployment_id`. - **IPFS Hash** (e.g., `QmTZ8e...`): Identifier for the manifest of a specific, immutable deployment. Use `execute_query_by_deployment_id` (the gateway treats it like a deployment ID for querying) or `get_schema_by_ipfs_hash`. -## Natural Language Queries +## Benefits of Natural Language Queries One of the most powerful features of the Subgraph MCP integration is the ability to ask questions in natural language. Claude will: From 2c3a32ddf409471fefc312130ce277384fee8a72 Mon Sep 17 00:00:00 2001 From: Michael Macaulay Date: Wed, 14 May 2025 14:25:47 -0400 Subject: [PATCH 29/34] Edits --- website/src/pages/en/resources/claud-mcp.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/src/pages/en/resources/claud-mcp.mdx b/website/src/pages/en/resources/claud-mcp.mdx index 47bb8713d354..911cc8697a14 100644 --- a/website/src/pages/en/resources/claud-mcp.mdx +++ b/website/src/pages/en/resources/claud-mcp.mdx @@ -60,7 +60,7 @@ Replace the contents of the existing config file with: Save the configuration file and restart Claude Desktop. -## Using The Graph Resources in Claude +### 5. Add The Graph Resources in Claude After configuration: @@ -70,7 +70,7 @@ After configuration: **Important**: You must manually add The Graph resources to your chat context for each conversation where you want to use them. -## Example Queries +### 6. Run Queries Here are some example queries you can try after setting up the resources: @@ -81,7 +81,7 @@ What are the top pools in Uniswap? ``` ``` -Who are the top delegators of The Graph Protocol? +Who are the top Delegators of The Graph Protocol? ``` ``` From 4aa4bd460a9c3335fc40e0785c2901c6165edd77 Mon Sep 17 00:00:00 2001 From: Michael Macaulay Date: Wed, 14 May 2025 14:31:01 -0400 Subject: [PATCH 30/34] Edits --- website/src/pages/en/resources/_meta.js | 2 +- .../src/pages/en/resources/{claud-mcp.mdx => claude-mcp.mdx} | 4 ++-- website/src/pages/en/subgraphs/mcp/claude.mdx | 4 ++-- website/src/pages/en/subgraphs/mcp/cline.mdx | 4 ++-- website/src/pages/en/subgraphs/mcp/cursor.mdx | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) rename website/src/pages/en/resources/{claud-mcp.mdx => claude-mcp.mdx} (90%) diff --git a/website/src/pages/en/resources/_meta.js b/website/src/pages/en/resources/_meta.js index 04b75af0eb85..30aeee766264 100644 --- a/website/src/pages/en/resources/_meta.js +++ b/website/src/pages/en/resources/_meta.js @@ -7,5 +7,5 @@ export default { roles: titles.roles, 'migration-guides': titles['migration-guides'], 'subgraph-studio-faq': '', - 'claud-mcp': '', + 'claude-mcp': '', } diff --git a/website/src/pages/en/resources/claud-mcp.mdx b/website/src/pages/en/resources/claude-mcp.mdx similarity index 90% rename from website/src/pages/en/resources/claud-mcp.mdx rename to website/src/pages/en/resources/claude-mcp.mdx index 0ebdb8874ae4..36c8eaf6fd27 100644 --- a/website/src/pages/en/resources/claud-mcp.mdx +++ b/website/src/pages/en/resources/claude-mcp.mdx @@ -2,7 +2,7 @@ title: Claude MCP --- -This guide walks you through configuring Claude Desktop to use The Graph ecosystem's Model Context Protocol (MCP) resources: Token API and Subgraph. These integrations allow you to interact with blockchain data through natural language conversations with Claude. +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 @@ -68,7 +68,7 @@ After configuration: 1. Start a new conversation in Claude Desktop 2. Click on the context menu (top right) -3. Add "The Graph" resource by entering `graphql://subgraph` for Subgraph MCP +3. Add "The Graph" 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. diff --git a/website/src/pages/en/subgraphs/mcp/claude.mdx b/website/src/pages/en/subgraphs/mcp/claude.mdx index eeffcba0cc51..cb023bed7bf0 100644 --- a/website/src/pages/en/subgraphs/mcp/claude.mdx +++ b/website/src/pages/en/subgraphs/mcp/claude.mdx @@ -2,7 +2,7 @@ title: Claude Desktop --- -The Subgraph Model Context Protocol (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. +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 @@ -116,7 +116,7 @@ After configuring Claude Desktop: 1. Restart Claude Desktop 2. Start a new conversation 3. Click on the context menu (top right) -4. Add "The Graph" resource by adding `graphql://subgraph` to your chat context +4. Add "The Graph" as a resource by adding `graphql://subgraph` to your chat context > **Important**: Claude Desktop may not automatically utilize the Subgraph MCP. You must manually add "The Graph" resource to your chat context for each conversation where you want to use it. diff --git a/website/src/pages/en/subgraphs/mcp/cline.mdx b/website/src/pages/en/subgraphs/mcp/cline.mdx index 7b886647e803..59c70e6dab9e 100644 --- a/website/src/pages/en/subgraphs/mcp/cline.mdx +++ b/website/src/pages/en/subgraphs/mcp/cline.mdx @@ -2,7 +2,7 @@ title: Cline --- -The Subgraph Model Context Protocol (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. +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. ## Prerequisites @@ -45,7 +45,7 @@ After configuring Cline: 1. Restart Cline 2. Start a new conversation 3. Enable the Subgraph MCP from the context menu -4. Add "The Graph" resource to your chat context +4. Add "The Graph" as a resource to your chat context ## Available Tools and Usage diff --git a/website/src/pages/en/subgraphs/mcp/cursor.mdx b/website/src/pages/en/subgraphs/mcp/cursor.mdx index e1fcb4e5d6a7..4254da6737cc 100644 --- a/website/src/pages/en/subgraphs/mcp/cursor.mdx +++ b/website/src/pages/en/subgraphs/mcp/cursor.mdx @@ -2,7 +2,7 @@ title: Cursor --- -The Subgraph Model Context Protocol (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. +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. ## Prerequisites From 83759e5041cc23f259465cceb2f1d401f88a6051 Mon Sep 17 00:00:00 2001 From: Michael Macaulay <56690114+MichaelMacaulay@users.noreply.github.com> Date: Wed, 14 May 2025 16:07:16 -0400 Subject: [PATCH 31/34] Update website/src/pages/en/subgraphs/mcp/cline.mdx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Benoît Rouleau --- website/src/pages/en/subgraphs/mcp/cline.mdx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/website/src/pages/en/subgraphs/mcp/cline.mdx b/website/src/pages/en/subgraphs/mcp/cline.mdx index 59c70e6dab9e..6714e445c0b2 100644 --- a/website/src/pages/en/subgraphs/mcp/cline.mdx +++ b/website/src/pages/en/subgraphs/mcp/cline.mdx @@ -80,9 +80,13 @@ One of the most powerful features of the Subgraph MCP integration is the ability ``` What are the pairs with maximum volume on deployment 0xde0a7b5368f846f7d863d9f64949b688ad9818243151d488b4c6b206145b9ea3? +``` +``` Which tokens have the highest market cap in this Subgraph? +``` +``` Show me the most recent 5 swaps for the USDC/ETH pair ``` From d81bb7f81ea713342adc8e903fa603543df3a268 Mon Sep 17 00:00:00 2001 From: Michael Macaulay <56690114+MichaelMacaulay@users.noreply.github.com> Date: Wed, 14 May 2025 16:07:25 -0400 Subject: [PATCH 32/34] Update website/src/pages/en/subgraphs/mcp/cursor.mdx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Benoît Rouleau --- website/src/pages/en/subgraphs/mcp/cursor.mdx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/website/src/pages/en/subgraphs/mcp/cursor.mdx b/website/src/pages/en/subgraphs/mcp/cursor.mdx index 4254da6737cc..298f43ece048 100644 --- a/website/src/pages/en/subgraphs/mcp/cursor.mdx +++ b/website/src/pages/en/subgraphs/mcp/cursor.mdx @@ -75,9 +75,13 @@ One of the most powerful features of the Subgraph MCP integration is the ability ``` What are the pairs with maximum volume on deployment 0xde0a7b5368f846f7d863d9f64949b688ad9818243151d488b4c6b206145b9ea3? +``` +``` Which tokens have the highest market cap in this Subgraph? +``` +``` Show me the most recent 5 swaps for the USDC/ETH pair ``` From 696f5b70363333703f2799eac508ec90e7857f4d Mon Sep 17 00:00:00 2001 From: Michael Macaulay Date: Wed, 14 May 2025 16:14:01 -0400 Subject: [PATCH 33/34] Check fix --- website/src/pages/en/resources/claude-mcp.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/src/pages/en/resources/claude-mcp.mdx b/website/src/pages/en/resources/claude-mcp.mdx index 36c8eaf6fd27..365d23e1e207 100644 --- a/website/src/pages/en/resources/claude-mcp.mdx +++ b/website/src/pages/en/resources/claude-mcp.mdx @@ -54,12 +54,13 @@ Replace the contents of the existing config file with: ### 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 +- Save the configuration file - Restart Claude Desktop ### 5. Add The Graph Resources in Claude From 252114106acab2f2387e8535f64c72049003aaf4 Mon Sep 17 00:00:00 2001 From: benface Date: Wed, 14 May 2025 17:59:59 -0400 Subject: [PATCH 34/34] Fix build --- website/route-lockfile.txt | 88 +++++++++++++++++++ website/src/pages/en/archived/_meta.js | 2 +- website/src/pages/en/indexing/_meta.js | 2 +- website/src/pages/en/resources/_meta.js | 4 +- website/src/pages/en/subgraphs/_meta.js | 10 +-- .../pages/en/subgraphs/developing/_meta.js | 8 +- .../en/subgraphs/developing/creating/_meta.js | 2 +- .../developing/creating/graph-ts/_meta.js | 6 +- .../src/pages/en/subgraphs/querying/_meta.js | 2 +- .../subgraphs/querying/graph-client/_meta.js | 2 +- website/src/pages/en/substreams/_meta.js | 4 +- .../pages/en/substreams/developing/_meta.js | 4 +- website/src/pages/en/token-api/_meta.js | 6 +- 13 files changed, 114 insertions(+), 26 deletions(-) diff --git a/website/route-lockfile.txt b/website/route-lockfile.txt index e18838a22130..8dcd9c5680d6 100644 --- a/website/route-lockfile.txt +++ b/website/route-lockfile.txt @@ -16,6 +16,7 @@ /ar/indexing/tooling/graph-node/ /ar/indexing/tooling/graphcast/ /ar/resources/benefits/ +/ar/resources/claude-mcp/ /ar/resources/glossary/ /ar/resources/migration-guides/assemblyscript-migration-guide/ /ar/resources/migration-guides/graphql-validations-migration-guide/ @@ -62,6 +63,9 @@ /ar/subgraphs/guides/subgraph-debug-forking/ /ar/subgraphs/guides/subgraph-uncrashable/ /ar/subgraphs/guides/transfer-to-the-graph/ +/ar/subgraphs/mcp/claude/ +/ar/subgraphs/mcp/cline/ +/ar/subgraphs/mcp/cursor/ /ar/subgraphs/querying/best-practices/ /ar/subgraphs/querying/distributed-systems/ /ar/subgraphs/querying/from-an-application/ @@ -264,6 +268,7 @@ /cs/indexing/tooling/graph-node/ /cs/indexing/tooling/graphcast/ /cs/resources/benefits/ +/cs/resources/claude-mcp/ /cs/resources/glossary/ /cs/resources/migration-guides/assemblyscript-migration-guide/ /cs/resources/migration-guides/graphql-validations-migration-guide/ @@ -310,6 +315,9 @@ /cs/subgraphs/guides/subgraph-debug-forking/ /cs/subgraphs/guides/subgraph-uncrashable/ /cs/subgraphs/guides/transfer-to-the-graph/ +/cs/subgraphs/mcp/claude/ +/cs/subgraphs/mcp/cline/ +/cs/subgraphs/mcp/cursor/ /cs/subgraphs/querying/best-practices/ /cs/subgraphs/querying/distributed-systems/ /cs/subgraphs/querying/from-an-application/ @@ -512,6 +520,7 @@ /de/indexing/tooling/graph-node/ /de/indexing/tooling/graphcast/ /de/resources/benefits/ +/de/resources/claude-mcp/ /de/resources/glossary/ /de/resources/migration-guides/assemblyscript-migration-guide/ /de/resources/migration-guides/graphql-validations-migration-guide/ @@ -558,6 +567,9 @@ /de/subgraphs/guides/subgraph-debug-forking/ /de/subgraphs/guides/subgraph-uncrashable/ /de/subgraphs/guides/transfer-to-the-graph/ +/de/subgraphs/mcp/claude/ +/de/subgraphs/mcp/cline/ +/de/subgraphs/mcp/cursor/ /de/subgraphs/querying/best-practices/ /de/subgraphs/querying/distributed-systems/ /de/subgraphs/querying/from-an-application/ @@ -760,6 +772,7 @@ /en/indexing/tooling/graph-node/ /en/indexing/tooling/graphcast/ /en/resources/benefits/ +/en/resources/claude-mcp/ /en/resources/glossary/ /en/resources/migration-guides/assemblyscript-migration-guide/ /en/resources/migration-guides/graphql-validations-migration-guide/ @@ -806,6 +819,9 @@ /en/subgraphs/guides/subgraph-debug-forking/ /en/subgraphs/guides/subgraph-uncrashable/ /en/subgraphs/guides/transfer-to-the-graph/ +/en/subgraphs/mcp/claude/ +/en/subgraphs/mcp/cline/ +/en/subgraphs/mcp/cursor/ /en/subgraphs/querying/best-practices/ /en/subgraphs/querying/distributed-systems/ /en/subgraphs/querying/from-an-application/ @@ -1008,6 +1024,7 @@ /es/indexing/tooling/graph-node/ /es/indexing/tooling/graphcast/ /es/resources/benefits/ +/es/resources/claude-mcp/ /es/resources/glossary/ /es/resources/migration-guides/assemblyscript-migration-guide/ /es/resources/migration-guides/graphql-validations-migration-guide/ @@ -1054,6 +1071,9 @@ /es/subgraphs/guides/subgraph-debug-forking/ /es/subgraphs/guides/subgraph-uncrashable/ /es/subgraphs/guides/transfer-to-the-graph/ +/es/subgraphs/mcp/claude/ +/es/subgraphs/mcp/cline/ +/es/subgraphs/mcp/cursor/ /es/subgraphs/querying/best-practices/ /es/subgraphs/querying/distributed-systems/ /es/subgraphs/querying/from-an-application/ @@ -1256,6 +1276,7 @@ /fr/indexing/tooling/graph-node/ /fr/indexing/tooling/graphcast/ /fr/resources/benefits/ +/fr/resources/claude-mcp/ /fr/resources/glossary/ /fr/resources/migration-guides/assemblyscript-migration-guide/ /fr/resources/migration-guides/graphql-validations-migration-guide/ @@ -1302,6 +1323,9 @@ /fr/subgraphs/guides/subgraph-debug-forking/ /fr/subgraphs/guides/subgraph-uncrashable/ /fr/subgraphs/guides/transfer-to-the-graph/ +/fr/subgraphs/mcp/claude/ +/fr/subgraphs/mcp/cline/ +/fr/subgraphs/mcp/cursor/ /fr/subgraphs/querying/best-practices/ /fr/subgraphs/querying/distributed-systems/ /fr/subgraphs/querying/from-an-application/ @@ -1504,6 +1528,7 @@ /hi/indexing/tooling/graph-node/ /hi/indexing/tooling/graphcast/ /hi/resources/benefits/ +/hi/resources/claude-mcp/ /hi/resources/glossary/ /hi/resources/migration-guides/assemblyscript-migration-guide/ /hi/resources/migration-guides/graphql-validations-migration-guide/ @@ -1550,6 +1575,9 @@ /hi/subgraphs/guides/subgraph-debug-forking/ /hi/subgraphs/guides/subgraph-uncrashable/ /hi/subgraphs/guides/transfer-to-the-graph/ +/hi/subgraphs/mcp/claude/ +/hi/subgraphs/mcp/cline/ +/hi/subgraphs/mcp/cursor/ /hi/subgraphs/querying/best-practices/ /hi/subgraphs/querying/distributed-systems/ /hi/subgraphs/querying/from-an-application/ @@ -1752,6 +1780,7 @@ /it/indexing/tooling/graph-node/ /it/indexing/tooling/graphcast/ /it/resources/benefits/ +/it/resources/claude-mcp/ /it/resources/glossary/ /it/resources/migration-guides/assemblyscript-migration-guide/ /it/resources/migration-guides/graphql-validations-migration-guide/ @@ -1798,6 +1827,9 @@ /it/subgraphs/guides/subgraph-debug-forking/ /it/subgraphs/guides/subgraph-uncrashable/ /it/subgraphs/guides/transfer-to-the-graph/ +/it/subgraphs/mcp/claude/ +/it/subgraphs/mcp/cline/ +/it/subgraphs/mcp/cursor/ /it/subgraphs/querying/best-practices/ /it/subgraphs/querying/distributed-systems/ /it/subgraphs/querying/from-an-application/ @@ -2000,6 +2032,7 @@ /ja/indexing/tooling/graph-node/ /ja/indexing/tooling/graphcast/ /ja/resources/benefits/ +/ja/resources/claude-mcp/ /ja/resources/glossary/ /ja/resources/migration-guides/assemblyscript-migration-guide/ /ja/resources/migration-guides/graphql-validations-migration-guide/ @@ -2046,6 +2079,9 @@ /ja/subgraphs/guides/subgraph-debug-forking/ /ja/subgraphs/guides/subgraph-uncrashable/ /ja/subgraphs/guides/transfer-to-the-graph/ +/ja/subgraphs/mcp/claude/ +/ja/subgraphs/mcp/cline/ +/ja/subgraphs/mcp/cursor/ /ja/subgraphs/querying/best-practices/ /ja/subgraphs/querying/distributed-systems/ /ja/subgraphs/querying/from-an-application/ @@ -2246,6 +2282,7 @@ /ko/indexing/tooling/graph-node/ /ko/indexing/tooling/graphcast/ /ko/resources/benefits/ +/ko/resources/claude-mcp/ /ko/resources/glossary/ /ko/resources/migration-guides/assemblyscript-migration-guide/ /ko/resources/migration-guides/graphql-validations-migration-guide/ @@ -2292,6 +2329,9 @@ /ko/subgraphs/guides/subgraph-debug-forking/ /ko/subgraphs/guides/subgraph-uncrashable/ /ko/subgraphs/guides/transfer-to-the-graph/ +/ko/subgraphs/mcp/claude/ +/ko/subgraphs/mcp/cline/ +/ko/subgraphs/mcp/cursor/ /ko/subgraphs/querying/best-practices/ /ko/subgraphs/querying/distributed-systems/ /ko/subgraphs/querying/from-an-application/ @@ -2350,6 +2390,7 @@ /mr/indexing/tooling/graph-node/ /mr/indexing/tooling/graphcast/ /mr/resources/benefits/ +/mr/resources/claude-mcp/ /mr/resources/glossary/ /mr/resources/migration-guides/assemblyscript-migration-guide/ /mr/resources/migration-guides/graphql-validations-migration-guide/ @@ -2396,6 +2437,9 @@ /mr/subgraphs/guides/subgraph-debug-forking/ /mr/subgraphs/guides/subgraph-uncrashable/ /mr/subgraphs/guides/transfer-to-the-graph/ +/mr/subgraphs/mcp/claude/ +/mr/subgraphs/mcp/cline/ +/mr/subgraphs/mcp/cursor/ /mr/subgraphs/querying/best-practices/ /mr/subgraphs/querying/distributed-systems/ /mr/subgraphs/querying/from-an-application/ @@ -2596,6 +2640,7 @@ /nl/indexing/tooling/graph-node/ /nl/indexing/tooling/graphcast/ /nl/resources/benefits/ +/nl/resources/claude-mcp/ /nl/resources/glossary/ /nl/resources/migration-guides/assemblyscript-migration-guide/ /nl/resources/migration-guides/graphql-validations-migration-guide/ @@ -2642,6 +2687,9 @@ /nl/subgraphs/guides/subgraph-debug-forking/ /nl/subgraphs/guides/subgraph-uncrashable/ /nl/subgraphs/guides/transfer-to-the-graph/ +/nl/subgraphs/mcp/claude/ +/nl/subgraphs/mcp/cline/ +/nl/subgraphs/mcp/cursor/ /nl/subgraphs/querying/best-practices/ /nl/subgraphs/querying/distributed-systems/ /nl/subgraphs/querying/from-an-application/ @@ -2698,6 +2746,7 @@ /pl/indexing/tooling/graph-node/ /pl/indexing/tooling/graphcast/ /pl/resources/benefits/ +/pl/resources/claude-mcp/ /pl/resources/glossary/ /pl/resources/migration-guides/assemblyscript-migration-guide/ /pl/resources/migration-guides/graphql-validations-migration-guide/ @@ -2744,6 +2793,9 @@ /pl/subgraphs/guides/subgraph-debug-forking/ /pl/subgraphs/guides/subgraph-uncrashable/ /pl/subgraphs/guides/transfer-to-the-graph/ +/pl/subgraphs/mcp/claude/ +/pl/subgraphs/mcp/cline/ +/pl/subgraphs/mcp/cursor/ /pl/subgraphs/querying/best-practices/ /pl/subgraphs/querying/distributed-systems/ /pl/subgraphs/querying/from-an-application/ @@ -2802,6 +2854,7 @@ /pt/indexing/tooling/graph-node/ /pt/indexing/tooling/graphcast/ /pt/resources/benefits/ +/pt/resources/claude-mcp/ /pt/resources/glossary/ /pt/resources/migration-guides/assemblyscript-migration-guide/ /pt/resources/migration-guides/graphql-validations-migration-guide/ @@ -2848,6 +2901,9 @@ /pt/subgraphs/guides/subgraph-debug-forking/ /pt/subgraphs/guides/subgraph-uncrashable/ /pt/subgraphs/guides/transfer-to-the-graph/ +/pt/subgraphs/mcp/claude/ +/pt/subgraphs/mcp/cline/ +/pt/subgraphs/mcp/cursor/ /pt/subgraphs/querying/best-practices/ /pt/subgraphs/querying/distributed-systems/ /pt/subgraphs/querying/from-an-application/ @@ -3048,6 +3104,7 @@ /ro/indexing/tooling/graph-node/ /ro/indexing/tooling/graphcast/ /ro/resources/benefits/ +/ro/resources/claude-mcp/ /ro/resources/glossary/ /ro/resources/migration-guides/assemblyscript-migration-guide/ /ro/resources/migration-guides/graphql-validations-migration-guide/ @@ -3094,6 +3151,9 @@ /ro/subgraphs/guides/subgraph-debug-forking/ /ro/subgraphs/guides/subgraph-uncrashable/ /ro/subgraphs/guides/transfer-to-the-graph/ +/ro/subgraphs/mcp/claude/ +/ro/subgraphs/mcp/cline/ +/ro/subgraphs/mcp/cursor/ /ro/subgraphs/querying/best-practices/ /ro/subgraphs/querying/distributed-systems/ /ro/subgraphs/querying/from-an-application/ @@ -3152,6 +3212,7 @@ /ru/indexing/tooling/graph-node/ /ru/indexing/tooling/graphcast/ /ru/resources/benefits/ +/ru/resources/claude-mcp/ /ru/resources/glossary/ /ru/resources/migration-guides/assemblyscript-migration-guide/ /ru/resources/migration-guides/graphql-validations-migration-guide/ @@ -3198,6 +3259,9 @@ /ru/subgraphs/guides/subgraph-debug-forking/ /ru/subgraphs/guides/subgraph-uncrashable/ /ru/subgraphs/guides/transfer-to-the-graph/ +/ru/subgraphs/mcp/claude/ +/ru/subgraphs/mcp/cline/ +/ru/subgraphs/mcp/cursor/ /ru/subgraphs/querying/best-practices/ /ru/subgraphs/querying/distributed-systems/ /ru/subgraphs/querying/from-an-application/ @@ -3400,6 +3464,7 @@ /sv/indexing/tooling/graph-node/ /sv/indexing/tooling/graphcast/ /sv/resources/benefits/ +/sv/resources/claude-mcp/ /sv/resources/glossary/ /sv/resources/migration-guides/assemblyscript-migration-guide/ /sv/resources/migration-guides/graphql-validations-migration-guide/ @@ -3446,6 +3511,9 @@ /sv/subgraphs/guides/subgraph-debug-forking/ /sv/subgraphs/guides/subgraph-uncrashable/ /sv/subgraphs/guides/transfer-to-the-graph/ +/sv/subgraphs/mcp/claude/ +/sv/subgraphs/mcp/cline/ +/sv/subgraphs/mcp/cursor/ /sv/subgraphs/querying/best-practices/ /sv/subgraphs/querying/distributed-systems/ /sv/subgraphs/querying/from-an-application/ @@ -3648,6 +3716,7 @@ /tr/indexing/tooling/graph-node/ /tr/indexing/tooling/graphcast/ /tr/resources/benefits/ +/tr/resources/claude-mcp/ /tr/resources/glossary/ /tr/resources/migration-guides/assemblyscript-migration-guide/ /tr/resources/migration-guides/graphql-validations-migration-guide/ @@ -3694,6 +3763,9 @@ /tr/subgraphs/guides/subgraph-debug-forking/ /tr/subgraphs/guides/subgraph-uncrashable/ /tr/subgraphs/guides/transfer-to-the-graph/ +/tr/subgraphs/mcp/claude/ +/tr/subgraphs/mcp/cline/ +/tr/subgraphs/mcp/cursor/ /tr/subgraphs/querying/best-practices/ /tr/subgraphs/querying/distributed-systems/ /tr/subgraphs/querying/from-an-application/ @@ -3894,6 +3966,7 @@ /uk/indexing/tooling/graph-node/ /uk/indexing/tooling/graphcast/ /uk/resources/benefits/ +/uk/resources/claude-mcp/ /uk/resources/glossary/ /uk/resources/migration-guides/assemblyscript-migration-guide/ /uk/resources/migration-guides/graphql-validations-migration-guide/ @@ -3940,6 +4013,9 @@ /uk/subgraphs/guides/subgraph-debug-forking/ /uk/subgraphs/guides/subgraph-uncrashable/ /uk/subgraphs/guides/transfer-to-the-graph/ +/uk/subgraphs/mcp/claude/ +/uk/subgraphs/mcp/cline/ +/uk/subgraphs/mcp/cursor/ /uk/subgraphs/querying/best-practices/ /uk/subgraphs/querying/distributed-systems/ /uk/subgraphs/querying/from-an-application/ @@ -3998,6 +4074,7 @@ /ur/indexing/tooling/graph-node/ /ur/indexing/tooling/graphcast/ /ur/resources/benefits/ +/ur/resources/claude-mcp/ /ur/resources/glossary/ /ur/resources/migration-guides/assemblyscript-migration-guide/ /ur/resources/migration-guides/graphql-validations-migration-guide/ @@ -4044,6 +4121,9 @@ /ur/subgraphs/guides/subgraph-debug-forking/ /ur/subgraphs/guides/subgraph-uncrashable/ /ur/subgraphs/guides/transfer-to-the-graph/ +/ur/subgraphs/mcp/claude/ +/ur/subgraphs/mcp/cline/ +/ur/subgraphs/mcp/cursor/ /ur/subgraphs/querying/best-practices/ /ur/subgraphs/querying/distributed-systems/ /ur/subgraphs/querying/from-an-application/ @@ -4244,6 +4324,7 @@ /vi/indexing/tooling/graph-node/ /vi/indexing/tooling/graphcast/ /vi/resources/benefits/ +/vi/resources/claude-mcp/ /vi/resources/glossary/ /vi/resources/migration-guides/assemblyscript-migration-guide/ /vi/resources/migration-guides/graphql-validations-migration-guide/ @@ -4290,6 +4371,9 @@ /vi/subgraphs/guides/subgraph-debug-forking/ /vi/subgraphs/guides/subgraph-uncrashable/ /vi/subgraphs/guides/transfer-to-the-graph/ +/vi/subgraphs/mcp/claude/ +/vi/subgraphs/mcp/cline/ +/vi/subgraphs/mcp/cursor/ /vi/subgraphs/querying/best-practices/ /vi/subgraphs/querying/distributed-systems/ /vi/subgraphs/querying/from-an-application/ @@ -4348,6 +4432,7 @@ /zh/indexing/tooling/graph-node/ /zh/indexing/tooling/graphcast/ /zh/resources/benefits/ +/zh/resources/claude-mcp/ /zh/resources/glossary/ /zh/resources/migration-guides/assemblyscript-migration-guide/ /zh/resources/migration-guides/graphql-validations-migration-guide/ @@ -4394,6 +4479,9 @@ /zh/subgraphs/guides/subgraph-debug-forking/ /zh/subgraphs/guides/subgraph-uncrashable/ /zh/subgraphs/guides/transfer-to-the-graph/ +/zh/subgraphs/mcp/claude/ +/zh/subgraphs/mcp/cline/ +/zh/subgraphs/mcp/cursor/ /zh/subgraphs/querying/best-practices/ /zh/subgraphs/querying/distributed-systems/ /zh/subgraphs/querying/from-an-application/ diff --git a/website/src/pages/en/archived/_meta.js b/website/src/pages/en/archived/_meta.js index 2a166f476c39..dca32f8a186b 100644 --- a/website/src/pages/en/archived/_meta.js +++ b/website/src/pages/en/archived/_meta.js @@ -2,5 +2,5 @@ import titles from './_meta-titles.json' export default { sunrise: '', - arbitrum: titles.arbitrum, + arbitrum: titles.arbitrum ?? '', } diff --git a/website/src/pages/en/indexing/_meta.js b/website/src/pages/en/indexing/_meta.js index ec30ac99c1dc..194d7618a935 100644 --- a/website/src/pages/en/indexing/_meta.js +++ b/website/src/pages/en/indexing/_meta.js @@ -2,7 +2,7 @@ import titles from './_meta-titles.json' export default { overview: '', - tooling: titles.tooling, + tooling: titles.tooling ?? '', tap: '', 'supported-network-requirements': '', 'chain-integration-overview': '', diff --git a/website/src/pages/en/resources/_meta.js b/website/src/pages/en/resources/_meta.js index 30aeee766264..aa8e2d0ec6a8 100644 --- a/website/src/pages/en/resources/_meta.js +++ b/website/src/pages/en/resources/_meta.js @@ -4,8 +4,8 @@ export default { glossary: '', tokenomics: '', benefits: '', - roles: titles.roles, - 'migration-guides': titles['migration-guides'], + roles: titles.roles ?? '', + 'migration-guides': titles['migration-guides'] ?? '', 'subgraph-studio-faq': '', 'claude-mcp': '', } diff --git a/website/src/pages/en/subgraphs/_meta.js b/website/src/pages/en/subgraphs/_meta.js index a74e3023caff..4dab5e963490 100644 --- a/website/src/pages/en/subgraphs/_meta.js +++ b/website/src/pages/en/subgraphs/_meta.js @@ -3,10 +3,10 @@ import titles from './_meta-titles.json' export default { 'quick-start': '', explorer: '', - querying: titles.querying, - developing: titles.developing, + querying: titles.querying ?? '', + developing: titles.developing ?? '', billing: '', - mcp: titles.mcp, - guides: titles.guides, - 'best-practices': titles['best-practices'], + mcp: titles.mcp ?? '', + guides: titles.guides ?? '', + 'best-practices': titles['best-practices'] ?? '', } diff --git a/website/src/pages/en/subgraphs/developing/_meta.js b/website/src/pages/en/subgraphs/developing/_meta.js index e5aa787be7c2..51ad1ee1f5f9 100644 --- a/website/src/pages/en/subgraphs/developing/_meta.js +++ b/website/src/pages/en/subgraphs/developing/_meta.js @@ -3,9 +3,9 @@ import titles from './_meta-titles.json' export default { introduction: '', subgraphs: '', - creating: titles.creating, - deploying: titles.deploying, - publishing: titles.publishing, - managing: titles.managing, + creating: titles.creating ?? '', + deploying: titles.deploying ?? '', + publishing: titles.publishing ?? '', + managing: titles.managing ?? '', 'developer-faq': '', } diff --git a/website/src/pages/en/subgraphs/developing/creating/_meta.js b/website/src/pages/en/subgraphs/developing/creating/_meta.js index 8afcf2c12664..7cb866477062 100644 --- a/website/src/pages/en/subgraphs/developing/creating/_meta.js +++ b/website/src/pages/en/subgraphs/developing/creating/_meta.js @@ -7,6 +7,6 @@ export default { 'ql-schema': '', 'assemblyscript-mappings': '', advanced: '', - 'graph-ts': titles['graph-ts'], + 'graph-ts': titles['graph-ts'] ?? '', 'unit-testing-framework': '', } diff --git a/website/src/pages/en/subgraphs/developing/creating/graph-ts/_meta.js b/website/src/pages/en/subgraphs/developing/creating/graph-ts/_meta.js index b3af34a7e607..3919234ad9bb 100644 --- a/website/src/pages/en/subgraphs/developing/creating/graph-ts/_meta.js +++ b/website/src/pages/en/subgraphs/developing/creating/graph-ts/_meta.js @@ -1,7 +1,7 @@ import titles from './_meta-titles.json' export default { - README: titles.README, - api: titles.api, - 'common-issues': titles['common-issues'], + README: titles.README ?? '', + api: titles.api ?? '', + 'common-issues': titles['common-issues'] ?? '', } diff --git a/website/src/pages/en/subgraphs/querying/_meta.js b/website/src/pages/en/subgraphs/querying/_meta.js index c933a65f7eb4..aa7d6b63f4eb 100644 --- a/website/src/pages/en/subgraphs/querying/_meta.js +++ b/website/src/pages/en/subgraphs/querying/_meta.js @@ -8,6 +8,6 @@ export default { 'distributed-systems': '', 'graphql-api': '', 'subgraph-id-vs-deployment-id': '', - 'graph-client': titles['graph-client'], + 'graph-client': titles['graph-client'] ?? '', python: '', } diff --git a/website/src/pages/en/subgraphs/querying/graph-client/_meta.js b/website/src/pages/en/subgraphs/querying/graph-client/_meta.js index 07ece2a75d0c..3d70f6fec9b4 100644 --- a/website/src/pages/en/subgraphs/querying/graph-client/_meta.js +++ b/website/src/pages/en/subgraphs/querying/graph-client/_meta.js @@ -1,5 +1,5 @@ import titles from './_meta-titles.json' export default { - README: titles.README, + README: titles.README ?? '', } diff --git a/website/src/pages/en/substreams/_meta.js b/website/src/pages/en/substreams/_meta.js index 628a69e671e8..a8ee04618eae 100644 --- a/website/src/pages/en/substreams/_meta.js +++ b/website/src/pages/en/substreams/_meta.js @@ -3,7 +3,7 @@ import titles from './_meta-titles.json' export default { 'quick-start': '', introduction: '', - developing: titles.developing, + developing: titles.developing ?? '', publishing: '', - sps: titles.sps, + sps: titles.sps ?? '', } diff --git a/website/src/pages/en/substreams/developing/_meta.js b/website/src/pages/en/substreams/developing/_meta.js index b17522647e2d..6741d5fad496 100644 --- a/website/src/pages/en/substreams/developing/_meta.js +++ b/website/src/pages/en/substreams/developing/_meta.js @@ -2,6 +2,6 @@ import titles from './_meta-titles.json' export default { 'dev-container': '', - solana: titles.solana, - sinks: titles.sinks, + solana: titles.solana ?? '', + sinks: titles.sinks ?? '', } diff --git a/website/src/pages/en/token-api/_meta.js b/website/src/pages/en/token-api/_meta.js index 0e526f673a66..f67576d7f612 100644 --- a/website/src/pages/en/token-api/_meta.js +++ b/website/src/pages/en/token-api/_meta.js @@ -2,8 +2,8 @@ import titles from './_meta-titles.json' export default { 'quick-start': '', - mcp: titles.mcp, - evm: titles.evm, - monitoring: titles.monitoring, + mcp: titles.mcp ?? '', + evm: titles.evm ?? '', + monitoring: titles.monitoring ?? '', faq: '', }