MCP Crypto Server

by yanqinghao

303 downloads Not rated yet MIT license
GitHub

About

# MCP Crypto Server A high-performance cryptocurrency market data and analysis platform built with FastMCP, CCXT, TimescaleDB, and RSS feed integration. ## Overview MCP Crypto Server is a powerful platform that provides real-time cryptocurrency market data, advanced analytics, LLM-powered insights, and crypto news…

Details

License
MIT license

Explore

- Real-time Market Data: Access live cryptocurrency market data from multiple exchanges
- Historical Data Analysis: Query and analyze historical price and volume data
- LLM Integration: Leverage AI for market trend analysis and insights
- MCP Protocol Support: Easily integrate with AI applications using the Model Context Protocol
- Scalable Architecture: Handle high request volumes with optimized performance
- TimescaleDB Storage: Efficient time-series data storage and querying
- Multi-Exchange Support: Connect to various cryptocurrency exchanges via CCXT
- Crypto News Aggregation: Collect and analyze news from multiple crypto RSS feeds
- News Sentiment Analysis: AI-powered sentiment analysis of crypto news
- Custom RSS Feed Subscriptions: Configure and manage news sources

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 MCP Crypto Server
    Command (node, npx, python, etc.)

    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

From the repository

- Python 3.9+
- Docker and Docker Compose
- uv package manager


The system comes with predefined crypto news sources, but you can customize them:

python

RSS_FEEDS = [
{
"name": "CoinDesk",
"url": "https://www.coindesk.com/arc/outboundfeeds/rss/",
"update_interval": 900, # 15 minutes
"categories": ["news", "markets", "business"]
},
{
"name": "Cointelegraph",
"url": "https://cointelegraph.com/rss",
"update_interval": 600, # 10 minutes
"categories": ["news", "analysis"]
},

market_analysis

Analyze market trends and provide technical indicators

price_data

Get real-time or historical price data for specific cryptocurrencies

llm_analysis

Generate AI-driven market insights and predictions

news_analysis

Analyze news sentiment and impact on specific coins

news_summary

Generate summaries of recent crypto news

- market_analysis - Analyze market trends and provide technical indicators
- price_data - Get real-time or historical price data for specific cryptocurrencies
- llm_analysis - Generate AI-driven market insights and predictions
- news_analysis - Analyze news sentiment and impact on specific coins
- news_summary - Generate summaries of recent crypto news

Claude Desktop / Cursor

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

{
    "mcpServers": {
        "mcp crypto server": {
            "mcp-crypto-server-yanqinghao": {
                "command": "uv",
                "args": [
                    "venv"
                ]
            }
        }
    }
}

McpServers

{
    "mcp-crypto-server-yanqinghao": {
        "command": "uv",
        "args": [
            "venv"
        ]
    }
}

A high-performance cryptocurrency market data and analysis platform built with FastMCP, CCXT, TimescaleDB, and RSS feed integration.

Overview

MCP Crypto Server is a powerful platform that provides real-time cryptocurrency market data, advanced analytics, LLM-powered insights, and crypto news aggregation. Built on the Model Context Protocol (MCP), it enables seamless integration with AI applications while offering robust cryptocurrency exchange connectivity via CCXT, time-series data storage with TimescaleDB, and real-time news updates through RSS feeds.

Key Features

- Real-time Market Data: Access live cryptocurrency market data from multiple exchanges
- Historical Data Analysis: Query and analyze historical price and volume data
- LLM Integration: Leverage AI for market trend analysis and insights
- MCP Protocol Support: Easily integrate with AI applications using the Model Context Protocol
- Scalable Architecture: Handle high request volumes with optimized performance
- TimescaleDB Storage: Efficient time-series data storage and querying
- Multi-Exchange Support: Connect to various cryptocurrency exchanges via CCXT
- Crypto News Aggregation: Collect and analyze news from multiple crypto RSS feeds
- News Sentiment Analysis: AI-powered sentiment analysis of crypto news
- Custom RSS Feed Subscriptions: Configure and manage news sources

Architecture

┌─────────────────────────────────────────────────────────────────┐
│                      MCP Client Applications                     │
│   (Claude Desktop, Custom AI Applications, Analysis Tools)       │
└───────────────────────────────┬─────────────────────────────────┘
                                │
                                ▼
┌─────────────────────────────────────────────────────────────────┐
│                        FastMCP Server                            │
├─────────────┬─────────────────────┬────────────────┬────────────┤
│  Resources  │        Tools        │    Prompts     │  Schemas   │
│             │                     │                │            │
│ Market Data │  Market Analysis    │ Trading Rec.   │ Input/     │
│ Symbols     │  Price Data         │ Market Trend   │ Output     │
│ Historical  │  LLM Analysis       │ Analysis       │ Validation │
│ News Feed   │  News Analysis      │ News Impact    │            │
└─────────────┴─────────────────────┴────────────────┴────────────┘
                    │                      │
       ┌────────────┼──────────────────────┘
       │            │                │
       ▼            ▼                ▼
┌─────────────┐ ┌────────────┐ ┌────────────────────┐
│  Exchange   │ │    RSS     │ │  Database Service  │
│  Service    │ │  Service   │ │                    │
│             │ │            │ │    TimescaleDB     │
│     CCXT    │ │ Feed Parser│ │    Time-series     │
└─────────────┘ └────────────┘ └────────────────────┘

Technology Stack

- FastMCP: Server framework based on the Model Context Protocol
- CCXT: Library for cryptocurrency exchange connectivity
- TimescaleDB: Time-series database extension for PostgreSQL
- Python: Core programming language
- uv: High-performance Python package manager for dependency management
- feedparser: RSS feed parsing library
- NLTK/spaCy: Natural language processing for news analysis

Project Structure

mcp-crypto-server/
├── main.py                   # Main entry point with FastMCP server definition
├── config/                   # Configuration directory
│   ├── __init__.py
│   ├── settings.py           # Application settings and configuration
│   └── logging_config.py     # Logging configuration
├── resources/                # MCP resources
│   ├── __init__.py
│   ├── market_data.py        # Market data resources
│   ├── symbols.py            # Cryptocurrency symbols resources
│   ├── schemas.py            # Schema resources for the client
│   └── news.py               # News feed resources and endpoints
├── tools/                    # MCP tools
│   ├── __init__.py
│   ├── market_analysis.py    # Market analysis tools
│   ├── price_data.py         # Price retrieval tools
│   ├── llm_analysis.py       # LLM integration for data analysis
│   └── news_analysis.py      # News analysis and sentiment tools
├── services/                 # Service integrations
│   ├── __init__.py
│   ├── exchange_service.py   # Exchange API integration
│   ├── database_service.py   # Database service for storing data
│   ├── llm_service.py        # LLM service integration
│   └── news_service.py       # RSS feed management and processing
├── models/                   # Data models
│   ├── __init__.py
│   ├── market_data.py        # Data models for market data
│   ├── analysis.py           # Models for analysis results
│   └── news.py               # Models for news data and analysis
├── utils/                    # Utility functions
│   ├── __init__.py
│   ├── formatters.py         # Data formatting utilities
│   ├── validators.py         # Input validation utilities
│   └── feed_utils.py         # RSS feed utility functions
├── prompts/                  # MCP prompts
│   ├── __init__.py
│   ├── analysis_prompts.py   # Prompt templates for analysis
│   └── news_prompts.py       # Prompt templates for news analysis
├── pyproject.toml            # Project configuration and dependencies
└── uv.lock                   # Lock file for dependencies managed by uv

Installation

Prerequisites

- Python 3.9+
- Docker and Docker Compose
- uv package manager

Setup

1. Clone the repository:

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

2. Install uv if you don't already have it:

   curl -LsSf https://astral.sh/uv/install.sh | sh

3. Create a virtual environment and install dependencies:

   uv venv
uv pip sync

4. Set up TimescaleDB using Docker:

   docker-compose up -d timescaledb

5. Configure your environment variables:

   cp .env.example .env
# Edit .env with your configuration settings

Configuration

Edit the config/settings.py file to customize your application:

- Database connection parameters
- Exchange API keys and settings
- MCP server configuration
- LLM service settings
- RSS feed subscription settings
- News source configurations
- Logging levels and outputs

Configuring RSS Feeds

The system comes with predefined crypto news sources, but you can customize them:

```python

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.