USP
Provides AI agents with structured, real-time access to CoinMarketCap data. Features dedicated tools for currency listings and specific token quotes, plus a custom URI scheme for resources. Easy to deploy with "uv" or Docker, but requires…
Use cases
- 01Fetching real-time cryptocurrency market listings for AI agents.
- 02Retrieving specific token quotes (e.g., Bitcoin, Ethereum) by symbol or slug.
- 03Building AI applications that require up-to-date crypto market data.
- 04Integrating crypto data into Claude Code workflows and AI assistants.
Detected files (1)
CLAUDE.mdclaude_mdShow content (2326 bytes)
# CLAUDE.md This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. ## Project Overview This is a Coinmarket MCP (Model Context Protocol) Server that provides cryptocurrency data from the CoinMarketCap API. The server implements the MCP specification to allow AI assistants to access cryptocurrency listings and quotes. ## Architecture - **MCP Server**: Built using the `mcp` Python library, communicates via stdin/stdout - **API Integration**: Interfaces with CoinMarketCap Pro API for cryptocurrency data - **Resource System**: Exposes cryptocurrency data as resources with `coinmarket://` URI scheme - **Tool System**: Provides two tools for getting listings and quotes ### Key Components - `src/coinmarket_service/server.py`: Main MCP server implementation with: - Resource handlers for cryptocurrency listings and quotes - Tool handlers for `get_currency_listings` and `get_quotes` - API key authentication and request handling - `src/coinmarket_service/__init__.py`: Package entry point that runs the async server ## Development Commands ### Setup and Installation ```bash # Install uv package manager (if not already installed) curl -LsSf https://astral.sh/uv/install.sh | sh # Install dependencies uv sync # Run the server uv run coinmarket_service ``` ### Docker ```bash # Build Docker image docker build -t coinmarket-service . # Run with Docker docker run -e COINMARKET_API_KEY=your_api_key_here coinmarket-service ``` ### Linting ```bash # Run ruff linter uv run ruff check uv run ruff format ``` ## Configuration - Requires `COINMARKET_API_KEY` environment variable - Uses `.env` file support via python-dotenv - Configuration for Claude Desktop requires absolute path to repository ## MCP Server Details The server implements: - **Resources**: - `coinmarket://cryptocurrency/listings` - Latest cryptocurrency listings - `coinmarket://cryptocurrency/quotes` - Cryptocurrency quotes (supports slug/symbol query params) - **Tools**: - `get_currency_listings` - No parameters required - `get_quotes` - Optional `slug` or `symbol` parameters ## API Integration - Uses CoinMarketCap Pro API v1 - Implements rate limiting and error handling - Returns JSON formatted data - Supports both slug-based and symbol-based cryptocurrency queries
README
Coinmarket MCP server
Coinmarket MCP Server
Components
Resources
The server implements a few of the Coinmarket API endpoints
- Custom coinmarket:// URI scheme for accessing individual notes
- Each note resource has a name, description and text/plain mimetype
Tools
The server implements two tools:
get-currency-listings: Get the latest currency listingsget-quotes: Get quotes for tokens- Takes "slug" (example: bitcoin) or "symbol" (example: BTC) as optional string argument
Configuration
Requires coinmarket API key.
Quickstart
Prerequisites
- Python 3.12 or higher
- uv package manager
Install
Install uv if you haven't already:
# macOS and Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
Claude Desktop
On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
Development/Unpublished Servers Configuration
``` "mcpServers": { "coinmarket_service": { "command": "uv", "args": [ "--directory", "/path/to/coinmarket_service", "run", "coinmarket_service" ], "env": { "COINMARKET_API_KEY": "" } } } ```Docker
You can also run the server using Docker:
# Build the image
docker build -t coinmarket-service .
# Run the container
docker run -e COINMARKET_API_KEY=your_api_key_here coinmarket-service
For Claude Desktop configuration with Docker:
"mcpServers": {
"coinmarket_service": {
"command": "docker",
"args": [
"run",
"--rm",
"-e",
"COINMARKET_API_KEY=<insert api key>",
"coinmarket-service"
]
}
}
Troubleshooting
"spawn uv ENOENT" Error
If you see this error, it means uv is not installed or not in your PATH:
- Install uv following the instructions above
- Restart your terminal/Claude Desktop after installation
- Verify installation: Run
uv --versionin terminal - Update PATH: Make sure uv is in your system PATH
Configuration Issues
- Replace
/path/to/coinmarket_servicewith the actual path to your cloned repository - Ensure your
COINMARKET_API_KEYis valid - The path should point to the root directory containing
pyproject.toml
