From a8634838c562cc745ef2996e97b7b7aba5147286 Mon Sep 17 00:00:00 2001 From: Etienne Donneger Date: Wed, 19 Nov 2025 15:14:18 +0000 Subject: [PATCH 01/13] Update introduction.mdx - Adds the two types of MCP - Misc editing --- .../pages/en/ai-suite/token-api-mcp/introduction.mdx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/website/src/pages/en/ai-suite/token-api-mcp/introduction.mdx b/website/src/pages/en/ai-suite/token-api-mcp/introduction.mdx index b61ad0a1c485..2beee59059a4 100644 --- a/website/src/pages/en/ai-suite/token-api-mcp/introduction.mdx +++ b/website/src/pages/en/ai-suite/token-api-mcp/introduction.mdx @@ -5,11 +5,15 @@ sidebarTitle: 'Introduction' Token API MCP server is an open-source implementation of [Anthropic's Model Context Protocol](https://modelcontextprotocol.io/introduction). -This MCP server makes on-chain token data, including metadata, balances, transfers, and holder statistics, accessible through a set of MCP tools. Any compatible client can use these tools to fetch and analyze token information through a standardized interface. It connects to The Graph's hosted Token API database, enabling AI assistants to query real-time blockchain data using natural language requests that get translated into optimized SQL queries. +This MCP server makes on-chain token data, including metadata, balances, transfers, and holder statistics, accessible through a set of MCP tools. Any compatible client can use these tools to fetch and analyze token information through a standardized interface. It connects to The Graph's hosted Token API database, enabling AI assistants to query blockchain data using natural language requests. -The server itself does not host any language model. It simply converts MCP calls into data look-ups and returns structured results, letting the client's own LLM incorporate the results. +There are two types of MCP available for use: +- A REST-based MCP, the default, that communicates with the Token API. +- A SQL-based MCP, for advanced users, that allows for communicating with the backend databases that powers the Token API. -Think of it as a USB-C hub: it standardizes the plug-and-play connection between AI agents and The Graph's Token API data. +The REST-based MCP simply exposes the API endpoints to your LLM based on the OpenAPI specification (available at https://token-api.thegraph.com/openapi). It automatically stays up-to-date with new Token API releases so you don't miss any new features ! + +The SQL-based MCP provides the LLM tools to list databases and tables as well as run SQL queries directly on the data. It is meant for advanced users who need different use cases that the standard API endpoints cannot replicate. For best results, it is advised to use an LLM model specifically tuned for working with SQL. ## What You Can Do @@ -20,4 +24,4 @@ Think of it as a USB-C hub: it standardizes the plug-and-play connection between - Ask natural language questions about token data without writing smart contract calls - Access historical transfer data to analyze token movement over time -The Token MCP server provides [Claude](/ai-suite/token-api-mcp/claude/), [Cline](/ai-suite/token-api-mcp/cline/), and [Cursor](/ai-suite/token-api-mcp/cursor/) with direct, conversational access to onchain token data. +The Token MCP server provides [Claude](/ai-suite/token-api-mcp/claude/), [Cline](/ai-suite/token-api-mcp/cline/), [Cursor](/ai-suite/token-api-mcp/cursor/) and any other client with MCP integration a direct, conversational access to onchain token data. From 7db896d466c067fd0086ff7b3fae9ffdd079f42b Mon Sep 17 00:00:00 2001 From: Etienne Donneger Date: Wed, 19 Nov 2025 15:26:07 +0000 Subject: [PATCH 02/13] Update claude.mdx - Adds REST MCP config - Updates config commands - Adds depreciation notice for `--sse-url` option - Improves troubleshooting section --- .../en/ai-suite/token-api-mcp/claude.mdx | 39 ++++++++++++++++++- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/website/src/pages/en/ai-suite/token-api-mcp/claude.mdx b/website/src/pages/en/ai-suite/token-api-mcp/claude.mdx index e958ef16ebac..15aa4c7af2a8 100644 --- a/website/src/pages/en/ai-suite/token-api-mcp/claude.mdx +++ b/website/src/pages/en/ai-suite/token-api-mcp/claude.mdx @@ -18,12 +18,13 @@ Create or edit your `claude_desktop_config.json` file. - Windows: `%APPDATA%\Claude\claude_desktop_config.json` - Linux: `.config/Claude/claude_desktop_config.json` +**REST-based MCP** ```json label="claude_desktop_config.json" { "mcpServers": { "token-api": { "command": "npx", - "args": ["@pinax/mcp", "--sse-url", "https://token-api.mcp.thegraph.com/sse"], + "args": ["@pinax/mcp", "--remote-url", "https://token-api.mcp.thegraph.com/"], "env": { "ACCESS_TOKEN": "" } @@ -32,9 +33,43 @@ Create or edit your `claude_desktop_config.json` file. } ``` +**SQL-based MCP** +```json label="claude_desktop_config.json" +{ + "mcpServers": { + "token-api": { + "command": "npx", + "args": ["@pinax/mcp", "--remote-url", "https://token-api.mcp.thegraph.com/sql"], + "env": { + "ACCESS_TOKEN": "" + } + } + } +} +``` + +> [!NOTE] +> The previous `--sse-url` option is deprecated, use `--remote-url`. + ## Troubleshooting -To enable logs for the MCP, add the option `"--verbose", "true"` under `"args"`. +To enable logs for troubleshooting the MCP, add the option `"--verbose", "true"` under `"args"`. + +```json label="claude_desktop_config.json" +{ + "mcpServers": { + "token-api": { + "command": "npx", + "args": ["@pinax/mcp", "--remote-url", "https://token-api.mcp.thegraph.com/", "--verbose", "true"], + "env": { + "ACCESS_TOKEN": "" + } + } + } +} +``` + +Logs are available under `logs/mcp.log` and `/logs/mcp-server-token-api.log` inside the folder of your Claude configuration file. ### ENOENT From fe4926d67f9b72fffbbb03bcc36cf1af89237dee Mon Sep 17 00:00:00 2001 From: Etienne Donneger Date: Wed, 19 Nov 2025 15:38:04 +0000 Subject: [PATCH 03/13] Update faq.mdx - Adds `How do I choose between the REST-MCP and the SQL-MCP and which one should I use ?` - Adds `Will using the REST-MCP counts towards my Token API usage ?` --- website/src/pages/en/token-api/faq.mdx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/website/src/pages/en/token-api/faq.mdx b/website/src/pages/en/token-api/faq.mdx index 956dce679d01..b4b46763a97e 100644 --- a/website/src/pages/en/token-api/faq.mdx +++ b/website/src/pages/en/token-api/faq.mdx @@ -283,12 +283,26 @@ You can find the code for the MCP client in [The Graph's repo](https://github.co ### MCP integration with Claude/Cline/Cursor shows errors like "ENOENT" or "Server disconnected". How do I fix this? -For "ENOENT" errors, ensure Node.js 18+ is installed and the path to `npx`/`bunx` is correct (consider using full paths in config). "Server disconnected" usually indicates authentication or connectivity issues – verify your `ACCESS_TOKEN` is set correctly and your network allows access to `https://token-api.mcp.thegraph.com/sse`. +For "ENOENT" errors, ensure Node.js 18+ is installed and the path to `npx`/`bunx` is correct (consider using full paths in config). "Server disconnected" usually indicates authentication or connectivity issues – verify your `ACCESS_TOKEN` is set correctly and your network allows access to `https://token-api.mcp.thegraph.com/`. ### Do I need to use MCP or tools like Claude, Cline, or Cursor? No, these are optional. MCP is an advanced feature allowing AI assistants to interface with the API via streaming. For standard usage, simply call the REST endpoints with any HTTP client using your JWT. Claude Desktop, Cline bot, and Cursor IDE integrations are provided for convenience but aren't required. +### How do I choose between the REST-MCP and the SQL-MCP and which one should I use ? + +To use one or the other, you need to supply the adequate URL in your configuration file (see the [docs](https://thegraph.com/docs/en/ai-suite/token-api-mcp/introduction/) for how to setup your configuration): +- `https://token-api.mcp.thegraph.com/` is for the REST-MCP +- `https://token-api.mcp.thegraph.com/sql` is for the SQL-MCP + +Which one you'll want to use depends on your use cases. Most of the time you should use the REST-MCP as it's the simplest way for the LLM to interact with blockchain data from the Token API. If you want answers to basic questions such as `What is the balance of ...`, `How many holders of ...`, etc. the REST-MCP gives your LLM all the tools it needs. + +The SQL-MCP should be used in an analyst use case where complex aggregations are needed that the Token API doesn't provide on its endpoints. It will require the LLM to discover and craft working SQL queries on the backend databases of the Token API. + +### Will using the REST-MCP counts towards my Token API usage ? + +Yes, you need to provide your Token API token to the MCP for authenticating with the Token API. The MCP makes API requests on your behalf when your LLM interacts with it. + ## NFT Spam Detection ### What is NFT spam detection? From c2ba125ff481a4c873d175a0737786f0cf229667 Mon Sep 17 00:00:00 2001 From: Etienne Donneger Date: Thu, 20 Nov 2025 14:22:13 +0000 Subject: [PATCH 04/13] Update introduction.mdx Emphasizes REST easier to use for LLMs than SQL --- website/src/pages/en/ai-suite/token-api-mcp/introduction.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/src/pages/en/ai-suite/token-api-mcp/introduction.mdx b/website/src/pages/en/ai-suite/token-api-mcp/introduction.mdx index 2beee59059a4..4119a0457321 100644 --- a/website/src/pages/en/ai-suite/token-api-mcp/introduction.mdx +++ b/website/src/pages/en/ai-suite/token-api-mcp/introduction.mdx @@ -11,9 +11,9 @@ There are two types of MCP available for use: - A REST-based MCP, the default, that communicates with the Token API. - A SQL-based MCP, for advanced users, that allows for communicating with the backend databases that powers the Token API. -The REST-based MCP simply exposes the API endpoints to your LLM based on the OpenAPI specification (available at https://token-api.thegraph.com/openapi). It automatically stays up-to-date with new Token API releases so you don't miss any new features ! +The REST-based MCP simply exposes the API endpoints to your LLM based on the OpenAPI specification (available at https://token-api.thegraph.com/openapi). It is the *recommended way* to setup an LLM with Token API as the set of tools it offers is straightforward to use for any language model. Additionnaly, it automatically stays up-to-date with new Token API releases so you don't miss any new features ! -The SQL-based MCP provides the LLM tools to list databases and tables as well as run SQL queries directly on the data. It is meant for advanced users who need different use cases that the standard API endpoints cannot replicate. For best results, it is advised to use an LLM model specifically tuned for working with SQL. +The SQL-based MCP provides the LLM tools to list databases and tables as well as run SQL queries directly on the data. It is meant for advanced users who need different use cases that the standard API endpoints cannot replicate. For best results, it is advised to use an LLM model specifically tuned for working with SQL as general purpose LLMs models (like Sonnet, Gemini, etc.) might not be able to generate valid queries efficiently. ## What You Can Do From 56ffa6002fbb6ac588882c7bbc7f1c9ed5f0d623 Mon Sep 17 00:00:00 2001 From: Etienne Donneger Date: Thu, 20 Nov 2025 14:23:37 +0000 Subject: [PATCH 05/13] Update cline.mdx Adds new instructions --- .../pages/en/ai-suite/token-api-mcp/cline.mdx | 39 +++++++++++++++++-- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/website/src/pages/en/ai-suite/token-api-mcp/cline.mdx b/website/src/pages/en/ai-suite/token-api-mcp/cline.mdx index e885d21366cd..70ececb19376 100644 --- a/website/src/pages/en/ai-suite/token-api-mcp/cline.mdx +++ b/website/src/pages/en/ai-suite/token-api-mcp/cline.mdx @@ -18,24 +18,57 @@ Create or edit your `cline_mcp_settings.json` file. > **MCP Servers** > **Installed** > **Configure MCP Servers** +**REST-based MCP** ```json label="cline_mcp_settings.json" { "mcpServers": { - "mcp-pinax": { + "token-api": { "command": "npx", - "args": ["@pinax/mcp", "--sse-url", "https://token-api.mcp.thegraph.com/sse"], + "args": ["@pinax/mcp", "--remote-url", "https://token-api.mcp.thegraph.com/"], "env": { - "ACCESS_TOKEN": "" + "ACCESS_TOKEN": "" } } } } ``` +**SQL-based MCP** +```json label="cline_mcp_settings.json" +{ + "mcpServers": { + "token-api": { + "command": "npx", + "args": ["@pinax/mcp", "--remote-url", "https://token-api.mcp.thegraph.com/sql"], + "env": { + "ACCESS_TOKEN": "" + } + } + } +} +``` + +> [!NOTE] +> The previous `--sse-url` option is deprecated, use `--remote-url`. + ## Troubleshooting To enable logs for the MCP, use the `--verbose true` option. +```json label="cline_mcp_settings.json" +{ + "mcpServers": { + "token-api": { + "command": "npx", + "args": ["@pinax/mcp", "--remote-url", "https://token-api.mcp.thegraph.com/", "--verbose", "true"], + "env": { + "ACCESS_TOKEN": "" + } + } + } +} +``` + ### ENOENT ![Cline error dialog showing 'ENOENT' system alert.](/img/cline-error.png) From bce784c664f9de4596e43bd4b8fa05776817603d Mon Sep 17 00:00:00 2001 From: Etienne Donneger Date: Thu, 20 Nov 2025 14:24:21 +0000 Subject: [PATCH 06/13] Update cursor.mdx Adds new instructions --- .../en/ai-suite/token-api-mcp/cursor.mdx | 36 +++++++++++++++++-- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/website/src/pages/en/ai-suite/token-api-mcp/cursor.mdx b/website/src/pages/en/ai-suite/token-api-mcp/cursor.mdx index 68fe2fdb201c..46900ed2861b 100644 --- a/website/src/pages/en/ai-suite/token-api-mcp/cursor.mdx +++ b/website/src/pages/en/ai-suite/token-api-mcp/cursor.mdx @@ -18,14 +18,30 @@ Create or edit your `~/.cursor/mcp.json` file. > **Cursor Settings** > **MCP** > **Add new global MCP Server** +**REST-based MCP** ```json label="mcp.json" { "mcpServers": { - "mcp-pinax": { + "token-api": { "command": "npx", - "args": ["@pinax/mcp", "--sse-url", "https://token-api.mcp.thegraph.com/sse"], + "args": ["@pinax/mcp", "--remote-url", "https://token-api.mcp.thegraph.com/"], "env": { - "ACCESS_TOKEN": "" + "ACCESS_TOKEN": "" + } + } + } +} +``` + +**SQL-based MCP** +```json label="mcp.json" +{ + "mcpServers": { + "token-api": { + "command": "npx", + "args": ["@pinax/mcp", "--remote-url", "https://token-api.mcp.thegraph.com/sql"], + "env": { + "ACCESS_TOKEN": "" } } } @@ -38,6 +54,20 @@ Create or edit your `~/.cursor/mcp.json` file. To enable logs for the MCP, use the `--verbose true` option. +```json label="mcp.json" +{ + "mcpServers": { + "token-api": { + "command": "npx", + "args": ["@pinax/mcp", "--remote-url", "https://token-api.mcp.thegraph.com/", "--verbose", "true"], + "env": { + "ACCESS_TOKEN": "" + } + } + } +} +``` + ### ENOENT Try to use the full path of the command instead: From f7308c6e05ed62634e91afc3aecd4d26020f7ebf Mon Sep 17 00:00:00 2001 From: Etienne Donneger Date: Thu, 20 Nov 2025 15:30:49 +0000 Subject: [PATCH 07/13] Update website/src/pages/en/token-api/faq.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/token-api/faq.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/en/token-api/faq.mdx b/website/src/pages/en/token-api/faq.mdx index b4b46763a97e..ce72b5c1bb54 100644 --- a/website/src/pages/en/token-api/faq.mdx +++ b/website/src/pages/en/token-api/faq.mdx @@ -299,7 +299,7 @@ Which one you'll want to use depends on your use cases. Most of the time you sho The SQL-MCP should be used in an analyst use case where complex aggregations are needed that the Token API doesn't provide on its endpoints. It will require the LLM to discover and craft working SQL queries on the backend databases of the Token API. -### Will using the REST-MCP counts towards my Token API usage ? +### Will using the REST-MCP counts towards my Token API usage? Yes, you need to provide your Token API token to the MCP for authenticating with the Token API. The MCP makes API requests on your behalf when your LLM interacts with it. From fb08ba444c0ae386b07f134c420a9cc2d146769e Mon Sep 17 00:00:00 2001 From: Etienne Donneger Date: Thu, 20 Nov 2025 15:30:59 +0000 Subject: [PATCH 08/13] Update website/src/pages/en/ai-suite/token-api-mcp/claude.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/ai-suite/token-api-mcp/claude.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/en/ai-suite/token-api-mcp/claude.mdx b/website/src/pages/en/ai-suite/token-api-mcp/claude.mdx index 15aa4c7af2a8..6667bec40223 100644 --- a/website/src/pages/en/ai-suite/token-api-mcp/claude.mdx +++ b/website/src/pages/en/ai-suite/token-api-mcp/claude.mdx @@ -69,7 +69,7 @@ To enable logs for troubleshooting the MCP, add the option `"--verbose", "true"` } ``` -Logs are available under `logs/mcp.log` and `/logs/mcp-server-token-api.log` inside the folder of your Claude configuration file. +Logs are available under `logs/mcp.log` and `logs/mcp-server-token-api.log` inside the folder of your Claude configuration file. ### ENOENT From edfdbad44923c443a3acba3f8456d0c68cb9a0a5 Mon Sep 17 00:00:00 2001 From: Etienne Donneger Date: Thu, 20 Nov 2025 15:31:07 +0000 Subject: [PATCH 09/13] Update website/src/pages/en/ai-suite/token-api-mcp/introduction.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/ai-suite/token-api-mcp/introduction.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/en/ai-suite/token-api-mcp/introduction.mdx b/website/src/pages/en/ai-suite/token-api-mcp/introduction.mdx index 4119a0457321..b6e9b0805960 100644 --- a/website/src/pages/en/ai-suite/token-api-mcp/introduction.mdx +++ b/website/src/pages/en/ai-suite/token-api-mcp/introduction.mdx @@ -9,7 +9,7 @@ This MCP server makes on-chain token data, including metadata, balances, transfe There are two types of MCP available for use: - A REST-based MCP, the default, that communicates with the Token API. -- A SQL-based MCP, for advanced users, that allows for communicating with the backend databases that powers the Token API. +- A SQL-based MCP, for advanced users, that allows for communicating with the backend databases that power the Token API. The REST-based MCP simply exposes the API endpoints to your LLM based on the OpenAPI specification (available at https://token-api.thegraph.com/openapi). It is the *recommended way* to setup an LLM with Token API as the set of tools it offers is straightforward to use for any language model. Additionnaly, it automatically stays up-to-date with new Token API releases so you don't miss any new features ! From 6abe2132111ab4536e60b7eb59acddbaf594533a Mon Sep 17 00:00:00 2001 From: Etienne Donneger Date: Thu, 20 Nov 2025 15:31:15 +0000 Subject: [PATCH 10/13] Update website/src/pages/en/ai-suite/token-api-mcp/introduction.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/ai-suite/token-api-mcp/introduction.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/en/ai-suite/token-api-mcp/introduction.mdx b/website/src/pages/en/ai-suite/token-api-mcp/introduction.mdx index b6e9b0805960..895c52b5813b 100644 --- a/website/src/pages/en/ai-suite/token-api-mcp/introduction.mdx +++ b/website/src/pages/en/ai-suite/token-api-mcp/introduction.mdx @@ -11,7 +11,7 @@ There are two types of MCP available for use: - A REST-based MCP, the default, that communicates with the Token API. - A SQL-based MCP, for advanced users, that allows for communicating with the backend databases that power the Token API. -The REST-based MCP simply exposes the API endpoints to your LLM based on the OpenAPI specification (available at https://token-api.thegraph.com/openapi). It is the *recommended way* to setup an LLM with Token API as the set of tools it offers is straightforward to use for any language model. Additionnaly, it automatically stays up-to-date with new Token API releases so you don't miss any new features ! +The REST-based MCP simply exposes the API endpoints to your LLM based on the OpenAPI specification (available at https://token-api.thegraph.com/openapi). It is the *recommended way* to set up an LLM with Token API as the set of tools it offers is straightforward to use for any language model. Additionnaly, it automatically stays up-to-date with new Token API releases so you don't miss any new features! The SQL-based MCP provides the LLM tools to list databases and tables as well as run SQL queries directly on the data. It is meant for advanced users who need different use cases that the standard API endpoints cannot replicate. For best results, it is advised to use an LLM model specifically tuned for working with SQL as general purpose LLMs models (like Sonnet, Gemini, etc.) might not be able to generate valid queries efficiently. From 26a7cec5a77790356022d8d286d6670c93960711 Mon Sep 17 00:00:00 2001 From: Etienne Donneger Date: Thu, 20 Nov 2025 15:31:38 +0000 Subject: [PATCH 11/13] Update website/src/pages/en/token-api/faq.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/token-api/faq.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/en/token-api/faq.mdx b/website/src/pages/en/token-api/faq.mdx index ce72b5c1bb54..2363ac9083d1 100644 --- a/website/src/pages/en/token-api/faq.mdx +++ b/website/src/pages/en/token-api/faq.mdx @@ -289,7 +289,7 @@ For "ENOENT" errors, ensure Node.js 18+ is installed and the path to `npx`/`bunx No, these are optional. MCP is an advanced feature allowing AI assistants to interface with the API via streaming. For standard usage, simply call the REST endpoints with any HTTP client using your JWT. Claude Desktop, Cline bot, and Cursor IDE integrations are provided for convenience but aren't required. -### How do I choose between the REST-MCP and the SQL-MCP and which one should I use ? +### How do I choose between the REST-MCP and the SQL-MCP and which one should I use? To use one or the other, you need to supply the adequate URL in your configuration file (see the [docs](https://thegraph.com/docs/en/ai-suite/token-api-mcp/introduction/) for how to setup your configuration): - `https://token-api.mcp.thegraph.com/` is for the REST-MCP From 4c9083be7d8fe0cb4b75cbc949014c45ad7970b8 Mon Sep 17 00:00:00 2001 From: Etienne Donneger Date: Thu, 20 Nov 2025 15:31:44 +0000 Subject: [PATCH 12/13] Update website/src/pages/en/token-api/faq.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/token-api/faq.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/en/token-api/faq.mdx b/website/src/pages/en/token-api/faq.mdx index 2363ac9083d1..0e0c37ce655e 100644 --- a/website/src/pages/en/token-api/faq.mdx +++ b/website/src/pages/en/token-api/faq.mdx @@ -291,7 +291,7 @@ No, these are optional. MCP is an advanced feature allowing AI assistants to int ### How do I choose between the REST-MCP and the SQL-MCP and which one should I use? -To use one or the other, you need to supply the adequate URL in your configuration file (see the [docs](https://thegraph.com/docs/en/ai-suite/token-api-mcp/introduction/) for how to setup your configuration): +To use one or the other, you need to supply the adequate URL in your configuration file (see the [docs](https://thegraph.com/docs/en/ai-suite/token-api-mcp/introduction/) for how to set up your configuration): - `https://token-api.mcp.thegraph.com/` is for the REST-MCP - `https://token-api.mcp.thegraph.com/sql` is for the SQL-MCP From a022550e55e70f745d4ddd500bcda39e30a600ae Mon Sep 17 00:00:00 2001 From: Etienne Donneger Date: Thu, 20 Nov 2025 11:04:34 -0500 Subject: [PATCH 13/13] Fix lint --- website/src/pages/en/ai-suite/token-api-mcp/claude.mdx | 5 +++-- website/src/pages/en/ai-suite/token-api-mcp/cline.mdx | 5 +++-- website/src/pages/en/ai-suite/token-api-mcp/cursor.mdx | 2 ++ website/src/pages/en/ai-suite/token-api-mcp/introduction.mdx | 3 ++- website/src/pages/en/token-api/faq.mdx | 1 + 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/website/src/pages/en/ai-suite/token-api-mcp/claude.mdx b/website/src/pages/en/ai-suite/token-api-mcp/claude.mdx index 6667bec40223..e01345fc953e 100644 --- a/website/src/pages/en/ai-suite/token-api-mcp/claude.mdx +++ b/website/src/pages/en/ai-suite/token-api-mcp/claude.mdx @@ -19,6 +19,7 @@ Create or edit your `claude_desktop_config.json` file. - Linux: `.config/Claude/claude_desktop_config.json` **REST-based MCP** + ```json label="claude_desktop_config.json" { "mcpServers": { @@ -34,6 +35,7 @@ Create or edit your `claude_desktop_config.json` file. ``` **SQL-based MCP** + ```json label="claude_desktop_config.json" { "mcpServers": { @@ -48,8 +50,7 @@ Create or edit your `claude_desktop_config.json` file. } ``` -> [!NOTE] -> The previous `--sse-url` option is deprecated, use `--remote-url`. +> [!NOTE] The previous `--sse-url` option is deprecated, use `--remote-url`. ## Troubleshooting diff --git a/website/src/pages/en/ai-suite/token-api-mcp/cline.mdx b/website/src/pages/en/ai-suite/token-api-mcp/cline.mdx index 70ececb19376..54de61493bc9 100644 --- a/website/src/pages/en/ai-suite/token-api-mcp/cline.mdx +++ b/website/src/pages/en/ai-suite/token-api-mcp/cline.mdx @@ -19,6 +19,7 @@ Create or edit your `cline_mcp_settings.json` file. > **MCP Servers** > **Installed** > **Configure MCP Servers** **REST-based MCP** + ```json label="cline_mcp_settings.json" { "mcpServers": { @@ -34,6 +35,7 @@ Create or edit your `cline_mcp_settings.json` file. ``` **SQL-based MCP** + ```json label="cline_mcp_settings.json" { "mcpServers": { @@ -48,8 +50,7 @@ Create or edit your `cline_mcp_settings.json` file. } ``` -> [!NOTE] -> The previous `--sse-url` option is deprecated, use `--remote-url`. +> [!NOTE] The previous `--sse-url` option is deprecated, use `--remote-url`. ## Troubleshooting diff --git a/website/src/pages/en/ai-suite/token-api-mcp/cursor.mdx b/website/src/pages/en/ai-suite/token-api-mcp/cursor.mdx index 46900ed2861b..46cf77aad171 100644 --- a/website/src/pages/en/ai-suite/token-api-mcp/cursor.mdx +++ b/website/src/pages/en/ai-suite/token-api-mcp/cursor.mdx @@ -19,6 +19,7 @@ Create or edit your `~/.cursor/mcp.json` file. > **Cursor Settings** > **MCP** > **Add new global MCP Server** **REST-based MCP** + ```json label="mcp.json" { "mcpServers": { @@ -34,6 +35,7 @@ Create or edit your `~/.cursor/mcp.json` file. ``` **SQL-based MCP** + ```json label="mcp.json" { "mcpServers": { diff --git a/website/src/pages/en/ai-suite/token-api-mcp/introduction.mdx b/website/src/pages/en/ai-suite/token-api-mcp/introduction.mdx index 895c52b5813b..fad4bba917c0 100644 --- a/website/src/pages/en/ai-suite/token-api-mcp/introduction.mdx +++ b/website/src/pages/en/ai-suite/token-api-mcp/introduction.mdx @@ -8,10 +8,11 @@ Token API MCP server is an open-source implementation of [Anthropic's Model Cont This MCP server makes on-chain token data, including metadata, balances, transfers, and holder statistics, accessible through a set of MCP tools. Any compatible client can use these tools to fetch and analyze token information through a standardized interface. It connects to The Graph's hosted Token API database, enabling AI assistants to query blockchain data using natural language requests. There are two types of MCP available for use: + - A REST-based MCP, the default, that communicates with the Token API. - A SQL-based MCP, for advanced users, that allows for communicating with the backend databases that power the Token API. -The REST-based MCP simply exposes the API endpoints to your LLM based on the OpenAPI specification (available at https://token-api.thegraph.com/openapi). It is the *recommended way* to set up an LLM with Token API as the set of tools it offers is straightforward to use for any language model. Additionnaly, it automatically stays up-to-date with new Token API releases so you don't miss any new features! +The REST-based MCP simply exposes the API endpoints to your LLM based on the OpenAPI specification (available at https://token-api.thegraph.com/openapi). It is the _recommended way_ to set up an LLM with Token API as the set of tools it offers is straightforward to use for any language model. Additionnaly, it automatically stays up-to-date with new Token API releases so you don't miss any new features! The SQL-based MCP provides the LLM tools to list databases and tables as well as run SQL queries directly on the data. It is meant for advanced users who need different use cases that the standard API endpoints cannot replicate. For best results, it is advised to use an LLM model specifically tuned for working with SQL as general purpose LLMs models (like Sonnet, Gemini, etc.) might not be able to generate valid queries efficiently. diff --git a/website/src/pages/en/token-api/faq.mdx b/website/src/pages/en/token-api/faq.mdx index 0e0c37ce655e..99dc813fecff 100644 --- a/website/src/pages/en/token-api/faq.mdx +++ b/website/src/pages/en/token-api/faq.mdx @@ -292,6 +292,7 @@ No, these are optional. MCP is an advanced feature allowing AI assistants to int ### How do I choose between the REST-MCP and the SQL-MCP and which one should I use? To use one or the other, you need to supply the adequate URL in your configuration file (see the [docs](https://thegraph.com/docs/en/ai-suite/token-api-mcp/introduction/) for how to set up your configuration): + - `https://token-api.mcp.thegraph.com/` is for the REST-MCP - `https://token-api.mcp.thegraph.com/sql` is for the SQL-MCP