QUICK_REFERENCE.md

QUICK REFERENCE

๐ŸŽฏ MCP Multi-Agent System - Quick Reference Card

๐Ÿš€ Start/Stop Commands

# Start all services
docker-compose up -d

# Stop all services
docker-compose down

# Rebuild and start
docker-compose up -d --build

# View logs
docker-compose logs -f

# Check status
docker ps

๐ŸŒ Access Points

Who URL Purpose
๐Ÿ‘ค Web Users http://localhost:80 Beautiful Vue.js UI
๐Ÿค– AI Agents http://localhost:8080 Direct REST API access
๐Ÿ’ป Developers npm start Interactive CLI bridge

๐Ÿ“ก API Endpoints (Port 8080)

Root & Health

GET  /                    # API info (JSON)
GET  /health              # Health check

Projects

POST /api/projects        # Create project
GET  /api/projects        # List projects
GET  /api/projects/{id}   # Get project

Agents

POST /api/agents          # Register agent
GET  /api/agents          # List agents (filter by project_id)
PUT  /api/agents/{id}/status  # Update agent status

Tasks

POST /api/tasks           # Create task
GET  /api/tasks           # List tasks (filter by project_id)
GET  /api/tasks/{id}      # Get task
PUT  /api/tasks/{id}      # Update task

Contexts (Documentation)

POST   /api/contexts      # Add documentation
GET    /api/contexts      # List documentation
GET    /api/contexts/{id} # Get documentation
PUT    /api/contexts/{id} # Update documentation
DELETE /api/contexts/{id} # Delete documentation

WebSocket

WS   /ws?project_id={id}  # Real-time updates

๐Ÿงช Quick Tests

# Test Go API directly
curl http://localhost:8080/

# Test API endpoint
curl http://localhost:8080/api/agents

# Test via Nginx
curl http://localhost:80/api/projects

# Test health
curl http://localhost:8080/health

# Open web UI
Start-Process http://localhost:80

๐Ÿ—๏ธ Architecture at a Glance

Web Browser :80
    โ†“ HTTP
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Nginx     โ”‚ (Serves Vue.js, Proxies API)
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜
       โ”‚ Proxy
       โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ†โ”€โ”€ AI Agents :8080 (Direct)
โ”‚  Go Server  โ”‚ (REST API + WebSocket)
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜
       โ”‚ SQL
       โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ PostgreSQL  โ”‚ :5433
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“ฆ Container Ports

Container Port Mapping Purpose
postgres 5433:5432 Database
mcp-server 8080:8080 Go API (Direct + Proxy)
web 80:80 Nginx + Vue.js

๐ŸŽจ What's Different Now?

โœ… Go Server (Port 8080)

Before: Served Vue.js + API
Now: Only API (no Vue.js)

// Root returns JSON, not HTML
GET / โ†’ {"name": "MCP API", "endpoints": {...}}

โœ… Nginx (Port 80)

Before: Basic proxy
Now: Enhanced with clear docs

# API/WS proxied to Go:8080
location /api/ { proxy_pass http://mcp-server:8080; }
location /ws { proxy_pass http://mcp-server:8080; }

# SPA served from Nginx
location / { try_files $uri /index.html; }

๐Ÿค– For AI Agents

Use: http://localhost:8080 (Direct access, no Nginx)

Example:

import requests

# List agents
response = requests.get("http://localhost:8080/api/agents")
agents = response.json()

# Create task
task = {
    "project_id": "...",
    "title": "Implement feature",
    "description": "...",
    "priority": "high",
    "created_by": "agent-id"
}
response = requests.post("http://localhost:8080/api/tasks", json=task)

๐Ÿ’ป MCP Bridge CLI

Setup:

npm install
npm start

Commands:

  • list agents - Show all agents
  • list projects - Show all projects
  • list tasks - Show all tasks
  • create task - Interactive task creation
  • help - Show available commands
  • exit - Quit

๐Ÿ“š Documentation

File Quick Description
ARCHITECTURE_SUMMARY.md ๐Ÿ‘ˆ This file - Quick reference
CLEAN_ARCHITECTURE.md Detailed architecture with diagrams
ARCHITECTURE_VERIFICATION.md Test results and verification
API.md Complete API documentation
COPILOT_INTEGRATION.md GitHub Copilot integration guide
MCP_QUICKSTART.md MCP bridge quick start

๐Ÿ”ง Troubleshooting

Container not starting?

docker-compose logs [service-name]
docker-compose restart [service-name]

Can't access API?

# Check container is running
docker ps | Select-String "8080"

# Test direct access
curl http://localhost:8080/health

Web UI not loading?

# Check Nginx logs
docker logs agent-shaker-web-1

# Verify Nginx is running
docker ps | Select-String "web"

๐ŸŽฏ Key Points to Remember

  1. Go Server (8080): Only API, no Vue.js
  2. Nginx (80): Serves Vue.js + Proxies API
  3. AI Agents: Use port 8080 directly
  4. Web Users: Use port 80 (Nginx)
  5. Clean Separation: Each layer has one job

โœ… Current Status

  • โœ… PostgreSQL: Healthy with sample data
  • โœ… Go Server: Running, serving JSON only
  • โœ… Nginx: Running, proxying correctly
  • โœ… Vue.js: Loaded and accessible
  • โœ… Architecture: Clean and verified

Last Updated: January 21, 2026
Status: All systems operational ๐ŸŸข
Ready for: Production use and AI agent integration ๐Ÿš€