1
0
Fork 0

docs: document read-only production MCP for agents

This commit is contained in:
Jason Fraley 2026-10-09 15:10:49 -04:00
parent 37d7297b1a
commit f454d3523d

View file

@ -12,6 +12,20 @@
Next.js 16 + Payload CMS 3.88.0 app for an Arma 3 unit. PostgreSQL database via `@payloadcms/db-postgres` + Drizzle. Tailwind CSS v4 (no config file — CSS-based). shadcn/ui (new-york style, `lucide` icons). Dark-themed frontend.
## Production data (read-only MCP)
This app exposes its Payload collections over MCP (`@payloadcms/plugin-mcp`). The project's `.opencode/opencode.json` connects this workspace to the production instance as `polaris-task-force-prod` (`https://arma.onyxsimple.com/api/mcp`).
**Prefer it for read-only reference data.** When you need to look at current production state (open tickets, a structure's contents, live market listings, a user's profile, and so on) reach for the MCP `find<Collection>` / `find<Global>` tools first: it is the fastest path to live prod data and needs no local setup.
- **Read-only by construction.** The key is minted by `bun run mcp:key prd` (`src/tools/cli/create-mcp-key.ts`), which enables only the `find` capability. It cannot create, update, or delete anything.
- **Tool shape.** One `find<Collection>` tool per collection (camel-cased, e.g. `findGameStructures`, `findMarketListings`), plus `find<Global>` for globals. Args accept a Payload `where` clause as a JSON string, plus `limit` (max 100), `sort`, `select`, `depth`, `page`.
- **Not authoritative for logic.** Read the repo for business rules; the MCP is a reference snapshot.
- **Not a test target, and never a reason to skip tests.**
- **Writes are unchanged.** Updates go through the normal channels (local/stg DB, server actions, Payload migrations via `bun run payload migrate`), verified by tests.
The live connection config is gitignored (`.opencode/`), which is fine for a single-developer setup.
## Package manager
**Bun** is the primary package manager (`bun.lock`; `bunfig.toml` is empty). `package.json` declares `packageManager: pnpm@9.15.4` and several scripts internally invoke pnpm (`db`, `test`, `test:e2e`) — always invoke them via `bun run <script>`, which still works; just don't edit those scripts to use bun directly without testing. `pnpm-lock.yaml` also exists.
@ -489,7 +503,7 @@ Whenever creating a new component or refactoring an existing component's styling
**Pre-deploy dash gate**: before any production build, release version bump, or deploy, run the `dash-sanitize` skill (`/home/jason/.agents/skills/dash-sanitize/SKILL.md`) and show its verification output (re-scan classification + filtered tsc) before proceeding. A dirty user-facing dash scan pauses the release; a clean re-scan on an already-swept tree takes seconds and should still be run rather than assumed.
**Version bumps and release tags: `main` deploys only**: whenever a `/git` or `/git-master` workflow lands work on `main` (or a deploy is being cut), bump the version with `bun pm version patch --message "v%s - <descriptor>"` and push it together with the work. `<descriptor>` is a short comma-separated summary of what the release ships (derived from the commits just created), e.g. `v0.2.4 - add voicelines, update git rules` (never a bare version number). The command itself creates the `vX.Y.Z` version commit **and** a local git tag. `push.followTags` is set in this repo, so a plain `git push` automatically carries the annotated release tag with the commits, but never use a bare `git push --tags`, which sends only tags and not the branch. **Feature branches must never bump versions or push release tags**: parallel branches bumping the same semver line desync `package.json` from the tags that actually deploy, and at merge time the version history no longer matches what shipped. Release tags exist solely to mark `main` deploys. The deployed site's version overlay reads `package.json`'s `version` (Coolify builds have no git metadata, so the displayed version is `<semver>+<commit sha>`), and an unbumped semver means every deploy shows the same `0.2.0`-style number even though the commit-hash suffix changes. Skipping the bump on a `main` deploy (or pushing the deploy commit without its tag) makes releases indistinguishable and breaks version history.
**Version bumps and release tags: `main` deploys only**: whenever a `/git` or `/git-master` workflow lands work on `main` (or a deploy is being cut), bump the version with `bun pm version patch --message "v%s - <descriptor>"` and push it together with the work. `<descriptor>` is a short comma-separated summary of what the release ships (derived from the commits just created), e.g. `v0.2.4 - add voicelines, update git rules` (never a bare version number). The command itself creates the `vX.Y.Z` version commit **and** a local git tag. `push.followTags` is set in this repo, so a plain `git push` automatically carries the annotated release tag with the commits, but never use a bare `git push --tags`, which sends only tags and not the branch. **Order that makes deploys readable**: cut the release (version bump + tag) FIRST via `bun pm version`, THEN run `/changelog --save` with no arguments (it auto-resolves the two most recent tags), commit the changelog, and push last. Bumping last leaves a `docs: add vX.Y.Z changelog entry` commit as the pushed tip, so the Coolify deploy list shows that instead of the release descriptor; bumping first makes the descriptive version commit the tip and the changelog still ships, one commit behind the tag. **Feature branches must never bump versions or push release tags**: parallel branches bumping the same semver line desync `package.json` from the tags that actually deploy, and at merge time the version history no longer matches what shipped. Release tags exist solely to mark `main` deploys. The deployed site's version overlay reads `package.json`'s `version` (Coolify builds have no git metadata, so the displayed version is `<semver>+<commit sha>`), and an unbumped semver means every deploy shows the same `0.2.0`-style number even though the commit-hash suffix changes. Skipping the bump on a `main` deploy (or pushing the deploy commit without its tag) makes releases indistinguishable and breaks version history.
## Gotchas