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

  1. Install Claude-in-Chrome extension (v1.0.99)
  2. Open Claude Code and connect to it via MCP
  3. Call mcp__claude-in-chrome__javascript_tool or mcp__claude-in-chrome__computer with any URL/site
  4. 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 mcpSessionTabGroups in chrome.storage.session, with local_ prefix for Claude Code sessions (e.g., local_a6a8544e-...)
  • chrome.scripting.executeScript works 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.local and chrome.storage.session contain no approvedSites key — the list is purely in-memory
  • Feature flag chrome_ext_classic_javascript_tool_enabled is forced false (regardless of storage value)
  • Feature flag chrome_ext_flash_enabled is forced true

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)

View original on GitHub ↗