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

cmc-crypto-data-retriever

Provides programmatic access to extensive cryptocurrency market intelligence sourced from CoinMarketCap, encompassing asset listings, real-time valuations, and trading pair details. Features built-in intelligent data caching and strict compile-time typing to optimize interaction speed and developer experience.

Author

cmc-crypto-data-retriever logo

heyzgj

No License

Quick Info

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

Tags

coinmarketcapfeargreedindexapisdata coinmarketcapcoinmarketcap includingfeargreedindex provides

CoinMarketCap Data Access Layer for MCP

This implementation serves as a Model Context Protocol (MCP) gateway, facilitating seamless integration with the vast reservoir of CoinMarketCap's digital asset statistics directly within the Cursor IDE environment. It is engineered for straightforward incorporation into Cursor workflows.

Core Capabilities

  • Broad API Surface Area: Connects to numerous CoinMarketCap data endpoints.
  • Optimized Retrieval: Leverages sophisticated data caching mechanisms to minimize redundant external API invocation.
  • Type Safety Assurance: Complete TypeScript support, fortified with exhaustive data structure definitions.
  • Architectural Modularity: Designed for ease of future expansion and upkeep.
  • Robust Error Management: Delivers precise diagnostics and logging for operational issues.

Accessible Data Functions

Asset Information

  • get_cryptocurrency_listings - Retrieve the current catalog of listed digital assets.
  • get_cryptocurrency_quotes - Fetch the latest market quotations for specified tokens.
  • get_cryptocurrency_info - Obtain comprehensive descriptive metadata for cryptocurrencies.
  • get_cryptocurrency_market_pairs - Acquire the active trading venue pairings for a given asset.
  • get_cryptocurrency_ohlcv - Access historical Open, High, Low, Close, Volume data.
  • convert_cryptocurrency - Execute conversions between various digital assets and established fiat currencies.

Exchange Metrics

  • get_exchange_listings - View the most recent directory of recognized exchanges.
  • get_exchange_info - Drill down into specific exchange operational details.
  • get_exchange_map - Secure a mapping index of all supported trading platforms.

Worldwide Market Overviews

  • get_global_metrics - Retrieve aggregate statistics reflecting the entire crypto market landscape.

Market Psychology Indicators

  • get_fear_greed_index - Fetch indicators gauging prevailing investor sentiment (Fear & Greed).

Integration Procedure within Cursor MCP

This utility is architected for frictionless deployment within Cursor's native MCP framework. Follow these steps for incorporation:

  1. Repository Checkout and Navigation:

bash git clone https://github.com/yourusername/coinmarketcap-mcp.git cd coinmarketcap-mcp

  1. Dependency Installation:

bash npm install

  1. Environment Configuration:

  2. Establish a .env file at the project's root level.

  3. Inject your required CoinMarketCap access credential:

    CMC_API_KEY=YOUR_COINMARKETCAP_API_KEY CACHE_ENABLED=true CACHE_TTL=300

    Substitute YOUR_COINMARKETCAP_API_KEY with your valid key.

  4. Execution Strategy:

  5. Development Mode: bash npm run dev

  6. Production Deployment: bash npm run build npm start

  7. Cursor MCP Registration:

  8. Launch the Cursor application.
  9. Navigate to Settings -> MCP Configuration.
  10. Introduce a novel server entry with these parameters:
    • Type: COMMAND
    • Command: node ABSOLUTE PATH/dist/index.js

Once configured, all exposed functions become immediately invocable within Cursor for CoinMarketCap data access!

Operational Illustrations

Fetching Top Asset Listings

js get_cryptocurrency_listings({ limit: 10, convert: "USD" })

Querying Specific Asset Valuations

js get_cryptocurrency_quotes({ symbol: "BTC,ETH,SOL", convert: "USD" })

Retrieving Market Sentiment Readings

js get_fear_greed_index({ limit: 7 })

Accessing Global Market Summaries

js get_global_metrics({ convert: "USD" })

Debugging Guidance

If operational anomalies arise, verify the following:

  1. Confirmation of a valid CoinMarketCap credential.
  2. Integrity check on the .env variable setup.
  3. Inspection of console output for granular diagnostic feedback.
  4. Verification that your current API subscription tier authorizes access to the requested endpoints.

Licensing

Distributed under the MIT License.

WIKIPEDIA: XMLHttpRequest (XHR) constitutes an Application Programming Interface embodied by a JavaScript object, facilitating the transmission of Hypertext Transfer Protocol requests from a web browser to a server process. Its methods enable browser-based applications to submit queries subsequent to page rendering finalization and subsequently receive data back. XMLHttpRequest is foundational to the principles of Ajax programming. Preceding Ajax, the primary means of server interaction involved hyperlink navigation and form submission, frequently resulting in a complete replacement of the current viewport content.

== Background == The conceptual underpinning for XMLHttpRequest emerged in the year 2000, conceptualized by the engineering staff at Microsoft Outlook development. This notion was subsequently realized in the Internet Explorer 5 browser release (1999). However, the initial syntax did not employ the standard XMLHttpRequest identifier; instead, developers utilized the object instantiation syntax ActiveXObject("Msxml2.XMLHTTP") or ActiveXObject("Microsoft.XMLHTTP"). As of Internet Explorer 7 (2006), universal browser compliance with the XMLHttpRequest identifier was established. The XMLHttpRequest identifier has since solidified its position as the prevailing convention across all major web rendering engines, including Mozilla's Gecko (2002), Safari 1.2 (2004), and Opera 8.0 (2005).

=== Formal Standardization === The World Wide Web Consortium (W3C) published an initial Working Draft specification for the XMLHttpRequest object on April 5, 2006. A subsequent Level 2 specification was released by the W3C on February 25, 2008. Level 2 introduced enhancements such as event progress monitoring capabilities, provisions for cross-origin resource sharing, and mechanisms for managing raw byte streams. By the conclusion of 2011, the Level 2 specification components were integrated back into the primary document. Towards the end of 2012, stewardship of the specification transitioned to the WHATWG, which now maintains the document as a living standard documented using Web IDL syntax.

== Utilization == Typically, executing a data request utilizing XMLHttpRequest involves a sequence of distinct programming actions.

Instantiate the XMLHttpRequest object via its designated constructor: Invoke the open method to dictate the request methodology (e.g., GET, POST), specify the target Uniform Resource Identifier, and determine whether the operation will be executed synchronously or asynchronously: For asynchronous transactions, establish an event handler function designed to be triggered upon state transitions of the request object: Commence the transfer by calling the send method, optionally providing payload data: Process the state changes within the designated event listener. Upon successful receipt of server response data, this information is typically aggregated within the responseText attribute. When the object completes all processing cycles, its status transitions to state 4, signifying the 'done' state. Beyond these fundamental steps, XMLHttpRequest offers numerous configurable parameters to govern request transmission protocols and response handling strategies. Custom HTTP headers can be prepended to the outbound request to influence server behavior, and data can be uploaded to the server via content passed to the send invocation. The received payload is capable of being deserialized from JSON format into an immediately usable JavaScript structure, or processed incrementally as data streams arrive rather than awaiting full content completion. The request pathway can be preemptively terminated or configured to timeout if completion thresholds are not met within a predefined duration.

== Inter-Origin Transactions ==

See Also

`