Docs
Buscar⌘ K
  • Início
  • Sobre o The Graph
  • Redes Apoiadas
  • Contratos de Protocolo
  • Subgraphs
    • Substreams
      • Token API
        • AI Suite
          • Indexação
            • Recursos
              AI Suite > Token API MCP

              Using Claude Desktop to Access the Token API via MCP

              Prerequisites

              • Claude Desktop⁠ installed.
              • A JWT token from The Graph Market⁠.
              • npx⁠ or bunx⁠ installed and available in your path.
              • The @pinax/mcp package requires Node 18+, as it relies on built-in fetch() / Headers, which are not available in Node 17 or older. You may need to specify an exact path to an up-to-date Node version, or uninstall previous versions of Node to ensure @pinax/mcp uses the correct version.
              Screenshot of Claude Desktop's settings panel showing the MCP server configuration option.

              Configuration

              Create or edit 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
              claude_desktop_config.json
              1{2  "mcpServers": {3    "token-api": {4      "command": "npx",5      "args": ["@pinax/mcp", "--sse-url", "https://token-api.mcp.thegraph.com/sse"],6      "env": {7        "ACCESS_TOKEN": "<https://thegraph.market JWT Access Token>"8      }9    }10  }11}

              Troubleshooting

              To enable logs for the MCP, use the --verbose true option.

              ENOENT

              Error dialog in Claude Desktop showing 'ENOENT' system error, indicating the npx/bunx command wasn't found in the system path.

              Try to use the full path of the command instead:

              • Run which npx or which bunx to get the path of the command.
              • Replace npx or bunx in the configuration file with the full path (e.g. /home/user/bin/bunx).

              Server disconnected

              Connection error notification in Claude Desktop displaying 'Server disconnected' message.

              Double-check your API key otherwise look in your navigator if https://token-api.mcp.thegraph.com/sse is reachable.

              You can always have a look at the full logs under Claude/logs/mcp.log and Claude/logs/mcp-server-pinax.log for more details.

              ⁠Editar no GitHub⁠

              IntroductionCline
              Nesta página
              • Prerequisites
              • Configuration
              • Troubleshooting
              • ENOENT
              • Server disconnected
              The GraphStatusRede de TestesAtivos de MarcaFórumSegurançaPolítica de PrivacidadeAcordo de Serviço