CoinMarketCap Fear & Greed Index

by heyzgj

1 stars
Not rated
GitHub

About

Integrates with CoinMarketCap API to provide real-time cryptocurrency data, market metrics, and Fear & Greed Index through TypeScript tools with smart caching and detailed error handling.

Details

Author
heyzgj
Repository
heyzgj/mcp-feargreedindex
GitHub stars
1
Categories
Design, Developer Tools, AI, API, Knowledge Base, Infrastructure, Frontend

- Comprehensive API Coverage: Access to multiple CoinMarketCap API endpoints
- Smart Caching: Reduces API calls and improves performance
- Type Safety: Full TypeScript support with comprehensive type definitions
- Modular Design: Easy to extend and maintain
- Detailed Error Handling: Clear error messages and logging

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name CoinMarketCap Fear & Greed Index
    Command (node, npx, python, etc.) node
    Arguments
    • Argument 1 ABSOLUTE PATH/dist/index.js
    Environment
    • CACHE_TTL 300
    • CMC_API_KEY YOUR_COINMARKETCAP_API_KEY
    • CACHE_ENABLED true

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

get_cryptocurrency_listings

Get latest cryptocurrency listings. Parameters: limit (integer), convert (optional string)

get_cryptocurrency_quotes

Get quotes for specific cryptocurrencies. Parameters: symbol (string), convert (optional string)

get_cryptocurrency_info

Get metadata for cryptocurrencies. Parameters: id (string)

get_cryptocurrency_market_pairs

Get market pairs for a cryptocurrency. Parameters: id (string)

get_cryptocurrency_ohlcv

Get historical OHLCV data. Parameters: id (string), convert (optional string)

convert_cryptocurrency

Convert between cryptocurrencies and fiat currencies. Parameters: amount (number), from (string), to (string)

get_exchange_listings

Get latest exchange listings.

get_exchange_info

Get detailed exchange information. Parameters: id (string)

get_exchange_map

Get a map of all exchanges.

get_global_metrics

Get global cryptocurrency market metrics. Parameters: convert (optional string)

get_fear_greed_index

Get Fear & Greed Index data. Parameters: limit (optional integer)

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "coinmarketcap fear & greed index": {
            "env": {
                "CACHE_TTL": "300",
                "CMC_API_KEY": "YOUR_COINMARKETCAP_API_KEY",
                "CACHE_ENABLED": "true"
            },
            "args": [
                "ABSOLUTE PATH/dist/index.js"
            ],
            "command": "node"
        }
    }
}

Linux

{
    "env": {
        "CACHE_TTL": "300",
        "CMC_API_KEY": "YOUR_COINMARKETCAP_API_KEY",
        "CACHE_ENABLED": "true"
    },
    "args": [
        "ABSOLUTE PATH/dist/index.js"
    ],
    "command": "node"
}

Macos

{
    "env": {
        "CACHE_TTL": "300",
        "CMC_API_KEY": "YOUR_COINMARKETCAP_API_KEY",
        "CACHE_ENABLED": "true"
    },
    "args": [
        "ABSOLUTE PATH/dist/index.js"
    ],
    "command": "node"
}

Windows

{
    "env": {
        "CACHE_TTL": "300",
        "CMC_API_KEY": "YOUR_COINMARKETCAP_API_KEY",
        "CACHE_ENABLED": "true"
    },
    "args": [
        "ABSOLUTE PATH/dist/index.js"
    ],
    "command": "node"
}

CoinMarketCap Universal MCP Server

This project is a Model Context Protocol (MCP) server that provides comprehensive access to CoinMarketCap's cryptocurrency data. It is designed to be easily integrated into Cursor, allowing you to access a wide range of cryptocurrency data directly within the Cursor environment.

Features

- Comprehensive API Coverage: Access to multiple CoinMarketCap API endpoints
- Smart Caching: Reduces API calls and improves performance
- Type Safety: Full TypeScript support with comprehensive type definitions
- Modular Design: Easy to extend and maintain
- Detailed Error Handling: Clear error messages and logging

Available Tools

Cryptocurrency Data

- get_cryptocurrency_listings - Get latest cryptocurrency listings - get_cryptocurrency_quotes - Get quotes for specific cryptocurrencies - get_cryptocurrency_info - Get metadata for cryptocurrencies - get_cryptocurrency_market_pairs - Get market pairs for a cryptocurrency - get_cryptocurrency_ohlcv - Get historical OHLCV data - convert_cryptocurrency - Convert between cryptocurrencies and fiat currencies

Exchange Data

- get_exchange_listings - Get latest exchange listings - get_exchange_info - Get detailed exchange information - get_exchange_map - Get a map of all exchanges

Global Market Data

- get_global_metrics - Get global cryptocurrency market metrics

Market Sentiment

- get_fear_greed_index - Get Fear & Greed Index data

How to Add to Cursor MCP

This project is built to seamlessly integrate with Cursor's MCP functionality. Here's how to add it:

1. Clone the repository and enter the project directory:

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

2. Install dependencies:

   npm install
   

3. Set up environment variables:

Create a .env file in the project root directory.
Add your CoinMarketCap API key:

     CMC_API_KEY=YOUR_COINMARKETCAP_API_KEY
     CACHE_ENABLED=true
     CACHE_TTL=300
     

Replace YOUR_COINMARKETCAP_API_KEY with your actual API key.

4. Build and run the server:
Development environment:

     npm run dev

Production environment:
     npm run build
npm start

5. Add to Cursor:
Open Cursor.
Go to Settings > MCP.
Add a new server with the following configuration:
Type: COMMAND
* Command: node ABSOLUTE PATH/dist/index.js

Now, you can use all the available tools directly in Cursor to access CoinMarketCap data!

Usage Examples

Get the latest cryptocurrency listings

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

Get quotes for specific cryptocurrencies

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

Get the Fear & Greed Index

get_fear_greed_index({
  limit: 7
})

Get global market metrics

get_global_metrics({
  convert: "USD"
})

Troubleshooting

If you encounter issues:

1. Make sure you have a valid CoinMarketCap API key
2. Check that the .env file is correctly configured
3. Review the console logs for detailed error information
4. Ensure your API plan has access to the endpoints you're trying to use

License

MIT

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.