-
Notifications
You must be signed in to change notification settings - Fork 0
Quick Start
Get BetTrack up and running in minutes! Choose your path based on what you want to use.
- Option 1: MCP Server Only (Recommended for Beginners)
- Option 2: Full Dashboard (Backend + Frontend)
- Option 3: Everything (MCP + Dashboard)
- Verification
- Next Steps
Best for: Using Claude Desktop to query sports data via natural language
Time: 5 minutes
- Visit the-odds-api.com
- Sign up for free account (500 requests/month)
- Copy your API key
- Go to Releases
- Download latest
.mcpbfile (e.g.,sports-data-mcp-v0.1.13.mcpb) - Open Claude Desktop
- Go to Settings → Developer
- Click "Install MCP Package"
- Select the downloaded
.mcpbfile - Wait for "Installation Complete" message
-
Locate config directory:
-
Windows:
%APPDATA%\Claude\sports-mcp-config\ -
macOS:
~/Library/Application Support/Claude/sports-mcp-config/ -
Linux:
~/.config/Claude/sports-mcp-config/
-
Windows:
-
Open
.envfile and add your API key:ODDS_API_KEY=your_api_key_here
-
Optional: Add bookmaker filtering:
BOOKMAKERS_FILTER=draftkings,fanduel,betmgm BOOKMAKERS_LIMIT=3
Close and reopen Claude Desktop to load the server.
Ask Claude:
What NBA games are today and what are the odds?
Claude should respond with game information and betting lines!
Best for: Running the web dashboard for bet tracking and line movement charts
Time: 15 minutes
git clone https://github.com/yourusername/BetTrack.git
cd BetTrack/dashboardcd backend
# Install dependencies
npm install
# Create .env file
cp .env.example .env
# Edit .env with your values
# Required:
# DATABASE_URL="postgresql://user:password@localhost:5432/bettrack"
# ODDS_API_KEY="your_api_key"
# SESSION_SECRET="run: openssl rand -hex 32"Create Database:
# Using psql
psql -U postgres
CREATE DATABASE bettrack;
\q
# Run migrations
npm run prisma:migrate
# Seed initial data
npm run prisma:seedcd ../frontend
# Install dependencies
npm install
# Create .env file
echo "VITE_API_URL=http://localhost:3001/api" > .envTerminal 1 (Backend):
cd dashboard/backend
npm run dev
# Runs on http://localhost:3001Terminal 2 (Frontend):
cd dashboard/frontend
npm run dev
# Runs on http://localhost:5173Open browser to http://localhost:5173
Run initialization (one-time setup):
# Initialize sports in database
curl -X POST http://localhost:3001/api/admin/init-sports
# Sync initial odds data
curl -X POST http://localhost:3001/api/admin/sync-oddsVisit http://localhost:5173
You should see games with odds from various bookmakers!
Best for: Using both MCP Server and Dashboard together
Time: 20 minutes
Follow Option 1 (MCP Server) and Option 2 (Dashboard) in sequence.
The dashboard includes its own MCP server for bet management via Claude Desktop.
Configure (claude_desktop_config.json):
{
"mcpServers": {
"bettrack-sports": {
"command": "python",
"args": ["C:/path/to/BetTrack/mcp/sports_mcp_server.py"],
"env": {
"ODDS_API_KEY": "your_key"
}
},
"bettrack-dashboard": {
"command": "python",
"args": ["C:/path/to/BetTrack/mcp/dashboard_mcp_server.py"],
"env": {
"API_URL": "http://localhost:3001/api"
}
}
}
}Now Claude can query both sports data AND manage your bets!
Ask Claude:
List the available sports data tools
Expected response should include tools like:
get_oddssearch_oddsget_formatted_scoreboardget_espn_schedule
Backend:
curl http://localhost:3001/api/admin/healthExpected:
{
"status": "healthy",
"service": "bettrack-backend",
"database": "connected"
}Frontend: Open http://localhost:5173 and verify:
- Games are displayed
- Odds are shown for each game
- No console errors in browser DevTools
# Check Prisma connection
cd dashboard/backend
npm run prisma:studioPrisma Studio should open in browser showing your database tables.
Solutions:
- Restart Claude Desktop
- Check
.envfile has validODDS_API_KEY - Verify Python 3.11+ is installed:
python --version - Check logs in config directory
Solutions:
- Verify PostgreSQL is running:
psql -U postgres -c "SELECT 1" - Check
DATABASE_URLin.envfile - Test connection:
npm run prisma:studio - Run migrations:
npm run prisma:migrate
Solutions:
- Initialize sports:
curl -X POST http://localhost:3001/api/admin/init-sports - Sync odds:
curl -X POST http://localhost:3001/api/admin/sync-odds - Check backend logs:
dashboard/backend/logs/app.log - Verify API key has remaining requests
Solutions:
- Ensure backend is running on port 3001
- Check
VITE_API_URLin frontend.env - Verify CORS is enabled in backend (
corsmiddleware)
Solutions:
- Check API usage: Visit the-odds-api.com/account
- Use multiple API keys (round-robin):
ODDS_API_KEY=key1,key2,key3 - Increase sync interval in cron jobs
- Upgrade to paid tier
Best for: Production deployment or simplified setup
- Docker Desktop (Windows/Mac)
- Docker Engine (Linux)
cd BetTrack/dashboard
# Create .env file
cat > .env << EOF
DATABASE_URL=postgresql://postgres:password@postgres:5432/bettrack
ODDS_API_KEY=your_api_key
SESSION_SECRET=$(openssl rand -hex 32)
GITHUB_OWNER=yourusername
VERSION=latest
EOF# Start everything (frontend, backend, database)
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose down# Run migrations
docker-compose exec backend npm run prisma:migrate
# Initialize sports
docker-compose exec backend npm run init:sports
# Sync odds
docker-compose exec backend npm run sync:odds- Frontend: http://localhost:80
- Backend: http://localhost:3001
-
Prisma Studio:
docker-compose exec backend npm run prisma:studio
# Pull images from GitHub Container Registry
docker pull ghcr.io/yourusername/bettrack-backend:latest
docker pull ghcr.io/yourusername/bettrack-frontend:latest
# Run with docker-compose
cd dashboard
docker-compose -f docker-compose.prod.yml up -d# Required
DATABASE_URL=postgresql://user:password@host:5432/bettrack
ODDS_API_KEY=your_production_key
SESSION_SECRET=secure_random_string_min_32_chars
# Optional
PORT=3001
NODE_ENV=production
LOG_LEVEL=info
CORS_ORIGIN=https://yourdomain.com# Backend health
curl https://api.yourdomain.com/api/admin/health
# Check database stats
curl https://api.yourdomain.com/api/admin/stats- MCP Server Guide - Deep dive into MCP tools and architecture
- Frontend Guide - React components and state management
- Backend Guide - API routes and services
- Database Guide - Schema and queries
- API Documentation - Complete API reference
-
Add more sports: Edit
src/jobs/odds-sync.job.ts -
Change sync frequency: Modify cron schedule in
src/jobs/ -
Customize UI: Edit React components in
dashboard/frontend/src/components/ -
Add new MCP tools: Extend
mcp/sports_mcp_server.py
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: Wiki Home
# Start server manually
python mcp/sports_mcp_server.py
# Check Python version
python --version # Should be 3.11+
# Install dependencies
pip install -r mcp/requirements.txt# Backend
cd dashboard/backend
npm run dev # Development
npm run build # Production build
npm run prisma:studio # Database UI
npm run test # Run tests
# Frontend
cd dashboard/frontend
npm run dev # Development
npm run build # Production build
npm run preview # Preview build
npm run test # Run testscd dashboard/backend
# Migrations
npm run prisma:migrate # Apply migrations
npm run prisma:migrate reset # Reset database
npm run prisma:generate # Generate Prisma client
# Utilities
npm run init:sports # Initialize sports
npm run sync:odds # Manual odds sync
npm run resolve:outcomes # Settle bets# Start services
docker-compose up -d
# Stop services
docker-compose down
# View logs
docker-compose logs -f backend
docker-compose logs -f frontend
# Rebuild
docker-compose build
# Execute commands in container
docker-compose exec backend npm run prisma:studioHappy betting tracking! 🎯