Skip to content

v1.14.1 — per-tool MCP forward-arg allowlist (all built-ins)#19

Merged
wyckit merged 1 commit into
masterfrom
fix/v1.14.1-mcp-forward-allowlist
Jun 22, 2026
Merged

v1.14.1 — per-tool MCP forward-arg allowlist (all built-ins)#19
wyckit merged 1 commit into
masterfrom
fix/v1.14.1-mcp-forward-allowlist

Conversation

@wyckit

@wyckit wyckit commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Extends the strict forward-arg allowlist to every built-in MCP tool (not just filesystem), and fixes a v1.14.0 over-strip. 251 passing + 3 env-gated skipped.

What

  • ForwardArgAllowlist lists each built-in tool's full legitimate arg surface — send_email {to,subject,body}, run_command {cmd}, read_calendar {range}, and the full @modelcontextprotocol/server-filesystem set. Args outside a tool's surface are stripped before forwarding, so an unrecognized/unchecked key can't be honored.
  • Corrects v1.14.0: the blanket fs key-set (path/source/destination/paths/content) would have dropped legitimate args of edit_file (edits), search_files (pattern), directory_tree (excludePatterns), read_text_file (head/tail), list_directory_with_sizes (sortBy). Each tool now lists its real surface — strict and functional.
  • Custom-mapper tools not in the allowlist are forwarded unchanged (the mapper owns its arg surface).

Tests

Non_filesystem_forward_strips_unknown_args (read_calendar), Forward_allowlist_keeps_a_tools_full_arg_surface (search_files keeps pattern, strips evil). The live FS-E2E continues to exercise read/write.

The filesystem allowlists track the pinned @modelcontextprotocol/server-filesystem@2026.1.14; bump them with the package.

🤖 Generated with Claude Code

Extends the v1.14.0 forward-arg stripping from filesystem-only to EVERY built-in
tool, and corrects an over-strip:

- ForwardArgAllowlist maps each built-in tool to its full legitimate arg surface:
  send_email {to,subject,body}, run_command {cmd}, read_calendar {range}, plus the
  full @modelcontextprotocol/server-filesystem tool set (read_file {path,head,tail},
  edit_file {path,edits,dryRun}, search_files {path,pattern,excludePatterns}, etc.).
  Any arg outside a tool's surface is stripped before forwarding.
- Fixes the v1.14.0 blanket fs key-set (path/source/destination/paths/content) which
  would have dropped legitimate args of richer fs tools (edits, pattern, head/tail,
  sortBy, excludePatterns) — strictness no longer breaks function.
- Custom-mapper tools not in the allowlist are forwarded unchanged (mapper owns the surface).
- NormalizeForForward restructured: fs path-canonicalization (under a root) then the
  per-tool allowlist for any built-in.

Tests: non-fs strip (read_calendar), full-surface preservation (search_files keeps
pattern, strips unknown). 251 passing + 3 env-gated skipped.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@wyckit wyckit merged commit 991eeca into master Jun 22, 2026
2 checks passed
@wyckit wyckit deleted the fix/v1.14.1-mcp-forward-allowlist branch June 22, 2026 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant