Crypto Fear and Greed Index MCP Server
Access real-time and historical Crypto Fear & Greed Index data via an MCP server powered by Alternative.me for actionable market insights.
npx -y @kukapay/crypto-feargreed-mcpOverview
This MCP (Model Context Protocol) server exposes the Crypto Fear & Greed Index (FNG) as an MCP-compatible service so developer tools and agent clients can query real-time and historical crypto market sentiment. It fetches data from Alternative.me’s Fear & Greed Index API and publishes simple MCP resources and tool endpoints that integrate cleanly with MCP-aware clients (for example, Claude Desktop or other tool-only agents).
By providing both current values and historical series, plus small analysis utilities (average, trend direction), the server makes it easy to embed sentiment data in automated workflows, dashboards, or conversational agents. Developers can call the resources directly or let an MCP-enabled assistant use the supplied tools and prompt template to interpret values in user-facing responses.
Features
- Real-time access to the latest Crypto Fear & Greed Index value and classification
- Historical data retrieval for a configurable number of days
- Simple trend analysis: average value, trend direction, and data-point count
- Tool-only versions of all endpoints for compatibility with tool-only MCP clients
- Prompt template for interpreting index values in market-context responses
- Lightweight Python server, requires Python 3.10+
- MIT-licensed, open-source (data provided by Alternative.me)
Installation / Configuration
Clone the repository and run with the included MCP Python server entrypoint.
Prerequisites:
- Python 3.10 or newer
- Internet access to Alternative.me API
Clone and run locally:
Install for Claude Desktop via Smithery:
Manual MCP server config example (add to your client configuration):
"mcpServers":
Enable the installed server from your client (e.g., Claude Desktop) according to the client’s server-management UI.
Available Resources
The server exposes MCP-style resource URIs and equivalent tool functions. The following table summarizes the main endpoints.
| Resource / Tool URI | Description | Example output |
|---|---|---|
| fng://current | Current Fear & Greed Index value and classification | Crypto Fear & Greed Index (as of 2025-03-15 UTC): Value: 45 — Classification: Fear |
| fng://history/{days} | Historical index values for the past {days} days | 2025-03-15: 45 (Fear) \n 2025-03-14: 48 (Fear) \n … |
| tool:get_current_fng | Tool wrapper returning same output as fng://current | Same as fng://current |
| tool:get_historical_fng(days) | Tool wrapper for fng://history/{days} | Same as fng://history/{days} |
| tool:analyze_fng_trend(days) | Returns latest value, average, trend direction, count | Latest: 45 (Fear) \n Average: 47.3 \n Trend: falling \n Data points: 30 |
| prompt:interpret_fng | Prompt template for agents to interpret a numeric FNG value | “Please interpret this Crypto Fear & Greed Index value and explain what it means for cryptocurrency markets (specifically Bitcoin): 45” |
Tool functions are exposed so MCP clients that only support tool calls can still access the data and analysis.
Use Cases
- Agent-driven market briefings:
- Ask your MCP-enabled assistant: “What’s the current Crypto Fear & Greed Index?” The assistant will call fng://current or the get_current_fng tool and incorporate the value into its response.
- Historical trend analysis for strategy signals:
- Request: “Show me the Crypto Fear & Greed Index trend for the last 30 days.” The server returns the last 30 data points and analyze_fng_trend(30) can compute average and trend direction for quick automated reports.
- Dashboard integration:
- Periodically poll fng://current to display sentiment on a trading dashboard or alert system. Use fng://history/90 for a 3-month sentiment chart.
- Research and backtesting:
- Bulk-fetch historical series (fng://history/{days}) and combine with price data to evaluate strategy performance around high/low sentiment events.
Notes, License, and Acknowledgments
- License: MIT
- Built with the MCP Python SDK; data sourced from Alternative.me (Fear & Greed Index API).
- Repository: https://github.com/kukapay/crypto-feargreed-mcp
For development or contribution, follow the project README and run the server locally, then test endpoints with your MCP client.