MCPServer + CoinGecko Wrapper
@unsimpledev
MCP Server que se conecta a Coingecko
Overview
What is MCPServer + CoinGecko Wrapper?
MCPServer + CoinGecko Wrapper is a two-component system that enables AI agents (such as Claude) to fetch cryptocurrency data via the Model Context Protocol (MCP). It consists of a PHP server (mcpserver) that handles MCP requests and a Node.js/TypeScript wrapper (mcp-coingecko-wrapper) that calls the public CoinGecko API for price, info, and history.
How to use MCPServer + CoinGecko Wrapper?
Install the wrapper dependencies with npm install and build with npm run build inside the mcp-coingecko-wrapper directory. Serve the mcpserver PHP application (e.g., via Apache or XAMPP) so that webhook.php is accessible. The agent must send a valid MCP request specifying "tool_choice": "coingecko" and the desired symbol and operation.
Key features of MCPServer + CoinGecko Wrapper
- Receives and routes MCP requests from compatible agents.
- Exposes an HTTP endpoint for MCP tool calls.
- Fetches current cryptocurrency price from CoinGecko.
- Retrieves general cryptocurrency information.
- Provides price history data.
- Returns structured MCP responses for agent consumption.
Use cases of MCPServer + CoinGecko Wrapper
- An AI assistant answers a user’s question about Bitcoin’s current price.
- An agent analyzes historical price trends of Ethereum over a given period.
- A chatbot fetches general info (e.g., market cap, supply) for any supported cryptocurrency.
- A multi-agent system routes crypto data queries to a CoinGecko tool without direct API integration.
FAQ from MCPServer + CoinGecko Wrapper
What components make up this server?
It consists of a PHP server (mcpserver) for handling MCP requests and a Node.js/TypeScript wrapper (mcp-coingecko-wrapper) for interacting with the CoinGecko API.
What are the runtime dependencies?
PHP 8+ with curl support is required for mcpserver, and Node.js 18+ for the wrapper. An agent compatible with MCP (e.g., Claude) is also needed.
How do I install and run the system?
Run npm install and npm run build inside mcp-coingecko-wrapper, then serve the PHP mcpserver with a web server that can process webhook.php.
How does the server decide which tool to use?
The mcpserver reads the tool_choice field in the incoming MCP request and routes the call to the corresponding tool – for cryptocurrency queries it invokes the CoinGecko wrapper.
What cryptocurrency data can I retrieve?
The wrapper supports fetching current price, general information, and price history for any symbol recognized by the CoinGecko public API.