Coinbase Chat MCP
Access cryptocurrency data, market information, and trading insights from Coinbase's public API.
Coinbase Chat MCP
An open-source Model Context Protocol (MCP) server and web application for seamless integration with Coinbase's public API. This project enables AI agents, LLMs, and developers to interact with cryptocurrency data, market information, and trading insights through a standardized, secure interface.
š Features
š MCP Server
- Full MCP Compliance - Implements complete Model Context Protocol specification
- 8 Powerful Tools - Real-time prices, historical data, market stats, asset search, and technical analysis
- Cursor Integration - Pre-configured for Cursor IDE with
.cursor/mcp.json
- Claude Desktop Compatible - Works with any MCP-compatible client
- Secure & Fast - Built-in rate limiting and intelligent caching
š¬ Interactive Chat Interface
- AI-Powered Conversations - GPT-4 integration for intelligent crypto discussions
- Session Persistence - Chat history saved across browser tabs and restarts
- Session Management - Create, switch, and manage multiple chat sessions
- Auto-Titling - Sessions automatically titled from first user message
- Real-time Sync - Live updates when switching between sessions
š API Explorer
- Interactive Documentation - Live testing interface for all 8 MCP tools
- Real-time Testing - Execute API calls directly from the browser
- Code Generation - Auto-generated cURL and JavaScript examples
- Copy-to-Clipboard - Easy code sharing and integration
- Comprehensive Coverage - All endpoints documented with parameters and examples
šØ Modern Frontend
- Beautiful UI - Clean, responsive design with TailwindCSS
- Real-time Data - Live cryptocurrency prices and market updates
- Multiple Pages - Dashboard, Markets, Assets, Analysis, Chat, and API Explorer
- Mobile Friendly - Responsive design works on all devices
š Quick Start
Prerequisites
- Node.js 18+
- npm 9+
Installation
-
Clone the repository
git clone https://github.com/your-username/coinbase-chat-mcp.git cd coinbase-chat-mcp
-
Install dependencies
npm install # Install dependencies for all workspaces cd mcp-server && npm install && cd .. cd frontend && npm install && cd .. cd api-server && npm install && cd ..
-
Build the MCP server
cd mcp-server npm run build cd ..
-
Start development servers
# Start API server (port 3002) cd api-server && npm run dev & # Start frontend (port 5173) cd frontend && npm run dev &
š¤ MCP Integration
Cursor IDE Setup (Recommended)
The project includes pre-configured Cursor MCP settings:
- Automatic Configuration -
.cursor/mcp.json
is already configured - Restart Cursor - MCP server will auto-load with 8 tools available
- Test Integration - Try asking: "What's the current Bitcoin price?"
Claude Desktop Setup
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json
):
{
"mcpServers": {
"coinbase-mcp": {
"command": "node",
"args": ["/path/to/coinbase-chat-mcp/mcp-server/dist/index.js"],
"env": {
"COINBASE_API_URL": "https://api.coinbase.com/v2",
"LOG_LEVEL": "info"
}
}
}
}
Available MCP Tools
- get_spot_price - Current cryptocurrency prices
- get_historical_prices - Historical price data with time ranges
- get_exchange_rates - Fiat currency exchange rates
- search_assets - Find cryptocurrencies and assets
- get_asset_details - Detailed asset information
- get_market_stats - 24-hour market statistics
- get_popular_pairs - Popular trading pairs
- analyze_price_data - Technical analysis (volatility, trends, support/resistance)
šļø Architecture
coinbase-chat-mcp/
āāā mcp-server/ # MCP Protocol Server (8 tools)
āāā api-server/ # Express REST API Server
āāā frontend/ # React + TypeScript Frontend
ā āāā src/pages/ # Dashboard, Chat, API Explorer, etc.
ā āāā src/components/ # Reusable UI components
ā āāā src/services/ # Chat sessions & AI integration
āāā docs/ # Documentation & MCP setup notes
āāā .cursor/ # Cursor IDE MCP configuration
MCP Server
The core MCP server exposes Coinbase data through 8 specialized tools:
- Price Tools: Real-time and historical cryptocurrency prices
- Market Tools: Trading statistics and popular pairs
- Asset Tools: Search and detailed asset information
- Analysis Tools: Technical analysis and market insights
- Exchange Tools: Fiat currency exchange rates
Frontend Application
Modern React application featuring:
- MCP Chat - AI-powered crypto conversations with session persistence
- MCP Tester - Interactive tool testing environment with parameter validation
- API Explorer - Interactive documentation and testing for all MCP tools
- Tutorial - Step-by-step guide for integrating and using MCP tools
š§ Configuration
Environment Variables
Create .env
files for AI chat functionality:
# frontend/.env (Optional - for AI chat)
VITE_OPENAI_API_KEY=your_openai_api_key_here
Security Note: The frontend includes built-in warnings about client-side API key usage and only enables AI features in development mode.
š¤ AI Chat Setup (Optional)
To enable the AI-powered chat interface:
- Get OpenAI API Key: Visit OpenAI Platform
- Create frontend/.env file:
VITE_OPENAI_API_KEY=sk-your-actual-api-key-here
- Restart the frontend: Chat will use GPT-4 for intelligent crypto discussions!
Note: Without the API key, the chat interface provides a helpful setup message and basic functionality.
š Usage Examples
MCP Tools in Cursor/Claude
User: "What's the current Bitcoin price?"
Response: Current BTC-USD price: $100,608.65 USD
User: "Show me Ethereum's price trend over the last 7 days"
Response: [Historical price data with analysis]
User: "Analyze Bitcoin's volatility this month"
Response: [Technical analysis with volatility metrics]
Frontend Web Application
- Visit:
http://localhost:3005
- Chat: Persistent conversations with session management
- API Explorer: Test all 8 MCP tools interactively
- Dashboard: Real-time market overview
- Markets: Detailed trading statistics
Direct API Usage
# Get current Bitcoin price
curl http://localhost:3002/api/v1/prices/BTC-USD
# Search for assets
curl http://localhost:3002/api/v1/assets/search?query=bitcoin
š ļø Development
Key Features Implemented
- ā MCP Server - 8 tools, full protocol compliance
- ā Cursor Integration - Pre-configured MCP setup
- ā Chat Sessions - Persistent conversations with localStorage
- ā API Explorer - Interactive documentation for all tools
- ā Session Management - Create, switch, delete chat sessions
- ā AI Integration - GPT-4 powered conversations
- ā Security - Client-side API key warnings and protections
Development Scripts
# Build MCP server
cd mcp-server && npm run build
# Start API server (development)
cd api-server && npm run dev
# Start frontend (development)
cd frontend && npm run dev
# Test MCP server
cd mcp-server && npm test
Project Structure
- mcp-server/: TypeScript MCP server with 8 Coinbase tools
- api-server/: Express.js REST API server
- frontend/: React + TypeScript with TailwindCSS
- docs/: MCP setup notes and documentation
- .cursor/: Cursor IDE MCP configuration
š Documentation
- MCP Setup Notes - Complete MCP integration guide
- API Explorer - Interactive tool documentation
- Contributing Guide - Development contribution guidelines
⨠Recent Updates
Chat Session Management
- Persistent chat sessions across browser tabs
- Session history with auto-titling
- Real-time session switching
- localStorage-based persistence
- Observer pattern for live updates
API Explorer
- Interactive testing for all 8 MCP tools
- Real-time API responses
- Code generation (cURL, JavaScript)
- Copy-to-clipboard functionality
- Comprehensive parameter documentation
Cursor MCP Integration
- Pre-configured
.cursor/mcp.json
- Auto-loading of 8 MCP tools
- Ready-to-use cryptocurrency queries
- Professional development workflow
š¤ Contributing
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
š Roadmap
- v1.0: Core MCP server with 8 tools
- v1.1: Chat session persistence
- v1.2: Interactive API explorer
- v1.3: Cursor IDE integration
- v1.4: WebSocket real-time streaming
- v1.5: Advanced charting and technical indicators
- v2.0: Multi-exchange support
š Known Issues
- Rate limiting on Coinbase public API (60 requests/hour for some endpoints)
- Chat sessions limited to localStorage (10 sessions max for performance)
- Client-side API keys should only be used in development
š License
This project is licensed under the MIT License - see the LICENSE file for details.
š Acknowledgments
- Model Context Protocol team for the excellent specification
- Coinbase for providing robust public APIs
- Cursor for excellent MCP integration
- The open-source community for invaluable tools and libraries
š Support
- š Bug Reports: GitHub Issues
- š¬ Discussions: GitHub Discussions
- š§ Questions: Create an issue with the "question" label
Made with ā¤ļø by Vladimir Bichev for the crypto and AI communities
Related Servers
QuickBooks MCP Server
Query QuickBooks data using natural language.
Rewards Flights Public MCP
Deploy a remote, authentication-free MCP server on Cloudflare Workers to search for rewards flights.
APISIX-MCP
APISIX Model Context Protocol (MCP) server is used to bridge large language models (LLMs) with the APISIX Admin API, supporting querying and managing all resources in Apache APISIX.
OpenAI
A server for interacting with the OpenAI API. Requires an API key.
Webflow
Interact with Webflow APIs to list and edit your site and CMS data.
Alibaba Cloud OPS
A server for managing Alibaba Cloud services, requiring an Access Key ID and Secret for authentication.
Multi-Cloud VM MCP Server
Manage virtual machines across multiple cloud providers, including AWS EC2, Azure Virtual Machines, and GCP Compute Engine.
JupiterOne MCP Server
Interact with JupiterOne's data and tools through an MCP server, enabling AI assistants to access your JupiterOne account.
Autodesk Platform Services
An experimental MCP server providing access to the Autodesk Platform Services (APS) API.
Hugging Face
Access the Hugging Face Dataset Viewer API to query, explore, search, and analyze machine learning datasets from the Hugging Face Hub.