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 66cf79a52b51..aa8e2d0ec6a8 100644 --- a/website/src/pages/en/resources/_meta.js +++ b/website/src/pages/en/resources/_meta.js @@ -4,7 +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/resources/claude-mcp.mdx b/website/src/pages/en/resources/claude-mcp.mdx new file mode 100644 index 000000000000..365d23e1e207 --- /dev/null +++ b/website/src/pages/en/resources/claude-mcp.mdx @@ -0,0 +1,115 @@ +--- +title: Claude MCP +--- + +This guide walks you through configuring Claude Desktop to use The Graph ecosystem's [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) resources: Token API and Subgraph. These integrations allow you to interact with blockchain data through natural language conversations with Claude. + +## What You Can Do + +With these integrations, you can: + +- **Token API**: Access token and wallet information across multiple blockchains +- **Subgraph**: Find relevant Subgraphs for specific keywords and contracts, explore Subgraph schemas, and execute GraphQL queries + +## Prerequisites + +- [Node.js](https://nodejs.org/en/download/) installed and available in your path +- [Claude Desktop](https://claude.ai/download) installed +- API keys: + - Token API key from [The Graph Market](https://thegraph.market/) + - Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +## Configuration Steps + +### 1. Open Configuration File + +Navigate to your `claude_desktop_config.json` file: + +> **Claude Desktop** > **Settings** > **Developer** > **Edit Config** + +Paths by operating system: + +- OSX: `~/Library/Application Support/Claude/claude_desktop_config.json` +- Windows: `%APPDATA%\Claude\claude_desktop_config.json` +- Linux: `.config/Claude/claude_desktop_config.json` + +### 2. Add Configuration + +Replace the contents of the existing config file with: + +```json +{ + "mcpServers": { + "subgraph": { + "command": "npx", + "args": ["mcp-remote", "--header", "Authorization:${AUTH_HEADER}", "https://subgraphs.mcp.thegraph.com/sse"], + "env": { + "AUTH_HEADER": "Bearer GATEWAY_API_KEY" + } + } + } +} +``` + +### 3. Add Your API Keys + +Replace: + +- `ACCESS_TOKEN` with your Token API key from [The Graph Market](https://thegraph.market/) +- `GATEWAY_API_KEY` with your Gateway API key from [Subgraph Studio](https://thegraph.com/studio/apikeys/) + +### 4. Save and Restart + +- Save the configuration file +- Restart Claude Desktop + +### 5. Add The Graph Resources in Claude + +After configuration: + +1. Start a new conversation in Claude Desktop +2. Click on the context menu (top right) +3. Add "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. + +### 6. Run Queries + +Here are some example queries you can try after setting up the resources: + +### Subgraph Queries + +``` +What are the top pools in Uniswap? +``` + +``` +Who are the top Delegators of The Graph Protocol? +``` + +``` +Please make a bar chart for the number of active loans in Compound for the last 7 days +``` + +### Token API Queries + +``` +Show me the current price of ETH +``` + +``` +What are the top tokens by market cap on Ethereum? +``` + +``` +Analyze this wallet address: 0x... +``` + +## Troubleshooting + +If you encounter issues: + +1. **Verify Node.js Installation**: Ensure Node.js is correctly installed by running `node -v` in your terminal +2. **Check API Keys**: Verify that your API keys are correctly entered in the configuration file +3. **Enable Verbose Logging**: Add `--verbose true` to the args array in your configuration to see detailed logs +4. **Restart Claude Desktop**: After making changes to the configuration, always restart Claude Desktop diff --git a/website/src/pages/en/subgraphs/_meta-titles.json b/website/src/pages/en/subgraphs/_meta-titles.json index 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..4dab5e963490 100644 --- a/website/src/pages/en/subgraphs/_meta.js +++ b/website/src/pages/en/subgraphs/_meta.js @@ -3,9 +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: '', - 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/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/mcp/claude.mdx b/website/src/pages/en/subgraphs/mcp/claude.mdx new file mode 100644 index 000000000000..cb023bed7bf0 --- /dev/null +++ b/website/src/pages/en/subgraphs/mcp/claude.mdx @@ -0,0 +1,180 @@ +--- +title: Claude Desktop +--- + +The Subgraph [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) server enables Claude to interact directly with Subgraphs on The Graph Network. This integration allows you to find relevant Subgraphs for specific keywords and contracts, explore Subgraph schemas, and execute GraphQL queries—all through natural language conversations with Claude. + +## What You Can Do + +The Subgraph MCP integration enables you to: + +- Access the GraphQL schema for any Subgraph on The Graph Network +- Execute GraphQL queries against any Subgraph deployment +- Find top Subgraph deployments for a given keyword or contract address +- Get 30-day query volume for Subgraph deployments +- Ask natural language questions about Subgraph data without writing GraphQL queries manually + +## Prerequisites + +- [Node.js](https://nodejs.org/en) installed and available in your path +- [Claude Desktop](https://claude.ai/download) installed (latest version) +- A Gateway API key from [Subgraph Studio](https://thegraph.com/studio/) + +## Installation Options + +### Option 1: Using npx (Recommended) + +#### Configuration Steps using npx + +#### 1. Open Configuration File + +Navigate to your `claude_desktop_config.json` file: + +> **Settings** > **Developer** > **Edit Config** + +- OSX: `~/Library/Application Support/Claude/claude_desktop_config.json` +- Windows: `%APPDATA%\Claude\claude_desktop_config.json` +- Linux: `.config/Claude/claude_desktop_config.json` + +#### 2. Add Configuration + +Paste the following settings into your config file: + +```json +{ + "mcpServers": { + "subgraph": { + "command": "npx", + "args": ["mcp-remote", "--header", "Authorization:${AUTH_HEADER}", "https://subgraphs.mcp.thegraph.com/sse"], + "env": { + "AUTH_HEADER": "Bearer GATEWAY_API_KEY" + } + } + } +} +``` + +#### 3. Add Your 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, 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** + + 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 + +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" 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. + +## Troubleshooting + +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 + +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/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 + +- **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`. + +## 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: + +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 +``` + +``` +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 new file mode 100644 index 000000000000..6714e445c0b2 --- /dev/null +++ b/website/src/pages/en/subgraphs/mcp/cline.mdx @@ -0,0 +1,99 @@ +--- +title: Cline +--- + +The Subgraph [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) server enables Cline to interact directly with Subgraphs on The Graph Network. This integration allows you to explore Subgraph schemas, execute GraphQL queries, and find relevant Subgraphs for specific contracts—all through natural language conversations with Cline. + +## 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 Steps + +### 1. Open Configuration File + +Create or edit your `cline_mcp_settings.json` file. + +> **MCP Servers** > **Installed** > **Configure MCP Servers** + +### 2. Add Configuration + +```json +{ + "mcpServers": { + "subgraph": { + "command": "npx", + "args": ["mcp-remote", "--header", "Authorization:${AUTH_HEADER}", "https://subgraphs.mcp.thegraph.com/sse"], + "env": { + "AUTH_HEADER": "Bearer GATEWAY_API_KEY" + } + } + } +} +``` + +### 3. Add Your API Key + +Replace `GATEWAY_API_KEY` with your API key from Subgraph 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" as a 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 new file mode 100644 index 000000000000..298f43ece048 --- /dev/null +++ b/website/src/pages/en/subgraphs/mcp/cursor.mdx @@ -0,0 +1,94 @@ +--- +title: Cursor +--- + +The Subgraph [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) server enables Cursor to interact directly with Subgraphs on The Graph Network. This integration allows you to explore Subgraph schemas, execute GraphQL queries, and find relevant Subgraphs for specific contracts—all through natural language conversations with Cursor. + +## 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 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 +{ + "mcpServers": { + "subgraph": { + "command": "npx", + "args": ["mcp-remote", "--header", "Authorization:${AUTH_HEADER}", "https://subgraphs.mcp.thegraph.com/sse"], + "env": { + "AUTH_HEADER": "Bearer GATEWAY_API_KEY" + } + } + } +} +``` + +### 3. Add Your API Key + +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: + +### 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 + +## 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: + +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/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: '', }