LU

LunarCrush Remote MCP Server: Social Metrics for Trading

Access LunarCrush MCP server for live and historical social metrics and posts in LLM- and token-optimized outputs for automated trading and advisors.

Quick Install
npx -y @lunarcrush/mcp-server

Overview

The LunarCrush Remote MCP Server exposes LunarCrush social and market signal data in a Model Context Protocol (MCP) friendly format. It bridges raw social metrics, posts, and historical feeds into compact, LLM- and token-optimized payloads that are ready to be consumed by automated trading systems, advisors, or research pipelines. The server supports both live and historical queries, delivering context windows trimmed to the token budgets typical of large language models.

This server is useful when you need to integrate social sentiment, engagement, and post-level signals into model-driven workflows without heavy pre-processing. Instead of raw API responses that are noisy and verbose, the MCP server returns normalized, schema-driven objects optimized for prompt context, streaming consumption, and efficient storage for backtesting or real-time decisioning.

Features

  • Serves LunarCrush social metrics and posts in MCP-friendly JSON
  • Supports live streaming and historical retrieval (time-windowed queries)
  • Token-optimized payloads and concise field sets for LLM contexts
  • Basic filtering, paging, and time-range parameters
  • Docker-friendly and configurable via environment variables
  • Example client snippets for curl and Python to get started quickly
  • Rate limiting and authentication hooks (API key header support)

Installation / Configuration

Clone the repository and run with Docker, or run from source.

Clone repository:

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

Run with Docker:

# Build
docker build -t lunarcrush-mcp-server .

# Run (example)
docker run -e LC_API_KEY=your_lc_api_key \
           -e MCP_PORT=8080 \
           -p 8080:8080 \
           lunarcrush-mcp-server

Run from source (Node.js example):

# install deps
npm install

# configure via .env
cat > .env <<EOF
LC_API_KEY=your_lc_api_key
MCP_PORT=8080
DEFAULT_WINDOW_HOURS=24
EOF

# start
npm start

Common environment variables:

  • LC_API_KEY — LunarCrush API key for fetching underlying data
  • MCP_PORT — HTTP port (default: 8080)
  • DEFAULT_WINDOW_HOURS — default lookback for historical queries
  • RATE_LIMIT_PER_MINUTE — optional throttle setting

Available Resources

The server repository includes several developer resources to accelerate integration:

  • Dockerfile and docker-compose examples for local and production deployment
  • Configuration templates (.env.example) for environment variables
  • Example client snippets (curl, Python) to show basic usage
  • OpenAPI / Swagger spec to quickly inspect available endpoints (if included in your build)
  • Sample prompt templates and token-optimized response schemas for LLM integration

Check the repository for the latest files and the OpenAPI spec when present.

API: Typical Endpoints and Payloads

Note: endpoint names and exact payloads may vary by release. Example endpoints you can expect in an MCP server:

  • GET /mcp/metrics — Returns aggregated social metrics (volume, sentiment, engagement)
  • GET /mcp/posts — Returns post-level data optimized for LLM context
  • GET /mcp/stream — Server-sent events or WebSocket stream of live posts/metrics

Example token-optimized response fields (common fields shown):

FieldTypeDescription
symbolstringAsset symbol (e.g., BTC)
timestring (ISO)Timestamp for the metric or post
scorenumberNormalized sentiment/engagement score
summarystringShort, token-optimized summary for LLMs
idstringUnique identifier for the post or metric

Example minimal JSON for metrics:

{
  "symbol": "BTC",
  "time": "2026-04-09T12:00:00Z",
  "volume": 12345,
  "social_score": 0.72,
  "summary": "Rising engagement and bullish sentiment on major exchanges"
}

Use Cases

  1. Automated trading signal enrichment

    • Query the MCP server for recent social momentum and feed the compact “summary” and “score” fields into a signal-combiner that adjusts position sizing.
    • Example: Use GET /mcp/metrics?symbol=ETH&window=1h to get social_score, then apply a threshold in your strategy.
  2. LLM-based trading advisor

    • Provide an LLM with a short token-optimized context: a handful of summaries, recent scores, and the latest posts. The server trims posts to essential text to stay within token budgets.
    • Example Python snippet:
import requests
resp = requests.get("http://localhost:8080/mcp/metrics?symbol=BTC&limit=5")
context = "\n".join([f"{m['time']} {m['summary']} ({m['social_score']})" for m in resp.json()])
# Send context to your LLM with a specific instruction
  1. Backtesting and research

    • Pull historical windows for hundreds of assets to correlate social spikes with price action across timeframes. The server can export compressed, token-friendly records suitable for fast ingest into notebooks.
  2. Monitoring dashboards and alerts

    • Use /mcp/stream to receive live post summaries and trigger alerts when social_score or mention volume exceeds thresholds.

Getting Help

  • Open issues and discussions on the GitHub repository: https://github.com/lunarcrush/mcp-server
  • Inspect included OpenAPI docs or example clients in the repo for the concrete endpoint shapes and parameters.