Claude-in-Chrome: javascript_tool and computer always fail with 'Host access is restricted by policy' from Claude Code MCP (local_ sessions)
Status Open
Maintainer reply None cached
Activity 0 comments · opened Oct 8, 2026
Summary
When using Claude-in-Chrome extension tools (javascript_tool, computer) via Claude Code's MCP connection, every call fails with:
Host access is restricted by policy
This works correctly on claude.ai but never works from Claude Code (local MCP sessions).
Steps to Reproduce
- Install Claude-in-Chrome extension (v1.0.99)
- Open Claude Code and connect to it via MCP
- Call
mcp__claude-in-chrome__javascript_toolormcp__claude-in-chrome__computerwith any URL/site - Observe error:
Host access is restricted by policy
Root Cause (Investigated)
Through deep investigation of the extension's service worker code:
- The extension stores an approved sites list in-memory only (in a closure in
mcpPermissions-Dvpkli6y.js) - On claude.ai, a permission dialog appears prompting the user to approve a site, which populates this in-memory list
- For
local_MCP sessions (Claude Code), this permission dialog never appears — the approved sites list remains empty forever - Session is identified by
mcpSessionTabGroupsinchrome.storage.session, withlocal_prefix for Claude Code sessions (e.g.,local_a6a8544e-...) chrome.scripting.executeScriptworks correctly at the Chrome API level (tested directly from service worker DevTools console) — the block is purely in the extension's own permission check layer
Evidence
chrome://policy/shows "No policies set" — this is not a Chrome Enterprise policy restriction- Directly calling
chrome.scripting.executeScript(...)from service worker console returns success chrome.storage.localandchrome.storage.sessioncontain noapprovedSiteskey — the list is purely in-memory- Feature flag
chrome_ext_classic_javascript_tool_enabledis forcedfalse(regardless of storage value) - Feature flag
chrome_ext_flash_enabledis forcedtrue
Expected Behavior
A permission approval dialog should appear for local_ Claude Code MCP sessions (same as it does for claude.ai sessions), allowing users to approve sites and use javascript_tool/computer tools.
Actual Behavior
No permission dialog ever appears for Claude Code sessions. All tool calls immediately fail with "Host access is restricted by policy".
Environment
- Extension: Claude-in-Chrome v1.0.99 (ID:
fcoeoabgfenejglbffodgkkbkcdhcgfn) - Claude Code: latest
- Chrome: latest
- OS: macOS 25.2.0
- Session type: local MCP (
local_prefix)