
truss44/mcp-crypto-price 是从 https://github.com/truss44/mcp-crypto-price. 导入的 MCP 服务器候选
概览
truss44/mcp-crypto-price 是从 https://github.com/truss44/mcp-crypto-price. 导入的 MCP 服务器候选
概述(AI 翻译)
一个模型上下文协议(MCP)服务器,利用 CoinCap API 提供全面的加密货币分析。该服务器通过易用界面提供实时价格数据、市场分析和历史趋势。支持 STDIO 和可流式 HTTP 传输。
要求
- Node.js 22.14+
- CoinCap API 密钥通过
COINCAP_API_KEY
最新动态
- 故障:CoinCap v2 API 被移除。现仅使用 v3 API。需要
COINCAP_API_KEY(免费套餐可于 pro.coincap.io/dashboard 年获得) - 增加了可流式HTTP传输(同时保持STDIO兼容性)
- 用于构建和运行HTTP服务器的Smithery CLI脚本
- 6个新工具:
assets-search、market-global、assets-compare、analysis-candlestick、price-convert、assets-info - 层级工具命名:所有工具按类别前缀名称(
price-*、market-*、assets-*、analysis-*)组织) - 输出模式:所有工具现在声明
outputSchema,并带有structuredContent]以实现类型安全响应 - MCP 最佳实践:
isError验证错误标志、服务器描述和asset://{symbol}资源模板
用途
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Crypto Price & Market Analysis MCP Server
A Model Context Protocol (MCP) server that provides comprehensive cryptocurrency analysis using the CoinCap API. This server offers real-time price data, market analysis, and historical trends through an easy-to-use interface. Supports both STDIO and Streamable HTTP transports.
Requirements
- Node.js 22.14+
- CoinCap API key via
COINCAP_API_KEY
What’s New
- BREAKING: CoinCap v2 API removed. Now uses v3 API exclusively. A
COINCAP_API_KEYis required (free tier available at pro.coincap.io/dashboard) - Streamable HTTP transport added (while keeping STDIO compatibility)
- Runs fully standalone over STDIO and Streamable HTTP - no external registry or runtime required
- 6 new tools:
assets-search,market-global,assets-compare,analysis-candlestick,price-convert,assets-info - Hierarchical tool naming: All tools organized into category-prefixed names (
price-*,market-*,assets-*,analysis-*) - Output schemas: All tools now declare
outputSchemawithstructuredContentfor type-safe responses - MCP best practices:
isErrorflag on validation errors, server description, andasset://{symbol}resource template
Usage
Add this configuration to your Claude Desktop config file:
- MacOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"mcp-crypto-price": {
"command": "npx",
"args": ["-y", "mcp-crypto-price"],
"env": {
"COINCAP_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}
If your MCP client requires launching via cmd.exe on Windows:
{
"mcpServers": {
"mcp-crypto-price": {
"command": "cmd",
"args": ["/c", "npx", "-y", "mcp-crypto-price"],
"env": {
"COINCAP_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}
Development scripts
pnpm watch # Development: recompile on change (tsc --watch); pair with `node --watch dist/http.js` for HTTP hot reload
pnpm build # Compile TypeScript → dist/
pnpm format # Format source files with Prettier
pnpm lint # Check for lint errors (ESLint + typescript-eslint)
pnpm lint:fix # Auto-fix lint errors
pnpm types:check # TypeScript type-check without emitting files
pnpm test # Run all tests with Vitest
pnpm test:coverage # Run tests with coverage report (Vitest)
pnpm inspector # Open MCP inspector for interactive debugging
Run as Streamable HTTP server
You can run the server over HTTP for environments that support MCP over HTTP streaming.
安装
npx -y mcp-crypto-price配置
{
"mcpServers": {
"mcp-crypto-price": {
"command": "npx",
"args": ["-y", "mcp-crypto-price"],
"env": {
"COINCAP_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}