AutoTask Installation
Complete guide for setting up AutoTask from scratch. Follow these steps in order.
Prerequisites Check
Before starting, verify you have:
- • Docker and Docker Compose installed
- • Python 3.11+ with
uvpackage manager - • Node.js 20+ and npm
- • Git (for cloning/updating)
Check commands:
docker --version docker-compose --version uv --version node --version npm --version
Installation Steps
Step 1: Environment Variables Setup
Set up environment files for each component:
Database (infra/.env):
cd infra cp .env.example .env # Edit .env and set DB_PASSWORD (required)
API (api/.env):
cd api cp .env.example .env # Edit if needed (usually optional)
Bridge (bridge/.env):
cd bridge cp .env.example .env # Edit if needed (FASTAPI_URL defaults to http://localhost:8000)
Step 2: Start Database and Services
Start PostgreSQL and application services with Docker:
cd infra docker-compose up -d
This will:
- •Start PostgreSQL database on port 5432
- •Build and start the app container (UI + API)
- •Services available at:
- •UI & API: http://localhost:8000
- •Database: localhost:5432 (internal Docker network)
Verify services are running:
docker-compose ps # Should show 'db' and 'app' services as 'Up'
Step 3: Install API Dependencies
Install Python dependencies for the API:
cd api uv sync
Step 4: Run Database Migrations
Apply database schema migrations:
cd api uv run alembic upgrade head
Verify migrations:
# Check migration status uv run alembic current # Should show the latest migration version
Step 5: Install Bridge Dependencies
Install Python dependencies for the MCP bridge:
cd bridge uv sync
Step 6: Install UI Dependencies
Install Node.js dependencies for the React UI:
cd ui npm install
Step 7: Verify MCP Bridge Configuration
Check that the MCP bridge is configured in Cursor:
# Verify .cursor/mcp.json exists and has autotask server configured cat .cursor/mcp.json
The configuration should include:
{
"mcpServers": {
"autotask": {
"command": "uv",
"args": ["run", "--directory", "bridge", "python", "-m", "bridge"],
"env": {
"FASTAPI_URL": "http://localhost:8000"
}
}
}
}
Restart Cursor after configuration to activate the MCP bridge.
Verification
Check API Health
curl http://localhost:8000/api/health
# Should return: {"status":"ok"}
Check Database Connection
# From api directory uv run python -c "from app.database import engine; import asyncio; asyncio.run(engine.connect())" # Should connect without errors
Check UI
Open browser: http://localhost:8000
Check MCP Bridge
The bridge runs automatically when Cursor starts. To test manually:
cd bridge uv run python -m bridge # Should start MCP server (will wait for input via stdio)
Development Mode
Running Services Locally (without Docker)
API:
cd api uv run uvicorn app.main:app --reload
UI:
cd ui npm run dev
Bridge:
cd bridge uv run python -m bridge
Database: Keep Docker database running:
cd infra docker-compose up -d db
Troubleshooting
Database Connection Issues
- •Verify
DB_PASSWORDis set ininfra/.env - •Check database is running:
docker-compose ps - •Check database logs:
docker-compose logs db - •Verify DATABASE_URL in API environment
Migration Errors
- •Ensure database is running and accessible
- •Check
DATABASE_URLinapi/.envmatches Docker setup - •Try:
uv run alembic downgrade -1thenuv run alembic upgrade head
MCP Bridge Not Working
- •Verify
.cursor/mcp.jsonexists and is valid JSON - •Check bridge path is correct (relative to project root)
- •Ensure bridge dependencies installed:
cd bridge && uv sync - •Restart Cursor completely
Port Conflicts
If port 8000 or 5432 are in use:
- •Change ports in
infra/docker-compose.yml - •Update
FASTAPI_URLin bridge configuration - •Update API environment variables
Quick Setup Checklist
Copy this checklist and track progress:
AutoTask Installation: - [ ] Prerequisites verified (Docker, uv, Node.js) - [ ] Environment files created (infra/.env, api/.env, bridge/.env) - [ ] Docker services started (docker-compose up -d) - [ ] API dependencies installed (cd api && uv sync) - [ ] Database migrations run (cd api && uv run alembic upgrade head) - [ ] Bridge dependencies installed (cd bridge && uv sync) - [ ] UI dependencies installed (cd ui && npm install) - [ ] MCP configuration verified (.cursor/mcp.json) - [ ] API health check passed - [ ] UI accessible at http://localhost:8000 - [ ] Cursor restarted to activate MCP bridge
Next Steps
After installation:
- •Access UI at http://localhost:8000
- •Use MCP tools in Cursor (create_task, list_tasks, etc.)
- •Start developing features following full-stack patterns
Common Commands Reference
# Start all services cd infra && docker-compose up -d # Stop all services cd infra && docker-compose down # View logs cd infra && docker-compose logs -f # Restart services cd infra && docker-compose restart # Run migrations cd api && uv run alembic upgrade head # Create new migration cd api && uv run alembic revision --autogenerate -m "description"