Provides access to Coinbase's public API for retrieving real-time cryptocurrency prices, historical price data, market statistics, exchange rates, asset information, and technical analysis. Includes simulated wallet functionality for educational purposes.
Enables AI-powered chat conversations using GPT-4, multi-language voice input through Whisper speech-to-text, and text-to-speech responses for cryptocurrency discussions.
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.
๐ฏ What's Real vs. Simulated?
Component | Status | Source |
๐ฐ Cryptocurrency Prices | โ Real | Coinbase Public API |
๐ Market Statistics | โ Real | Coinbase Public API |
๐ Historical Data | โ Real | Coinbase Public API |
๐ค GPT-4 AI Chat | โ Real | OpenAI |
๐ค Voice Input (Whisper) | โ Real | OpenAI |
๐ Text-to-Speech | โ Real | OpenAI |
๐ MCP Protocol | โ Real | Official SDK |
๐ต Wallet Balances | ๐ฎ Simulated | In-memory demo |
๐ธ Transactions | ๐ฎ Simulated | Educational only |
๐บ Beer Purchases | ๐ฎ Simulated | Virtual economy |
Perfect for learning crypto without financial risk! ๐
๐ Features
๐ MCP Server
Full MCP Compliance - Implements complete Model Context Protocol specification
13 Powerful Tools - Real-time prices, historical data, market stats, asset search, technical analysis, and transaction simulation
๐บโฟ Circular Economy - Complete flow: USD โ Crypto โ Virtual Beer!
Smart Suggestions - AI guides you to buy crypto if needed before purchases
Virtual Wallet & Inventory - Track balances, transactions, and beer collection
Cursor Integration - Pre-configured for Cursor IDE with
.cursor/mcp.jsonClaude 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
Voice Input - Speak your questions with multi-language support via OpenAI Whisper
Text-to-Speech - AI responses read aloud with natural voices
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-mcpInstall 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 ..Configure environment variables (Optional for AI features)
cd frontend # Create .env file with your OpenAI API key for voice features echo "VITE_OPENAI_API_KEY=your_openai_api_key_here" > .env 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.jsonis already configuredRestart 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):
Available MCP Tools
๐ Market Data Tools (8)
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)
๐บโฟ Demo Transaction Tools (5) - NEW!
calculate_beer_cost - Convert beer money to crypto amounts
simulate_btc_purchase - Simulate buying crypto with USD
buy_virtual_beer ๐ฅ - Buy virtual beer WITH crypto! (Circular economy)
get_virtual_wallet - View demo wallet balance and stats
get_transaction_history - View simulated transaction history
๐ฏ Try asking: "Buy me a beer!" โ AI will guide you through USDโBTCโBeer! ๐ Full docs: DEMO_TRANSACTIONS.md โข CIRCULAR_ECONOMY.md
๐๏ธ Architecture
System Overview
This project uses a hybrid architecture combining:
Real market data from Coinbase Public API
Simulated wallet for educational crypto transactions
Official MCP protocol for AI agent integration
Modern web stack for beautiful UX
๐ Detailed Architecture: See ARCHITECTURE.md for:
Component diagrams
Code examples
Real vs. simulated breakdown
Comparison with Base MCP and x402
Technical deep dive
Key Components
MCP Server
Exposes 13 tools through Model Context Protocol:
Market Data Tools (8):
Real-time prices, historical data, market stats
Asset search and details, exchange rates
Technical analysis (volatility, trends, support/resistance)
Transaction Tools (5):
๐บโฟ Beer-to-crypto calculator
Virtual wallet simulation (USD โ Crypto)
Circular economy (Crypto โ Beer!)
Balance & transaction history
Frontend Application
Modern React application featuring:
AI Chat - GPT-4 powered with voice input ๐ค and TTS ๐
Virtual Wallet - Demo crypto purchases and beer economy ๐บโฟ
API Explorer - Interactive documentation and testing
Tutorial - Step-by-step MCP integration guide
Presentations - Business slide deck viewer
๐ง Configuration
Environment Variables
Create .env files for AI chat functionality:
Security Note: The frontend includes built-in warnings about client-side API key usage and only enables AI features in development mode.
๐ค AI Chat & Voice Features Setup (Optional)
To enable the AI-powered chat interface with voice capabilities:
Get OpenAI API Key: Visit OpenAI Platform
Create frontend/.env file:
VITE_OPENAI_API_KEY=sk-your-actual-api-key-hereRestart the frontend: Chat will use GPT-4 for intelligent crypto discussions!
๐ค Voice Features (Requires OpenAI API Key)
Once configured, you'll have access to:
๐ Multi-Language Voice Input - Speak questions in any language using OpenAI Whisper
Supports 50+ languages including English, Spanish, French, German, Russian, Chinese, Japanese, and more
Real-time speech-to-text transcription
Click the purple microphone button to start recording
๐ Text-to-Speech Responses - Hear AI responses read aloud
Click the speaker icon on any assistant message
Natural-sounding voices powered by OpenAI TTS
Multiple voice options available
โก Fallback Mode - Without OpenAI key, basic Web Speech API provides English-only voice input
Note: Without the API key, the chat interface provides a helpful setup message and basic functionality.
๐ Usage Examples
MCP Tools in Cursor/Claude
Frontend Web Application
Visit:
http://localhost:3005Chat: Persistent conversations with session management
Voice Chat: Click microphone to ask questions by voice in any language
Listen to Responses: Click speaker icon on messages to hear them read aloud
API Explorer: Test all 8 MCP tools interactively
Dashboard: Real-time market overview
Markets: Detailed trading statistics
Direct API Usage
๐ ๏ธ Development
Key Features Implemented
โ MCP Server - 13 tools, full protocol compliance
โ Cursor Integration - Pre-configured MCP setup
โ Circular Economy ๐บโฟ - Complete USDโCryptoโBeer simulation
โ Voice Interface ๐ค - Multi-language input via Whisper
โ Text-to-Speech ๐ - AI responses read aloud
โ Virtual Wallet - Demo crypto purchases and inventory
โ 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 with tool orchestration
โ Transaction UI - Beautiful receipts and visual feedback
โ Security - Rate limiting, validation, error handling
Development Scripts
Project Structure
mcp-server/: TypeScript MCP server with 13 tools (8 market data + 5 wallet)
api-server/: Express.js REST API server with wallet simulation
frontend/: React + TypeScript with TailwindCSS, voice features, wallet UI
docs/: Comprehensive documentation (ARCHITECTURE.md, guides, etc.)
.cursor/: Cursor IDE MCP configuration
๐ Documentation
Core Documentation
README.md - This file! Project overview and quick start
ARCHITECTURE.md ๐๏ธ - Complete technical architecture guide
System diagrams and component breakdown
Real vs. simulated components explained
Code examples and data flow
Comparison with Base MCP and x402
Technology stack deep dive
Feature Guides
DEMO_TRANSACTIONS.md ๐บโฟ - Transaction tools reference
All 5 wallet tools explained
Usage examples and scenarios
API reference
CIRCULAR_ECONOMY.md ๐ - Complete economy guide
USD โ Crypto โ Beer flow
Smart suggestions when insufficient balance
Inventory tracking
Fun challenges and scenarios
CHAT_WALLET_INTEGRATION.md ๐ฌ - Chat integration
Using wallet tools in conversation
Visual transaction receipts
Example conversations
Setup & Configuration
MCP_SETUP_NOTES.md - MCP integration guide for Cursor/Claude
DEPLOYMENT.md - Deployment instructions
CONTRIBUTING.md - Development contribution guidelines
Interactive Docs
API Explorer - Interactive API testing (when running)
Swagger UI - REST API documentation (when running)
โจ Recent Updates
๐บโฟ Circular Economy (Latest!)
Buy virtual beer WITH cryptocurrency! - Complete USDโCryptoโBeer flow
Smart AI guidance - Suggests buying crypto if insufficient balance
Inventory tracking - See your beer collection in wallet
Transaction receipts - Beautiful visual feedback in chat
13 total MCP tools - 8 market data + 5 transaction tools
๐ค Voice & AI Features
Multi-language voice input - Speak questions in 50+ languages (OpenAI Whisper)
Text-to-speech - Hear AI responses read aloud (OpenAI TTS)
GPT-4 integration - Intelligent conversations with tool orchestration
Visual tool indicators - See which MCP tools were used
๐ฐ Virtual Wallet System
Demo transactions - Safe crypto purchase simulation
Beer calculator - Fun way to understand crypto value
Real-time pricing - Uses live Coinbase data
Transaction history - Track all purchases
Portfolio view - See all balances in one place
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.jsonAuto-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