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.
npx -y @lunarcrush/mcp-serverOverview
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:
Run with Docker:
# Build
# Run (example)
Run from source (Node.js example):
# install deps
# configure via .env
# 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):
| Field | Type | Description |
|---|---|---|
| symbol | string | Asset symbol (e.g., BTC) |
| time | string (ISO) | Timestamp for the metric or post |
| score | number | Normalized sentiment/engagement score |
| summary | string | Short, token-optimized summary for LLMs |
| id | string | Unique identifier for the post or metric |
Example minimal JSON for metrics:
Use Cases
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.
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:
=
=
# Send context to your LLM with a specific instruction
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.
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.