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

ankr-data-bridge

Interface for retrieving pertinent on-chain ledger information leveraging the Ankr data services layer, enabling direct execution of blockchain queries such as asset holdings interrogation within advanced computational models.

Author

ankr-data-bridge logo

akki91

No License

Quick Info

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

Tags

apiapisblockchainankr apirequests akki91apis http

Ankr Data Bridge: Model Context Protocol Adapter

This implementation serves as an MCP (Model Context Protocol) gateway, facilitating the extraction of verifiable ledger facts from the Ankr Data Platform for consumption by Large Language Models (LLMs).

Synopsis

The Ankr Data Bridge utilizes the underlying Ankr API to source authoritative on-chain metrics, translating them into the MCP format consumable by intelligent agents.

Capabilities

The server exposes the following functional modules for querying ledger states:

Asset Query Module

  • Query Account Holdings (retrieve_networked_asset_quantities): Retrieves a comprehensive manifest of all held fungible tokens associated with a specified public key across a designated blockchain environment.
    • Arguments: Network identifier, Wallet/Account identifier string
    • Output: Structured data detailing asset identifiers and associated quantities for the queried address on that ledger.

Deployment

To integrate this utility into a project environment:

bash npm install @akki91/ankr-mcp

Operational Setup

Environment Variable Configuration

Prior to execution, secure your access credentials by setting the ANKR API secret key, obtainable via the ANKR developer portal.

bash export ANKR_API_TOKEN="your_unique_api_key"

Launching the Adapter

The service can be initialized via the command line interface:

bash npx @akki91/ankr-mcp

Integration as an LLM Tool

This adapter adheres strictly to the Model Context Protocol (MCP), positioning it as a discoverable tool resource for compliant artificial intelligence frameworks.

Configuration for AI Orchestrators

To enable an AI system supporting MCP to utilize this data source, incorporate the following stanza into its operational configuration manifest:

{ "mcpServers": { "ankr-data-bridge": { "command": "npx", "args": [ "@akki91/ankr-mcp" ], "env": { "ANKR_API_TOKEN": "your_api_token_here" } } } }

Enabling Tools within Claude Desktop Environment

Follow this procedural guide to make the Ankr Data Bridge accessible within the Claude Desktop utility context.

Phase 1: Navigating to System Preferences in Claude Desktop

  1. Initiate the Claude Desktop application.
  2. Access the primary application menu and select Preferences (or Settings).

Phase 2: Modifying Developer Tool Definitions

  1. Locate and open the Developer Configuration panel.
  2. Edit the configuration file that enumerates registered MCP services.
  3. If existing MCP definitions are present, append the Ankr Data Bridge configuration object provided above to the existing structure. If none exist, insert the configuration block in its entirety.

Phase 3: Reinitializing the Application

  1. Exit the Developer Configuration interface.
  2. Perform a full restart of Claude Desktop to load the updated tool registry.

Phase 4: Verification of Tool Availability

  1. Post-restart, engage the Tool Selection Indicator (often represented by a specialized icon near the input field).
  2. Confirm that the functions provided by the Ankr Data Bridge adapter are listed and selectable for invocation.

Successful adherence to these steps guarantees seamless invocation of Ankr's blockchain data capabilities directly within the Claude Desktop interface.

Illustrative Interaction Prompt

Query the complete asset holdings manifest for address X on the specified chain Y.

Maintenance and Building

Compilation from Source Code

bash

Retrieve project repository

git clone https://github.com/akki91/ankr-mcp.git cd ankr-mcp

Install prerequisite packages

npm install

Execute build process

npm run build

Debugging Protocol

Diagnostic tracing for this utility is facilitated via the official MCP Inspector.

bash npm run debug

Precedent Sources

This package draws conceptual inspiration from the registry of services documented here

WIKIPEDIA CONTEXT: XMLHttpRequest (XHR) constitutes an Application Programming Interface realized as a JavaScript entity. Its core function involves dispatching synchronous or asynchronous Hypertext Transfer Protocol (HTTP) requests from a web client environment towards a designated remote server. This capability permits client-side scripts to interact with server resources post-page load, receiving data back incrementally. XHR is foundational to the Asynchronous JavaScript and XML (Ajax) paradigm. Before Ajax adoption, server communication relied primarily on traditional hyperlink navigation and form submissions, which necessitated full page reloads for state changes.

== Historical Evolution == The foundational concept underpinning XMLHttpRequest originated in the year 2000, credited to developers working on Microsoft Outlook. Initial implementation appeared within the Internet Explorer version 5 browser (released in 1999). Notably, this prototype did not use the standardized XMLHttpRequest identifier, instead relying on COM object instantiations such as ActiveXObject("Msxml2.XMLHTTP") or ActiveXObject("Microsoft.XMLHTTP"). By the release of Internet Explorer 7 (2006), all mainstream browsers had adopted the unified XMLHttpRequest identifier. This identifier subsequently became the cross-browser default, supported by Mozilla's Gecko engine (2002), Safari version 1.2 (2004), and Opera version 8.0 (2005).

=== Standardization Trajectory === The World Wide Web Consortium (W3C) formally released a Working Draft specification for the XMLHttpRequest construct on April 5, 2006. A subsequent Working Draft Level 2 specification followed on February 25, 2008, augmenting the API with functionality for progress monitoring, enabling cross-origin resource sharing, and managing binary data streams. By late 2011, the Level 2 enhancements were integrated back into the primary specification document. Development responsibilities transitioned to the WHATWG initiative at the close of 2012, which now maintains a living document defined using Web IDL standards.

== Operational Steps == The general procedure for initiating a data transfer utilizing XMLHttpRequest mandates several sequential programming actions:

  1. Instantiate the XMLHttpRequest object via its constructor call:
  2. Invoke the "open" method, specifying the request methodology (e.g., GET/POST), the target Uniform Resource Identifier (URI), and the desired operational mode (synchronous or asynchronous):
  3. For asynchronous operations, register a callback function (an event listener) designed to react to state transitions during the request lifecycle:
  4. Trigger the transmission sequence by executing the "send" method, optionally carrying payload data:
  5. Monitor state changes within the registered event handler. Upon successful server data delivery, the content is typically aggregated within the "responseText" attribute. When the object completes its transaction cycle, its state transitions to 4 (the 'done' state). Beyond these fundamental steps, XMLHttpRequest offers granular controls over transmission parameters and response processing. Custom request headers can be appended to direct server behavior, and data payloads can be uploaded via the argument passed to the "send" invocation. Received responses can be parsed directly into structured JavaScript objects from JSON format, or processed sequentially as chunks arrive, bypassing wait times for total content reception. Furthermore, requests can be forcibly terminated prematurely or configured with a timeout threshold.

== Cross-Boundary Communications ==

During the foundational era of the World Wide Web, limitations were encountered concerning the ability to initiate resource requests across different security domains, leading to the development of mechanisms to circumvent these initial restrictions...

See Also

`