mcp加密货币情绪
A. 模型上下文协议(MCP) 服务器,为AI助手提供实时加密市场情绪分析。不需要API密钥-完全建立在免费的公共数据源上。
工具
| 工具 | 说明 |
|---|---|
get_fear_greed_score | 当前加密货币恐惧与贪婪指数(0-100)及其历史背景 |
get_sentiment_divergence | 找到价格与社区情绪(买入/卖出信号)不同的硬币 |
get_top_movers | 趋势数据叠加和动量分类的最大赢家和输家 |
get_market_overview | 总市值、BTC主导地位、24小时交易量、活跃代币和前三大代币快照 |
数据源
所有免费-不需要API密钥。
安装
git clone https://github.com/gravisongroup/mcp-crypto-sentiment.git
cd mcp-crypto-sentiment
npm install
npm run build用法
克劳德桌面(stdio)
添加到您的 claude_desktop_config.json:
{
"mcpServers": {
"crypto-sentiment": {
"command": "node",
"args": ["/path/to/mcp-crypto-sentiment/dist/index.js"]
}
}
}然后重新启动Claude Desktop。您将可以使用所有4个工具。
其他MCP客户端(stdio)
任何兼容MCP的客户端都可以通过stdio连接:
node dist/index.jsHTTP服务器(用于部署/货币化)
使用以下命令作为HTTP服务器运行 可流式HTTP传输:
MCP_TRANSPORT=http node dist/index.js
# → Listening on http://0.0.0.0:3000/mcp
# → Health check: http://0.0.0.0:3000/health或者使用npm脚本:
npm run start:http部署到铁路
- 将此仓库推送到GitHub
- 在上创建新项目 铁路 并连接您的仓库
- 设置环境变量:
- MCP_TRANSPORT=http - PORT 由铁路自动设置
- 部署--您的MCP端点将位于
https://your-app.up.railway.app/mcp
通过xpay.sh货币化
- 部署您的服务器(Railway、Render、Fly.io等)
- 在以下网址注册您的MCP服务器URL xpay.sh
- 按工具定价——建议费率:
- get_fear_greed_score → $0.01/call - get_sentiment_divergence → $0.03/call - get_top_movers → $0.05/call - get_market_overview → $0.01/call
- 分享您的代理URL——每次工具调用都会在Base上赚取USDC
环境变量
| 变量 | 默认值 | 描述 |
|---|---|---|
MCP_TRANSPORT | stdio | 运输方式: stdio 或 http |
PORT | 3000 | HTTP端口(仅限HTTP模式) |
HOST | 0.0.0.0 | HTTP绑定地址 |
工具参考
get_fear_greed_score
返回当前加密货币恐惧和贪婪指数以及历史比较。
输出示例:
{
"score": 72,
"classification": "Greed",
"label": "🤑 Greed",
"description": "Greed — bullish momentum. Watch for overextension.",
"historical": {
"yesterday": { "score": 68, "classification": "Greed" },
"last_week": { "score": 55, "classification": "Neutral" },
"last_month": { "score": 42, "classification": "Fear" }
},
"timestamp": "2026-03-29T00:00:00.000Z",
"source": "https://alternative.me/crypto/fear-and-greed-index/"
}______________________________________________________________________
get_sentiment_divergence
发现价格行为与社区情绪不同的硬币,有助于识别潜在的超卖机会或反转风险。
信号类型:
bearish_price_bullish_sentiment--价格下跌,但社区看涨(潜在超卖)bullish_price_bearish_sentiment--价格上涨,但社区看跌(潜在逆转)
输出示例:
{
"divergences": [
{
"coin": "Cardano",
"symbol": "ADA",
"rank": 9,
"price_change_24h": -8.5,
"sentiment_score": 72,
"sentiment_label": "Very Bullish",
"divergence_type": "bearish_price_bullish_sentiment",
"divergence_magnitude": 31,
"price_usd": 0.45,
"volume_24h": 890000000,
"signal": "Cardano dropped 8.5% in 24h but community sentiment is very bullish (72/100). Price weakness may not reflect true market conviction — potential oversold opportunity."
}
],
"analysis_timestamp": "2026-03-29T16:20:00.000Z",
"coins_analyzed": 100,
"methodology": "Compares 24h price change direction against CoinGecko community sentiment votes..."
}______________________________________________________________________
get_top_movers
返回过去24小时内涨幅最大和跌幅最大的股票,包括动量分类和CoinGecko趋势叠加。
动量分类: strong_bullish | bullish | neutral | bearish | strong_bearish
输出示例:
{
"gainers": [
{
"symbol": "PEPE",
"name": "Pepe",
"price_change_24h": 34.2,
"price_usd": 0.000012,
"market_cap": 4800000000,
"volume_24h": 1200000000,
"momentum": "strong_bullish",
"is_trending": true,
"signal": "PEPE surged 34.2% in 24h and is trending on CoinGecko. Strong bullish momentum."
}
],
"losers": [...],
"trending": [...],
"snapshot_time": "2026-03-29T16:30:00.000Z"
}______________________________________________________________________
get_market_overview
返回整个加密货币市场的快照。
输出示例:
{
"total_market_cap_usd": 2450000000000,
"total_volume_24h_usd": 98000000000,
"btc_dominance": 54.2,
"market_cap_change_24h_pct": 2.1,
"active_cryptocurrencies": 17423,
"markets": 1205,
"top_coins": [
{ "symbol": "BTC", "name": "Bitcoin", "price_change_24h": 1.8 },
{ "symbol": "ETH", "name": "Ethereum", "price_change_24h": 2.4 },
{ "symbol": "USDT", "name": "Tether", "price_change_24h": 0.01 }
],
"timestamp": "2026-03-29T16:30:00.000Z"
}技术栈
- TypeScript +Node.js 22+
- @模型上下文协议/sdk --官方MCP SDK
- 快速 --HTTP传输
- 黄道带 --输入验证
- 需要零个外部API密钥
