TheGraph MCP Server logo

TheGraph MCP Server

Community
kukapay

An MCP server that powers AI agents with indexed blockchain data from The Graph.

Publisherkukapay
Repositorythegraph-mcp
LanguagePython
Forks
12
Stars
9
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    TheGraph MCP Server exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    9 stars and 12 forks from the linked repository.

TheGraph MCP Server

An MCP server that powers AI agents with indexed blockchain data from The Graph.

GitHub License GitHub Last Commit Python Version

Available Tools

1. getSubgraphSchema

Fetches the schema of a specified subgraph, providing AI agents with the context needed to generate GraphQL queries.

Parameters:

  • subgraphId: The subgraph ID (e.g., "QmZBQcF...")
  • asText: Output format flag
    • true: Returns human-readable GraphQL schema
    • false: Returns JSON schema (default)

2. querySubgraph

Executes GraphQL queries against a specified subgraph. While queries are typically generated by AI, you can also manually craft your own.

Parameters:

  • subgraphId: The subgraph ID
  • query: GraphQL query string

Installation

  1. Clone the Repository
    bash
    git clone https://github.com/kukapay/thegraph-mcp.git
  2. Client Configuration
    json
    {
      "mcpServers": {
        "thegraph-mcp": {
          "command": "uv",
          "args": ["--directory", "path/to/thegraph-mcp", "run", "main.py"],
          "env": {
            "THEGRAPH_API_KEY": "your_api_key_here"
          }
        }
      }
    }

Example Prompts

Here are some natural language prompts to trigger the tools:

Schema Queries

  • "Show me the schema for subgraph QmZBQcF... in a readable format"
  • "What's the structure of the QmZBQcF... subgraph? Please display it in GraphQL format"
  • "I need to understand the data model of subgraph QmZBQcF..., can you fetch its schema?"

Data Queries

  • "Find the top 5 tokens by trading volume in the last 24 hours from subgraph QmZBQcF..."
  • "Show me all pairs with liquidity greater than 1 million USD in subgraph QmZBQcF..."
  • "Get the latest 10 swap events from the QmZBQcF... subgraph, including token symbols and amounts"

Analysis Tasks

  • "Analyze the trading volume of USDT pairs in the last week using subgraph QmZBQcF..."
  • "Compare the liquidity of ETH and USDC pairs in subgraph QmZBQcF..."
  • "Find unusual trading patterns in the last 24 hours from subgraph QmZBQcF..."

Combined Tasks

  • "First get the schema of QmZBQcF..., then help me write a query to find high-value transactions"
  • "Check the schema of QmZBQcF... and tell me what fields are available for querying token prices"
  • "Using subgraph QmZBQcF..., analyze the market impact of large trades by first understanding the schema and then querying relevant events"

License

This project is licensed under the MIT License. See the LICENSE file for details.

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "kukapay-thegraph-mcp": {
      "command": "",
      "args": []
    }
  }
}

Use TheGraph MCP Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once TheGraph MCP Server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add TheGraph MCP Server as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the TheGraph MCP Server MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "kukapay-thegraph-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "thegraph-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the TheGraph MCP Server MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the TheGraph MCP Server MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use TheGraph MCP Server to help me with this task?
TheGraph MCP Server
Sure. I read it.
Here is what I found using TheGraph MCP Server.

Frequently asked questions

What is the TheGraph MCP Server MCP server used for?

TheGraph MCP Server is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use TheGraph MCP Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use TheGraph MCP Server with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use TheGraph MCP Server MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With TheGraph MCP Server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect TheGraph MCP Server MCP to TypingMind?

TheGraph MCP Server runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does TheGraph MCP Server MCP provide in TypingMind?

TheGraph MCP Server exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use TheGraph MCP Server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If TheGraph MCP Server requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇