MCP Crypto Client-Server Implementation Guide
About
An MCP client and server for cryptogecko using fastMCP library and Starlette
Details
- Author
- Frostbite22
- GitHub stars
- 2
- Downloads
- 194
- Categories
- Finance
Jump to
- Python MCP server exposing CoinGecko data through MCP tools
- TypeScript MCP client for interacting with server tools
- React frontend for a web interface to crypto data
- Support for adding new tools via @mcp_app.tool() decorator
- Optional CoinGecko API key; free tier works without it
- Configurable host and port using command-line arguments
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
MCP Crypto Client-Server Implementation GuideCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
After installing Python 3.9+ and pip, create a virtual environment, install dependencies (starlette, uvicorn, httpx, mcp-server, python-dotenv), and optionally add a CoinGecko API key in a .env file. Save the server code to server.py and start it with python server.py --port 8000 --debug. The server runs at http://localhost:8000. Host and port can be customized with --host and --port arguments.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"mcp crypto client-server implementation guide": {
"cryptogecko-mcp-server": {
"command": "python",
"args": [
"-m",
"venv",
"venv"
]
}
}
}
}
McpServers
{
"cryptogecko-mcp-server": {
"command": "python",
"args": [
"-m",
"venv",
"venv"
]
}
}
MCP Crypto Client-Server Implementation Guide
This guide will help you set up the Model Context Protocol (MCP) server and client for retrieving cryptocurrency data using the CoinGecko API.Overview
The system consists of: 1. Python MCP Server: Handles API requests to CoinGecko and exposes functionality through MCP tools 2. TypeScript MCP Client: Connects to the server and provides methods to interact with the server tools 3. React Frontend: A web interface to interact with the crypto dataServer Setup
Prerequisites
- Python 3.9+ - pipInstallation
1. Create a virtual environment: ``bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
`
2. Install dependencies:
`bash
pip install starlette uvicorn httpx mcp-server python-dotenv
`
3. Create a .env file in your project root:
`
COINGECKO_API_KEY=your_api_key # Optional, free tier can work without it
PORT=8000
`
4. Save the Python server code to server.py
5. Start the server:
`bash
python server.py --port 8000 --debug
`
You can customize the host and port with command-line arguments:
`bash
python server.py --host 127.0.0.1 --port 8080
`
The server will be available at http://localhost:8000.
Customizing the Implementation
Adding New Tools
To add a new tool to the server:
1. Create a new function with the @mcp_app.tool()` decorator
2. Implement the function to fetch data from CoinGecko or process existing data
3. Add corresponding methods to the TypeScript client
4. Update the React UI to use the new functionalitySign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.
