feat(mcp): add read-only server instructions to the MCP plugin
This commit is contained in:
parent
f454d3523d
commit
4de7a4e923
1 changed files with 16 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue