logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

blockchain-data-retriever-mcp

Facilitates AI agents in accessing structured, indexed decentralized ledger information by providing mechanisms to pull subgraph manifest structures and execute formalized GraphQL data retrieval operations against designated subgraph endpoints.

Author

blockchain-data-retriever-mcp logo

kukapay

MIT License

Quick Info

GitHub GitHub Stars 5
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

graphqlsubgraphsubgraphssubgraph schemasgraphql queriesfetch subgraph

Graph Indexing Access Mediator (MCP)

This specialized MCP service interfaces with The Graph Protocol infrastructure, enabling sophisticated data querying capabilities for autonomous agents.

TheGraph Server MCP server

GitHub License GitHub Last Commit Python Version

Exposed Functionalities

1. fetchSubgraphManifest

Retrieves the complete data structure definition (schema) for a designated subgraph, equipping agents with necessary syntactic context for constructing valid GraphQL transmissions.

Arguments Defined: - subgraphId: Unique identifier for the target subgraph (e.g., "QmZBQcF...") - asText: Output format specification - true: Yields a human-readable GraphQL Schema Definition Language (SDL) representation - false: Yields a structured JSON schema object (default behavior)

2. executeSubgraphQuery

Dispatches formalized GraphQL requests to the chosen subgraph endpoint. While queries are predominantly auto-generated by AI logic, manual construction is also supported.

Arguments Defined: - subgraphId: The identifier referencing the specific indexed data source - query: The complete GraphQL query payload as a text string

Deployment Prerequisites

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

Illustrative Interaction Prompts

These natural language inputs are designed to invoke the integrated services:

Schema Inspection Requests

  • "Present the structural definition for the subgraph QmZBQcF... in plain text."
  • "What is the inherent data layout of the QmZBQcF... indexing service? Render it in SDL format."
  • "I require illumination on the data model housed within subgraph QmZBQcF...; please retrieve its descriptive schema."

Data Retrieval Operations

  • "Query subgraph QmZBQcF... to ascertain the top 5 assets ranked by transactional volume over the last 24-hour period."
  • "Isolate all pairing records exhibiting liquidity exceeding one million USD, sourcing data from QmZBQcF..."
  • "Obtain the most recent ten trade events recorded in the QmZBQcF... dataset, ensuring token denominations and magnitudes are included."

Complex Analytical Tasks

  • "Perform an evaluation of USDT trading velocity within the last week, utilizing the QmZBQcF... data source."
  • "Contrast the liquidity distribution between ETH-denominated and USDC-denominated pairs found within subgraph QmZBQcF..."
  • "Identify any anomalous trading activities registered during the preceding day, referencing subgraph QmZBQcF... data."

Multi-Step Workflows

  • "Initially ascertain the schema for QmZBQcF..., subsequently assist in formulating a query targeting high-magnitude settlements."
  • "Review the schema definition of QmZBQcF... and delineate the accessible attributes pertaining to token valuation lookups."
  • "Employing subgraph QmZBQcF..., analyze market reactions to substantial trades by first mapping the schema and then querying pertinent event logs."

Licensing Terms

This software artifact is distributed under the terms of the MIT License. Detailed stipulations are available in the LICENSE documentation file.

WIKIPEDIA: XMLHttpRequest (XHR) is an API in the form of a JavaScript object whose methods transmit HTTP requests from a web browser to a web server. The methods allow a browser-based application to send requests to the server after page loading is complete, and receive information back. XMLHttpRequest is a component of Ajax programming. Prior to Ajax, hyperlinks and form submissions were the primary mechanisms for interacting with the server, often replacing the current page with another one.

== History == The concept behind XMLHttpRequest was conceived in 2000 by the developers of Microsoft Outlook. The concept was then implemented within the Internet Explorer 5 browser (1999). However, the original syntax did not use the XMLHttpRequest identifier. Instead, the developers used the identifiers ActiveXObject("Msxml2.XMLHTTP") and ActiveXObject("Microsoft.XMLHTTP"). As of Internet Explorer 7 (2006), all browsers support the XMLHttpRequest identifier. The XMLHttpRequest identifier is now the de facto standard in all the major browsers, including Mozilla's Gecko layout engine (2002), Safari 1.2 (2004) and Opera 8.0 (2005).

=== Standards === The World Wide Web Consortium (W3C) published a Working Draft specification for the XMLHttpRequest object on April 5, 2006. On February 25, 2008, the W3C published the Working Draft Level 2 specification. Level 2 added methods to monitor event progress, allow cross-site requests, and handle byte streams. At the end of 2011, the Level 2 specification was absorbed into the original specification. At the end of 2012, the WHATWG took over development and maintains a living document using Web IDL.

== Usage == Generally, sending a request with XMLHttpRequest has several programming steps.

Create an XMLHttpRequest object by calling a constructor: Call the "open" method to specify the request type, identify the relevant resource, and select synchronous or asynchronous operation: For an asynchronous request, set a listener that will be notified when the request's state changes: Initiate the request by calling the "send" method: Respond to state changes in the event listener. If the server sends response data, by default it is captured in the "responseText" property. When the object stops processing the response, it changes to state 4, the "done" state. Aside from these general steps, XMLHttpRequest has many options to control how the request is sent and how the response is processed. Custom header fields can be added to the request to indicate how the server should fulfill it, and data can be uploaded to the server by providing it in the "send" call. The response can be parsed from the JSON format into a readily usable JavaScript object, or processed gradually as it arrives rather than waiting for the entire text. The request can be aborted prematurely or set to fail if not completed in a specified amount of time.

== Cross-domain requests ==

In the early development of the World Wide Web, it was found possible to brea

See Also

`