REQ-MCP-009: Operator permission gate with deny precedence and server-derived patterns

← Requirements

What it requires

  1. Given both an allow and a deny pattern matching a call, When permission is evaluated, Then the call is denied; a glob pattern matches every tool under its server; an argument-level pattern matches only the qualifying arguments; with both lists empty nothing is denied; a runtime-added allow pattern takes effect on the next call; get_permission_pattern delegates to the server when the prefix is known and falls back otherwise.
tier
NOT_RUN

Where it lives

  • src/mcp13

See it on the map

How it is met

implemented byresults (79 tests)add_permissionadd_permissionargs_to_patterncheck_approvalcheck_approval_pcexecuteget_permission_patternget_permission_patternget_permission_patternis_allowedis_deniedis_explicitly_allowedpattern_matches79 absent79 tests, a summary by result: every test is in the tests table below

Show on the map

Implemented by

Tests (79)

Reached through calls

79 tests: 79 absent

testresultlinked byimplementers exercisedcalls away
add_permission inserts a runtime allow patternabsentinferred5 of 131
Permission denied blocks executionabsentinferred4 of 13: args_to_pattern, execute, is_denied, pattern_matches1
Permission denied blocks external toolsabsentinferred4 of 13: args_to_pattern, execute, is_denied, pattern_matches1
ServerManager routes to external serverabsentinferred4 of 13: args_to_pattern, execute, is_denied, pattern_matches1
Tool routingabsentinferred4 of 13: args_to_pattern, execute, is_denied, pattern_matches1
Unknown server returns errorabsentinferred4 of 13: args_to_pattern, execute, is_denied, pattern_matches1
connect_external_server(spec) forwards env to child processabsentinferred4 of 13: args_to_pattern, execute, is_denied, pattern_matches1
gh#171: an external server can come and go while runs route callsabsentinferred4 of 13: args_to_pattern, execute, is_denied, pattern_matches1
gh#203: followup returns delegation_id and summary from real storageabsentinferred4 of 13: args_to_pattern, execute, is_denied, pattern_matches1
is_explicitly_allowed checks the permission allow-listabsentinferred4 of 13: args_to_pattern, is_allowed, is_explicitly_allowed, pattern_matches1
Add permission runtimeabsentinferred3 of 13: add_permission, is_allowed, pattern_matches1
Deny takes precedenceabsentinferred3 of 13: is_allowed, is_denied, pattern_matches1
Argument level patternabsentinferred2 of 13: is_allowed, pattern_matches1
Empty lists — nothing deniedabsentinferred2 of 13: is_denied, pattern_matches1
Glob pattern matchingabsentinferred2 of 13: is_allowed, pattern_matches1
Tool level patternabsentinferred2 of 13: is_allowed, pattern_matches1
Default permission patternabsentinferred1 of 13: get_permission_pattern1
get_permission_pattern delegates to server when prefix is knownabsentinferred1 of 13: get_permission_pattern1
outside-root: an OMITTED allow_outside_root is `optional` and absentinferred4 of 13: args_to_pattern, execute, is_denied, pattern_matches2
outside-root: an explicit `optional` behaves as the defaultabsentinferred4 of 13: args_to_pattern, execute, is_denied, pattern_matches2
outside-root: outside_root_deny beats allow_outside_root: true and absentinferred4 of 13: args_to_pattern, execute, is_denied, pattern_matches2
A call that fails identically is refused rather than retried absentinferred6 of 134
Anti-spiral hard block stops dispatch and emits absentinferred6 of 134
Anti-spiral hard block uses derived default when sentinel setabsentinferred6 of 134
Auto approve skips callbackabsentinferred6 of 134
Chained POST_TOOL_CALL hooks: last write winsabsentinferred6 of 134
Circuit breaker at threeabsentinferred6 of 134
Duplicate counter resetsabsentinferred6 of 134
Duplicate detection skipsabsentinferred6 of 134
Error result not cached for dedupabsentinferred6 of 134
Headless mode denies without callbackabsentinferred6 of 134
Max tool calls per turnabsentinferred6 of 134
Multiple tool calls in batchabsentinferred6 of 134
POST_TOOL_CALL fires on duplicate rejection with kindabsentinferred6 of 134
POST_TOOL_CALL fires on schema rejection with kindabsentinferred6 of 134
POST_TOOL_CALL hook transforms duplicate-rejection contentabsentinferred6 of 134
POST_TOOL_CALL hook transforms schema-rejection contentabsentinferred6 of 134
POST_TOOL_CALL hook transforms successful tool result contentabsentinferred6 of 134
POST_TOOL_CALL with *modified_json == NULL leaves content untouchedabsentinferred6 of 134
PRE/POST_TOOL_CALL fire for successful callsabsentinferred6 of 134
PRE_TOOL_CALL cancel short-circuits dispatch and still fires POSTabsentinferred6 of 134
Permission denied returns feedbackabsentinferred6 of 134
Process single tool callabsentinferred6 of 134
Schema validation rejects invalid enum valueabsentinferred6 of 134
Schema validation rejects missing required fieldabsentinferred6 of 134
Tool call history records successful executionsabsentinferred6 of 134
Tool emits directives → ToolExecutor extracts + dispatches themabsentinferred6 of 134
Tool executor processes calls via ServerManagerabsentinferred6 of 134
effective_max_tool_calls_per_turn overrides global limitabsentinferred6 of 134
gh#111: POST_TOOL_CALL hook returning malformed UTF-8 is absentinferred6 of 134
gh#143: an argument-free call serialises as an object absentinferred6 of 134
gh#143: an argument-free call to a no-required-fields tool absentinferred6 of 134
gh#143: dispatch converts a throwing tool into a tool errorabsentinferred6 of 134
gh#168: a rewritten payload carrying bad UTF-8 is sanitized, absentinferred6 of 134
gh#168: the rewrite is visible to the dup cache and POST hookabsentinferred6 of 134
gh#190: a structured JSON error counts as a failure everywhereabsentinferred6 of 134
gh#211: a tier that declares an EMPTY allowlist may call nothingabsentinferred6 of 134
gh#83: allowlisted tool dispatches normallyabsentinferred6 of 134
gh#83: empty locked_tier bypasses enforcementabsentinferred6 of 134
gh#83: no map wired = pass-through (pre-v2.5.2 behavior)absentinferred6 of 134
gh#83: off-allowlist tool is rejected_unauthorized at dispatchabsentinferred6 of 134
gh#83: tier with no allowlist entry is unrestrictedabsentinferred6 of 134
mcp.bash.timeout_seconds reaches the dispatched bash serverabsentinferred6 of 134
process_single_call completes with locked_tier setabsentinferred6 of 134
v2.14.0: schema validation enforces declared minimum and maximumabsentinferred6 of 134
v2.14.6: a headless host still dispatches engine directivesabsentinferred6 of 134
gh#158: a delegated child's read satisfies its parent's write — absentinferred6 of 135
gh#158: a session's tool call never resolves inside another absentinferred6 of 135
gh#158: repeated sandbox swaps race nothing a concurrent absentinferred6 of 135
gh#158: two sessions reading and writing through ONE filesystem absentinferred6 of 135
gh#158: two sessions writing todos through ONE entropic server absentinferred6 of 135
gh#168: a PRE_TOOL_CALL hook's modified args reach the toolabsentinferred6 of 135
gh#168: a malformed modification is refused, not half-appliedabsentinferred6 of 135
gh#168: a modification that renames the tool is refusedabsentinferred6 of 135
gh#168: a non-zero return still cancels, modification or notabsentinferred6 of 135
gh#158: clearing the default conversation releases the default absentinferred6 of 136
gh#158: each session's todo list is its ownabsentinferred6 of 136
gh#158: ending a session's conversation releases its read absentinferred6 of 136
gh#158: read-before-write is judged per session — another absentinferred6 of 136