[BUG] Cowork sandbox blocks MCP subprocess connections to Google APIs

Resolved 💬 3 comments Opened Apr 4, 2026 by spleenteo Closed Apr 8, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Summary

MCP servers running inside Cowork's sandbox cannot connect to Google APIs due to network allowlist
restrictions. This affects any MCP server that requires Google OAuth authentication (e.g.,
mcp-gsheets).

### Steps to reproduce

  1. Configure mcp-gsheets in .mcp.json with a Google service account
  2. Open the project in Cowork
  3. Try to read a Google Sheet via the MCP tool

### Actual behavior

The tool returns a generic "Permission denied" error. After debugging, the root cause is that the
MCP subprocess inside the sandbox cannot reach oauth2.googleapis.com/token — the connection is
blocked by the network allowlist/proxy.

The error from the sandbox:
Connection blocked by network allowlist

### Environment

  • macOS (Darwin 25.3.0)
  • Claude Code CLI: works fine with same .mcp.json and credentials
  • Cowork: fails due to network restriction in sandbox
  • MCP server: mcp-gsheets@latest (v1.6.0)

### Suggested fix

Add the following domains to the Cowork sandbox network allowlist for MCP subprocesses:

  • oauth2.googleapis.com (OAuth token endpoint)
  • sheets.googleapis.com (Sheets API)
  • Ideally *.googleapis.com to cover other Google MCP integrations

### Notes

This likely affects any MCP server that connects to Google Cloud services (Sheets, Drive,
Calendar, etc.) via service account authentication. The misleading "Permission denied" error made
this very hard to diagnose — it took significant debugging to discover the actual network
restriction.

What Should Happen?

### Expected behavior

The MCP server authenticates with Google and returns data (works perfectly from Claude Code on the
same machine with the same config).

Error Messages/Logs

# Error from mcp-gsheets tool in Cowork:
  "Please ensure the service account has access to the spreadsheet.
  Share the spreadsheet with the service account email address."

  # Actual root cause (discovered via bash test inside Cowork sandbox):
  Connection blocked by network allowlist

  # The MCP server starts successfully:
  Google Sheets MCP server running on stdio

  # But when it tries to authenticate with Google OAuth:
  # oauth2.googleapis.com/token → blocked by sandbox network proxy

Steps to Reproduce

Steps to reproduce

  1. Configure mcp-gsheets in .mcp.json with a Google service account
  2. Open the project in Cowork
  3. Try to read a Google Sheet via the MCP tool

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.92 (Claude Code) || Cowork Get Claude CLI version 2.1.87 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗