Quick Start Guide - MCP Task Tracker
Prerequisites
- Go 1.21+ installed
- PostgreSQL running
- Node.js 18+ installed
- Git
Step 1: Database Setup
Start PostgreSQL
Make sure PostgreSQL is running on port 5432.
Create Database (if not exists)
CREATE DATABASE mcp_tracker;
CREATE USER mcp WITH PASSWORD 'secret';
GRANT ALL PRIVILEGES ON DATABASE mcp_tracker TO mcp;
Step 2: Build and Run Backend
From Project Root
# Build the backend
go build -o mcp-tracker ./cmd/server
# Run migrations (automatic on first start)
./mcp-tracker
The backend will:
- Connect to database
- Run migrations automatically
- Start on port 8080
- Create WebSocket hub
Environment Variables (Optional)
# Custom database URL
export DATABASE_URL="postgres://user:pass@localhost:5432/dbname?sslmode=disable"
# Custom port
export PORT="8080"
Step 3: Run Frontend
Navigate to Web Directory
cd web
Install Dependencies (if not done)
npm install
Start Development Server
npm run dev
Frontend runs on: http://localhost:3000
Step 4: Add Sample Data
Option 1: SQL Script
psql -U mcp -d mcp_tracker -f migrations/002_sample_data.sql
Option 2: Via UI
- Open http://localhost:3000
- Go to Projects
- Click "+ Create Project"
- Fill in details and submit
- Click on the project
- Go to "Agents" tab
- Click "+ Add Agent"
- Fill in details and submit
Accessing the Application
Main URLs
- Frontend: http://localhost:3000
- Backend API: http://localhost:8080/api
- Health Check: http://localhost:8080/health
- WebSocket: ws://localhost:8080/ws
Pages
- Dashboard: http://localhost:3000/
- Projects: http://localhost:3000/projects
- Agents: http://localhost:3000/agents
- Tasks: http://localhost:3000/tasks
- Documentation: http://localhost:3000/docs
Common Commands
Backend
# Build
go build -o mcp-tracker ./cmd/server
# Run
./mcp-tracker
# Run with custom database
DATABASE_URL="postgres://..." ./mcp-tracker
# Run tests
go test ./...
# Run with race detector
go run -race ./cmd/server
Frontend
# Install dependencies
npm install
# Development server
npm run dev
# Production build
npm run build
# Preview production build
npm run preview
# Lint
npm run lint
Database
# Connect to database
psql -U mcp -d mcp_tracker
# Run migrations
psql -U mcp -d mcp_tracker -f migrations/001_init.sql
# Add sample data
psql -U mcp -d mcp_tracker -f migrations/002_sample_data.sql
# Backup database
pg_dump -U mcp mcp_tracker > backup.sql
# Restore database
psql -U mcp -d mcp_tracker < backup.sql
# Reset database
psql -U mcp -d mcp_tracker -c "DROP SCHEMA public CASCADE; CREATE SCHEMA public;"
psql -U mcp -d mcp_tracker -f migrations/001_init.sql
Troubleshooting
Backend won't start
Check:
- PostgreSQL is running:
psql -U mcp -d mcp_tracker -c "SELECT 1" - Port 8080 is available:
netstat -ano | findstr :8080 - Database URL is correct
- Migrations ran successfully
Frontend can't connect to backend
Check:
- Backend is running on port 8080
- CORS is properly configured
- Proxy settings in
vite.config.js - Browser console for errors
WebSocket connection fails
Check:
- Backend is running
- WebSocket endpoint is accessible
- Browser console for connection errors
- Firewall settings
No data showing
Check:
- Database has data:
psql -U mcp -d mcp_tracker -c "SELECT COUNT(*) FROM projects" - API endpoints return data:
curl http://localhost:8080/api/projects - Browser console for API errors
- Network tab in dev tools
Development Workflow
Making Backend Changes
- Edit Go files
go build -o mcp-tracker ./cmd/server- Stop and restart server
- Test changes
Making Frontend Changes
- Edit Vue files
- Changes hot-reload automatically
- Check browser for updates
- Test functionality
Database Changes
- Create new migration file
- Apply migration:
psql -U mcp -d mcp_tracker -f migrations/003_your_migration.sql - Update models if needed
- Rebuild and restart backend
API Testing
Using curl
# Create project
curl -X POST http://localhost:8080/api/projects \
-H "Content-Type: application/json" \
-d '{"name":"Test","description":"Test project"}'
# Get all projects
curl http://localhost:8080/api/projects
# Create agent
curl -X POST http://localhost:8080/api/agents \
-H "Content-Type: application/json" \
-d '{"project_id":"uuid","name":"Test Agent","role":"frontend","team":"Dev"}'
# Get all agents
curl http://localhost:8080/api/agents
# Get project agents
curl "http://localhost:8080/api/agents?project_id=uuid"
Using PowerShell
# Create project
$project = Invoke-RestMethod -Uri "http://localhost:8080/api/projects" `
-Method Post `
-ContentType "application/json" `
-Body '{"name":"Test","description":"Test project"}'
# Get all projects
Invoke-RestMethod -Uri "http://localhost:8080/api/projects"
# Create agent
Invoke-RestMethod -Uri "http://localhost:8080/api/agents" `
-Method Post `
-ContentType "application/json" `
-Body "{`"project_id`":`"$($project.id)`",`"name`":`"Test Agent`",`"role`":`"frontend`",`"team`":`"Dev`"}"
# Get all agents
Invoke-RestMethod -Uri "http://localhost:8080/api/agents"
Production Build
Backend
# Build optimized binary
go build -ldflags="-s -w" -o mcp-tracker ./cmd/server
# Or with compression
go build -ldflags="-s -w" -o mcp-tracker ./cmd/server
upx mcp-tracker
Frontend
cd web
npm run build
# Output in web/dist/
Deploy
- Build both backend and frontend
- Upload backend binary and dist/ folder
- Set environment variables
- Configure reverse proxy (nginx, etc.)
- Setup systemd service (Linux) or Windows Service
- Configure SSL/TLS
Monitoring
Check Backend Health
curl http://localhost:8080/health
Check Database Connections
SELECT COUNT(*) FROM pg_stat_activity WHERE datname = 'mcp_tracker';
View Logs
Backend logs to stdout, so redirect to file:
./mcp-tracker > app.log 2>&1 &
Security Checklist
- Change default database password
- Use environment variables for secrets
- Enable SSL/TLS in production
- Configure CORS properly
- Use strong JWT secrets
- Enable rate limiting
- Set up firewall rules
- Regular security updates
- Database backups configured
- HTTPS for frontend
Happy Coding! 🚀
For more information, see:
AGENTS_PAGE_IMPLEMENTATION.md- Agents page detailsUI_MODERNIZATION.md- UI documentationdocs/API.md- API documentation