1
0
Fork 0

feat(mcp): add read-only server instructions to the MCP plugin

This commit is contained in:
Jason Fraley 2026-10-09 15:10:52 -04:00
parent f454d3523d
commit 4de7a4e923

View file

@ -508,6 +508,22 @@ export default buildConfig({
// storage-adapter-placeholder
mcpPlugin({
collections: mcpCollections,
// Server-side guidance shown to MCP clients: this endpoint is read-only
// (keys carry only the `find` capability), so it is a reference surface
// for current production state, never a write path.
mcp: {
serverOptions: {
serverInfo: { name: "Polaris Task Force (production)", version: "1.0.0" },
instructions: [
"Polaris Task Force production data, read-only.",
"Every collection is exposed as a find<Collection> tool (and find<Global> for globals).",
"These tools only read: the API key has the find capability only, so mutations are impossible.",
"Use them to look up current production state for reference (tickets, users, structures, market listings, and so on) rather than deriving it from source.",
"Pass Payload `where` clauses as JSON strings; limit is capped at 100.",
"Writes and schema changes go through the normal channels (server actions, Payload migrations), never this server.",
].join("\n"),
},
},
// MCP API keys let a client act as their user, so issuing them is a
// superuser-tier operation: `system:admin-access` passes for dynamic
// superusers (hasPermission bypass) and for roles explicitly holding it.