比特币价格追踪器
STDIO为Claude提供实时比特币价格数据
为Claude提供实时比特币价格数据
A Model Context Protocol (MCP) server that provides Claude AI with real-time access to Bitcoin price data. This server allows Claude to fetch the current price of Bitcoin and related market information.
# Clone this repository git clone [your-repository-url] cd btc-price-mcp # Install dependencies npm install # Build the TypeScript code npm run build
Copy the .env.example
file to .env
:
cp .env.example .env
Edit the .env
file and add your CoinMarketCap API key:
COINMARKETCAP_API_KEY=your_api_key_here
You can use this as a command-line tool to check Bitcoin prices:
# Using npm npm start # Or directly with node node dist/index.js
You can also use the included batch files:
bt-price.bat
or btc-price.bat
To integrate this MCP server with Claude Desktop:
Locate the Claude Desktop configuration file:
%APPDATA%\Claude\claude_desktop_config.json
~/Library/Application\ Support/Claude/claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
Add the following configuration to the file:
{ "mcpServers": { "btc": { "command": "node", "args": ["<FULL_PATH_TO_YOUR_PROJECT>/dist/index.js"], "env": { "COINMARKETCAP_API_KEY": "your-api-key-here" } } } }
Replace <FULL_PATH_TO_YOUR_PROJECT>
with the absolute path to your project directory.
For example on Windows: C:/Users/RITESH YADAV/Desktop/Lab/dist/index.js
Once configured, you can ask Claude about Bitcoin prices:
This project is designed to work with the Model Context Protocol specification. You can modify the available tools or add new cryptocurrency endpoints by editing the src/index.ts
file and rebuilding the project.
MIT