Integrates with CoinMarketCap API to retrieve real-time cryptocurrency price information and market data
Python Server MCP - Cryptocurrency Price Service
This project implements an MCP (Model Context Protocol) server that provides cryptocurrency price information. The server is built using Python and the MCP framework to create an API that can be consumed by different clients.
Docker
Docker build:
docker build -t mcp/python-server-mcp -f Dockerfile .
Add the following to your mcp.json file:
Related MCP server: Coin MCP Server
Features
Real-time cryptocurrency price retrieval
Environment-based configuration (development, production, staging, local)
CoinMarketCap API integration
Docker container deployment
Requirements
Python 3.12+
uv (package and virtual environment manager)
Docker (optional, for container execution)
Installation
Using uv (recommended)
Create and activate virtual environment with uv
Install dependencies
uv sync
Configuration
Create a
.envfile in the project root with the following variables:
You can also create specific environment files for each environment:
.dev.env- For development environment.staging.env- For staging environment.prod.env- For production environment
Usage
Local Execution
This will start the MCP server that will listen for requests through standard input/output (stdio).
Using Docker
Project Structure
Development
Adding New Tools to the MCP Server
To add a new tool to the MCP server, follow these steps:
Define the function in the
src/__init__.pyfileRegister the tool in the
main()functionDocument the tool with docstrings
Example: