Skip to content

docs: recommend Postgres + Valkey MCP servers for agent DX - #113

Merged
agjs merged 1 commit into
mainfrom
docs/mcp-servers
Jun 2, 2026
Merged

docs: recommend Postgres + Valkey MCP servers for agent DX#113
agjs merged 1 commit into
mainfrom
docs/mcp-servers

Conversation

@agjs

@agjs agjs commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Building on BoringStack with a coding agent, the agent reads code fine but is blind to runtime state — live schema, rows, cache keys/TTLs, queue backlog — so it guesses. This wires MCP servers at the local dev stack to close that gap. Fills the ROADMAP.md Workstream-D "AI MCP recommendation" item.

What's added

  • .mcp.json.example (repo root, opt-in) — cp .mcp.json.example .mcp.json and the agent gets:
    • Postgres (read-only) via postgres-mcp --access-mode=restricted — schema, indexes, row samples, EXPLAIN. Pinned --python 3.13 (newer Pythons lack a pglast wheel and fall back to a failing source build).
    • Valkey/Redis via the official redis-mcp-server — keys, TTLs, bull:* queue state.
    • Both via uvx; connection defaults match the dev stack (app/app_dev_password/app, Valkey DB 0).
  • reference/mcp-servers.mdx — why, 4-step setup, a trigger→use table, dev-only + read-only cautions (incl. an optional read-only Postgres role), tie-back to lint-as-contract / spec loop. Sidebar entry under Reference + an inbound link from before-you-build.
  • .gitignore — ignores the user's real .mcp.json (may carry creds); the example is the tracked source.

Why it works with zero extra infra

The development-labels overlay already publishes Postgres 5432 and Valkey 6379 on the host "so developers can psql/valkey-cli" — production never does. So after dev.sh up, a host-run MCP server connects straight to the dev DBs.

Validation

  • Both servers install + run via the exact uvx commands in the example.
  • The example's connection strings authenticate against the running dev Postgres (SELECT ok) and Valkey (PONG).
  • bun run build:ci (docs) clean; pre-push gate (security + docs) passed.
  • Not automatable here: the agent-speaks-MCP round trip. Verify in-editor: cp .mcp.json.example .mcp.json, open Claude Code, ask "list the tables" / "show the cache keys"; confirm a write through the Postgres server is refused (restricted mode).

Dev-DX only — no API/UI/prod runtime changes.

Adds a Reference page and an opt-in .mcp.json.example wiring read-only Postgres
(crystaldba/postgres-mcp, --access-mode=restricted) and the official Redis MCP
(redis-mcp-server) at the local dev stack, so a coding agent can read the live
schema, rows, cache keys, and queue state instead of guessing.

The dev overlay already publishes 5432/6379 on the host (prod never does), so
the config works after `dev.sh up` + `cp .mcp.json.example .mcp.json`. Both
servers run via uvx (the postgres one pinned to --python 3.13 to dodge a missing
pglast wheel on newer Pythons). .mcp.json is gitignored; the example is the
source. Fills the ROADMAP Workstream-D 'AI MCP recommendation' item.

Validated: both servers install + run via the exact commands; the example's
connection strings authenticate against the running dev Postgres and Valkey;
docs build:ci clean.
@agjs
agjs merged commit f25a192 into main Jun 2, 2026
27 checks passed
@agjs
agjs deleted the docs/mcp-servers branch June 2, 2026 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant