Quickstart
Audience: Engineers setting up the Case Automation MCP Server for the first time.
Time to complete: ~10 minutes.
What you will accomplish: Install dependencies, start backing services, run the full test suite, and start both the MCP server and sidecar locally.
The project requires Python 3.12+. Do not use bare python3 -m pytest — the system Python may be 3.11. Always run commands through uv.
Prerequisites
| Tool | Version | Install |
|---|---|---|
| Python | 3.12+ | python.org (opens in a new tab) |
uv | latest | curl -LsSf https://astral.sh/uv/install.sh | sh |
| PostgreSQL | 16 | Docker or local |
| Redis | 7 | Docker or local |
Step 1 — Clone and install
git clone https://github.com/pt-act/Case_Automation_MCP.git\ncd Case_Automation_MCP\nuv sync --extra devExpected result: uv resolves Python 3.12+, installs all project dependencies including dev extras, and creates a virtual environment at .venv/.
Step 2 — Environment variables
cp .env.example .envEdit .env and fill in at minimum:
# Required
CAM_DATABASE_URL=postgresql+asyncpg://cam:cam_test_pw@localhost:5432/cam_test
CAM_REDIS_URL=redis://localhost:6379/0
CAM_ENCRYPTION_KEK=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= # base64 32-byte key
# Optional — defaults shown
CAM_SECRET_BACKEND=env
CAM_LOG_LEVEL=INFO
CAM_RESIDENCY_REGION=us-east-1
CAM_OTEL_EXPORTER_ENDPOINT= # OpenTelemetry collector (optional)
CAM_FEATURE_FLAGS='{"intake":false,"status_update":false,"document_gen":false,"document_routing":false,"qc":false}' # All feature flags in one JSON blob
CAM_EXTRACTION_ALLOW_EXTERNAL_INFERENCE=false.env is already in .gitignore. The CI workflow uses a zero-filled test KEK. Production must use a real 256-bit key from your secret store.
Step 3 — Start backing services
If you have Docker:
docker compose up -d postgres redisExpected result: docker ps shows postgres:16 and redis:7 containers running.
Step 4 — Database migrations
uv run alembic upgrade headExpected result: Alembic applies all migrations and reports head.
Step 5 — Run the test suite
uv run pytest -qExpected result: 424 passed, 1 skipped in ~3.5 seconds. The 1 skipped test is intentional (test_reminder_fires_exactly_once — no armed reminders in that edge scenario).
If you see AttributeError: 'PrintLogger', your conftest.py may be outdated. Pull the latest main branch.
Step 6 — Start the servers
MCP server (stdio mode for local agents)
uv run python -m cam.mcp_serverSidecar (webhooks + approval UI)
uv run uvicorn cam.sidecar.main:app --port 8001 --reloadExpected result:
- Sidecar health endpoint returns
{"status":"ok"}athttp://localhost:8001/health - Webhook ingestion endpoint is ready at
POST /webhooks/{connector} - Approval endpoints are ready at
GET /approvals/{token}andPOST /approvals/{token}
Verification checklist
- uv sync completes without errorsIn progress
- PostgreSQL and Redis containers are runningIn progress
- Alembic migrations reach headIn progress
- 424 tests pass (1 skipped)In progress
- Sidecar health endpoint returns okIn progress
Common issues
| Symptom | Cause | Fix |
|---|---|---|
RuntimeError: Intake services not configured | configure_services() not called | Ensure you are running cam.sidecar.main which bootstraps all services |
KeyError: workflow 'intake' not registered | register_intake_workflow() not called | Same — use the official entry point |
requires-python >=3.12 error | Wrong interpreter | Always use uv run … |
Tests fail on PrintLogger | Outdated conftest | Pull latest main; _reset_global_singletons fixture handles this |
What next?
- Architecture — Understand the system layout and data flow
- Capabilities — Explore every tool, service, and workflow
- Client Intake Workflow — Run your first end-to-end workflow
Last updated: 2026-06-01