You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
6
+
7
+
## What You Can Do
8
+
9
+
With these integrations, you can:
10
+
11
+
-**Token API**: Access token and wallet information across multiple blockchains
12
+
-**Subgraph**: Explore Subgraph schemas, execute GraphQL queries, and find relevant Subgraphs for specific contracts
13
+
14
+
## Prerequisites
15
+
16
+
-[Node.js](https://nodejs.org/en/download/) installed and available in your path
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,52 +15,25 @@ With the Subgraph MCP integration, you can:
@@ -74,12 +47,9 @@ You can configure Claude Desktop to use both the Token API MCP and Subgraph MCP
74
47
}
75
48
```
76
49
77
-
- For Token API access tokens, visit [The Graph Market](https://thegraph.com/explorer)
78
-
- For Subgraph Gateway API keys, visit [Subgraph Studio](https://thegraph.com/studio/)
79
-
80
-
## Troubleshooting
50
+
Replace `GATEWAY_API_KEY` with your API key from [Subgraph Studio](https://thegraph.com/studio/).
81
51
82
-
To enable logs for the MCP, add the `--verbose true` option to your args array.
52
+
Once you've entered your Gateway API key into your settings, you can save the file, and restart Claude desktop.
83
53
84
54
## Using The Graph Resource in Claude
85
55
@@ -92,6 +62,10 @@ After configuring Claude Desktop:
92
62
93
63
**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.
94
64
65
+
## Troubleshooting
66
+
67
+
To enable logs for the MCP, add the `--verbose true` option to your args array.
68
+
95
69
## Available Tools and Usage
96
70
97
71
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
125
99
126
100
```
127
101
What are the pairs with maximum volume on deployment 0xde0a7b5368f846f7d863d9f64949b688ad9818243151d488b4c6b206145b9ea3?
102
+
```
128
103
104
+
```
129
105
Which tokens have the highest market cap in this Subgraph?
106
+
```
130
107
108
+
```
131
109
Show me the most recent 5 swaps for the USDC/ETH pair
132
110
```
133
-
134
-
## Key Identifier Types
135
-
136
-
When working with Subgraphs, you'll encounter different types of identifiers:
137
-
138
-
-**Subgraph ID** (e.g., `5zvR82...`): Logical identifier for a Subgraph
139
-
-**Deployment ID** (e.g., `0x4d7c...`): Identifier for a specific, immutable deployment
140
-
-**IPFS Hash** (e.g., `QmTZ8e...`): Identifier for the manifest of a specific deployment
0 commit comments