Configuration Environment variables, projects.yaml, volumes, ports, tokens.
Service Port Purpose worker 8000 webhook / rebuild / status / stats / graph.html mcp 8080 agent MCP endpoint (/mcp, bearer token) view 3000 human graph viewer postgres 5432 internal only
Volume Mounted at Holds pgdatapostgres /var/lib/postgresql/data projects, builds, tokens, audit, annotations graphdataworker + mcp /data versioned graph output + current symlink
graphdata must be shared between worker (writes) and mcp (reads). Old graph versions are
pruned (default: keep 5). docker compose down -v deletes volumes.
Var Default POSTGRES_USERknowledgePOSTGRES_PASSWORDchange-me — set this POSTGRES_DBknowledge
Var Example IMAGE_PREFIXghcr.io/dimsmaul/mercatorgraphTAG0.1.1 or latest
Var Default Purpose WORKER_CORS_ORIGINS*allowed browser origins (the viewer) DEBOUNCE_SECONDS0coalesce webhook push bursts per project (0 = off) NOTIFY_URL— POST build.succeeded on promote (Slack-compatible) VIEW_CONTENT_DIR— regenerate viewer MDX on promote ENCRYPTION_KEY— Fernet key to decrypt repo deploy keys
Var Default Purpose WORKER_URL / PUBLIC_WORKER_URLhttp://localhost:19883browser-reachable worker URL
projects :
- slug : demo
repo_url : https://github.com/octocat/Hello-World.git
branch : master
webhook_secret_ref : WEBHOOK_SECRET_DEMO # env var with the HMAC secret
# rebuild_interval: 3600 # cron: seconds between rebuilds
# deploy_key_ref: /run/secrets/demo.enc # encrypted SSH key for a private repo
A project needs both a projects.yaml entry (how to build) and a projects table row
(what's listed).
Webhook : POST /webhook/{slug} with X-Hub-Signature-256 HMAC.
Manual : POST /projects/{slug}/rebuild.
Cron : set rebuild_interval on the project.
Stored as SHA-256 hashes. scopes is an array of project slugs or ['*']. Optional
expires_at and revoked — the MCP verifier rejects expired or revoked tokens. Every tool
call is audited.