From 27e2b3ee7b7ac36c1fe4a12b6140fe11f53ac2bf Mon Sep 17 00:00:00 2001 From: Viktor Recour Date: Tue, 31 Mar 2026 17:46:04 +0200 Subject: [PATCH] feat: enable MCP tool support in workspace threads Remove MCP tools (Mcp, ListMcpResources, ReadMcpResource, etc.) from both the DISALLOWED_TOOLS deny list and the GLOBAL_OVERRIDES permission rule. The SDK already loads MCP server configs via settingSources: ["user", "project"], but then blocked all MCP tool execution at two layers. This unblocks MCPs configured in ~/.claude.json or .mcp.json. Co-Authored-By: Claude Opus 4.6 --- agents/src/lib/permission-evaluator.ts | 5 ----- core/lib/hooks/tool-deny.ts | 7 ------- 2 files changed, 12 deletions(-) diff --git a/agents/src/lib/permission-evaluator.ts b/agents/src/lib/permission-evaluator.ts index 91471c6..9c2895a 100644 --- a/agents/src/lib/permission-evaluator.ts +++ b/agents/src/lib/permission-evaluator.ts @@ -30,11 +30,6 @@ export const GLOBAL_OVERRIDES: PermissionRule[] = [ decision: "deny", reason: "Worktree creation is managed by Anvil. Use the Bash tool with `git worktree add` if you need a worktree, or ask the user to create one from the sidebar.", }, - { - toolPattern: "^(Mcp|ListMcpResources|ReadMcpResource|SubscribeMcpResource|UnsubscribeMcpResource|SubscribePolling|UnsubscribePolling)$", - decision: "deny", - reason: "MCP is not supported. Do not attempt to use MCP tools.", - }, ]; // ── Helpers ──────────────────────────────────────────────────────── diff --git a/core/lib/hooks/tool-deny.ts b/core/lib/hooks/tool-deny.ts index 5dde135..fbef865 100644 --- a/core/lib/hooks/tool-deny.ts +++ b/core/lib/hooks/tool-deny.ts @@ -5,13 +5,6 @@ export const DISALLOWED_TOOLS = [ "EnterWorktree", - "Mcp", - "ListMcpResources", - "ReadMcpResource", - "SubscribeMcpResource", - "UnsubscribeMcpResource", - "SubscribePolling", - "UnsubscribePolling", ] as const; export type DenyResult =