Skip to main content
Glama
whitmanca

Crypto Price MCP Server

by whitmanca
README.md
# MCP Server

A Model Context Protocol server that provides crypto price fetching capabilities. This server enables LLMs to retrieve and process the latest price for any coin by its name or symbol. This server was created for demo and practice purposes only and has limited capabilities. 

**Rate Limits**: This server utilizes CoinGecko's free Demo API plan which has a rate limit of approximately 30 calls per minute.

## Available Tools

- `get_crypto_price_by_name` - Fetches the current price for a coin by coin name.
    - `coin_name` (string, required): The name of the coin (e.g. Bitcoin)
- `get_crypto_price_by_symbol` - Fetches the current price for a coin by coin symbol.
    - `coin_symbol` (string, required): The symbol of the coin (e.g. BTC)

## Setup

### Prerequisites
- Python 3.8+
- [uv](https://github.com/astral-sh/uv) package manager

### Installation

1. Clone the repository:
```bash
git clone <your-repo-url>
cd <your-repo-name>
```

2. Install dependencies with uv:
```bash
uv sync
```

## Testing with MCP Inspector

The MCP Inspector allows you to test your server locally before integrating with Claude.

1. Install the MCP Inspector:
```bash
npm install -g @modelcontextprotocol/inspector
```

2. Run your server with the inspector:
```bash
npx @modelcontextprotocol/inspector uv run server.py
```

3. Open the web interface that appears (usually `http://localhost:5173`)

4. Test the tools:
   - Try `get_crypto_price_by_name` with `coin_name: "Bitcoin"`
   - Try `get_crypto_price_by_symbol` with `coin_symbol: "BTC"`

## Claude Desktop Integration

### 1. Find Your Config File

- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Windows**: `%APPDATA%/Claude/claude_desktop_config.json`

### 2. Add Server Configuration

Add this to your `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "crypto-price-server": {
      "command": "uv",
      "args": ["run", "/absolute/path/to/your/server.py"],
      "cwd": "/absolute/path/to/your/project/directory"
    }
  }
}
```

**Replace the paths** with your actual project paths.

### 3. Restart Claude Desktop

Close and reopen Claude Desktop completely.

### 4. Test in Claude

Ask Claude something like:
- "What's the current price of Bitcoin?"
- "Can you get the price of ETH using the crypto tools?"
- "Use the crypto price tool to check the price of Solana"

## Troubleshooting

**Server won't start:**
- Make sure you're in the project directory
- Try `uv run server.py` directly to see error messages

**Claude can't find the server:**
- Double-check the absolute paths in your config
- Make sure there are no typos in the JSON
- Restart Claude Desktop after making changes

**Tools return errors:**
- Check your internet connection
- You may have hit the CoinGecko rate limit (wait a minute and try again)

TDQS

B3.1/5.0

Scored across 2 tools

Disambiguation2/5

The two tools have overlapping purposes—both retrieve cryptocurrency prices—with only the input parameter (name vs. symbol) differing. This creates ambiguity, as an agent might struggle to choose between them without clear guidance on which identifier to use. While descriptions specify the parameter difference, the core functionality is identical, leading to potential misselection.

Naming Consistency5/5

Tool names follow a consistent verb_noun_by_parameter pattern (get_crypto_price_by_name and get_crypto_price_by_symbol), with clear and predictable structure. Both use snake_case and the same verb ('get'), making them easily readable and aligned without any deviations.

Tool Count2/5

With only 2 tools, the server feels under-scoped for a cryptocurrency price domain, as it lacks essential operations like historical data, price comparisons, or multi-coin queries. While the tools cover basic price retrieval, the count is too low to support robust agent workflows, making it borderline inadequate for typical use cases.

Completeness2/5

The tool set is severely incomplete for a crypto price server, missing critical functionalities such as historical price data, market cap retrieval, volume information, or support for multiple coins in one query. Agents will face dead ends when trying to perform common tasks beyond simple single-coin price lookups, leading to potential failures in broader scenarios.

Maintenance

ActivityInactive
ResponsivenessNo issues