Skip to main content
Glama

比特币价格 MCP 服务器

一个模型上下文协议 (MCP) 服务器,为 Claude AI 提供实时访问比特币价格数据的权限。该服务器允许 Claude 获取比特币的当前价格及相关市场信息。

特征

  • 为 Claude 提供实时比特币价格信息

  • 返回美元价格、24 小时变化百分比和市值

  • 处理对加密货币数据提供商的 API 调用

  • CoinMarketCap 和 CoinGecko API 之间的自动回退

先决条件

  • Node.js 和 npm 已安装

  • CoinMarketCap API 密钥(在pro.coinmarketcap.com获取)

    • 注意:如果您没有 CoinMarketCap API 密钥,该工具将自动使用 CoinGecko API

安装

# Clone this repository git clone [your-repository-url] cd btc-price-mcp # Install dependencies npm install # Build the TypeScript code npm run build

配置

  1. .env.example文件复制到.env

    cp .env.example .env
  2. 编辑.env文件并添加您的 CoinMarketCap API 密钥:

    COINMARKETCAP_API_KEY=your_api_key_here

用作 CLI 工具

您可以将其用作命令行工具来检查比特币价格:

# Using npm npm start # Or directly with node node dist/index.js

您还可以使用附带的批处理文件:

  • bt-price.batbtc-price.bat

与 Claude Desktop 集成

要将此 MCP 服务器与 Claude Desktop 集成:

  1. 找到 Claude Desktop 配置文件:

    • 在 Windows 上: %APPDATA%\Claude\claude_desktop_config.json

    • 在 macOS 上: ~/Library/Application\ Support/Claude/claude_desktop_config.json

    • 在 Linux 上: ~/.config/Claude/claude_desktop_config.json

  2. 在文件中添加以下配置:

{ "mcpServers": { "btc": { "command": "node", "args": ["<FULL_PATH_TO_YOUR_PROJECT>/dist/index.js"], "env": { "COINMARKETCAP_API_KEY": "your-api-key-here" } } } }

<FULL_PATH_TO_YOUR_PROJECT>替换为项目目录的绝对路径。

例如在 Windows 上: C:/Users/RITESH YADAV/Desktop/Lab/dist/index.js

Claude 中的用法

配置完成后,您可以向 Claude 询问比特币价格:

  • “比特币现在的价格是多少?”

  • “过去 24 小时内比特币发生了多少变化?”

  • “比特币现在的市值是多少?”

发展

该项目旨在与模型上下文协议 (MCP) 规范兼容。您可以通过编辑src/index.ts文件并重新构建项目来修改现有工具或添加新的加密货币端点。

执照

麻省理工学院

-
security - not tested
A
license - permissive license
-
quality - not tested

Related MCP Servers

  • A
    security
    A
    license
    A
    quality
    Real-time cryptocurrency market data integration using CoinCap's public API, providing access to crypto prices and market information without API keys
    Last updated -
    3
    49
    89
    MIT License
    • Apple
  • A
    security
    -
    license
    A
    quality
    Provides real-time and historical cryptocurrency market data through integration with major exchanges. This server enables LLMs like Claude to fetch current prices, analyze market trends, and access detailed trading information.
    Last updated -
    7
    54
    MIT License
    • Apple
  • A
    security
    F
    license
    A
    quality
    Provides real-time cryptocurrency price data from OKX exchange through a Model Context Protocol interface, allowing access to historical candlestick data and current market prices for any trading instrument.
    Last updated -
    2
    0
    16
    • Apple

View all related MCP servers

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/riteshyaaa/MCP-BTC-Watch'

If you have feedback or need assistance with the MCP directory API, please join our Discord server