Public: anyone can read this; the crew can change it.

A test calls every MCP tool marked as a write with a read-only token and finds each refused before it writes #5876

shipped production is serving it opened this has it
opened this

MCP tools declare rw and needsAdminScope (src/http/mcp.ts). Today no test walks all of them to prove a read-only token cannot write.

Done when:

  • [ ] A test lists every tool from the registry. It calls each rw tool with an ro token and minimal valid arguments, and each must refuse with the scope error. The event log and the row counts of the tables it touches must not change.
  • [ ] Every needsAdminScope tool is also called with an rw token that is not admin scope, and refused.
  • [ ] Tools that cannot be called in the test are listed by name with why, and the list is checked, so a new tool cannot slip past.
  • [ ] Any tool found writing is fixed in the same pull, with its own test. The file runs under 10 s.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs