Guide
Run one agent across your repo and your database
One agent, two connected sources. Mount a GitHub repo and a Postgres database into the same project workspace, then let any MCP agent read both with `sh` to reconcile schema drift in a single run.
7/9/2026 · connect0 · 4 min
This is the Run pillar in one guide — one agent, reading across two connected sources from a single workspace to do work no single tool could.
A connector mounts an external source read-only into your project's /workspace/connectors/<mount_prefix>/. Mount two of them into the same project and any MCP agent — Claude, ChatGPT, Cursor, Copilot — can read both side by side with the sh tool. No glue scripts, no copy-pasting a schema dump into a prompt. The connections live in the core; the agent just reads files.
Here's a real cross-source task: reconcile the migrations checked into your repo against the schema of the live database.
Connect the GitHub repo
connector.add registers the instance and writes the audit row — it does not fetch yet. connector.refresh materialises the content.
connector.add {
"account_slug": "acme",
"project_slug": "reconcile",
"connector_name": "github",
"mount_prefix": "app-repo",
"config": { "owner": "acme", "repo": "app", "ref": "main" },
"credentials_ref": "acme-app-gh" // resolves to a stored PAT
}
connector.refresh {
"account_slug": "acme",
"project_slug": "reconcile",
"mount_prefix": "app-repo"
}
Connect the Postgres database
Same two-step shape. The Postgres connector materialises a read-only snapshot as CSV — and its views config lets you shape exactly what lands. Here we pull information_schema.columns so the agent has the live column layout to compare against:
connector.add {
"account_slug": "acme",
"project_slug": "reconcile",
"connector_name": "postgres",
"mount_prefix": "prod-db",
"config": {
"schemas": ["public"],
"max_rows": 100000,
"views": {
"live_columns": "select table_name, column_name, data_type from information_schema.columns where table_schema = 'public' order by table_name, ordinal_position"
}
},
"credentials_ref": "acme-prod-dsn" // resolves to a stored DSN
}
connector.refresh {
"account_slug": "acme",
"project_slug": "reconcile",
"mount_prefix": "prod-db"
}
Read both, reconcile in one run
Both sources now sit in the same workspace. The agent reads the migration SQL from the repo mount and the live column dump from the DB mount, then does the diff with plain shell:
sh "ls /workspace/connectors/app-repo/db/migrations/"
sh "cat /workspace/connectors/prod-db/live_columns.csv"
sh "grep -rhoE 'add column [a-z_]+' /workspace/connectors/app-repo/db/migrations/ \
| sort -u > /workspace/repo-cols.txt"
sh "tail -n +2 /workspace/connectors/prod-db/live_columns.csv \
| cut -d, -f2 | sort -u > /workspace/live-cols.txt"
sh "comm -3 /workspace/repo-cols.txt /workspace/live-cols.txt"
The final comm line is the whole point: columns the migrations declare but the live DB is missing, and columns the live DB has that no migration explains — surfaced in one run, from one agent, reading two governed sources. /workspace persists to R2, so the intermediate files survive across calls and the agent can iterate.
Confirm both mounts are current anytime:
connector.list { "account_slug": "acme", "project_slug": "reconcile" }
Where this fits
This is the Run your agents pillar of connect0 — the core that connects everything your company runs on. When your repo and your database live in the same governed workspace, one agent can reason across both in a single run instead of you shuttling data between tools. Start building → · All guides →