Skip to content

Conversation

@alexei-led
Copy link
Owner

Summary

  • Add /opt/homebrew to macOS Seatbelt sandbox read paths to allow AWS CLI execution via uvx on Apple Silicon Macs
  • Fixes dyld "file system sandbox blocked open()" errors when running uvx aws-mcp

Problem

When running uvx aws-mcp from Claude Code, AWS CLI commands failed with:

dyld: Library not loaded: /opt/homebrew/Cellar/[email protected]/.../Python
Reason: file system sandbox blocked open()

The Seatbelt sandbox profile didn't include /opt/homebrew, blocking access to Homebrew-installed Python libraries on Apple Silicon Macs.

Changes

  1. Added /opt/homebrew to SandboxConfig._default_read_paths() for Darwin
  2. Added (subpath "/opt/homebrew") to MacOSSeatbeltBackend.PROFILE_TEMPLATE

Test plan

  • All 220 existing tests pass
  • Manual test: Run uvx aws-mcp and execute AWS CLI commands on Apple Silicon Mac

The Seatbelt sandbox profile was blocking access to Homebrew-installed
Python libraries on Apple Silicon Macs, causing dyld errors when
running AWS CLI commands via uvx.

Add /opt/homebrew to:
- SandboxConfig._default_read_paths() for Darwin
- MacOSSeatbeltBackend.PROFILE_TEMPLATE read paths
@alexei-led alexei-led force-pushed the fix/macos-homebrew-sandbox branch from 7aaf609 to 7557d3b Compare December 1, 2025 09:26
@codecov
Copy link

codecov bot commented Dec 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.44%. Comparing base (cc6e802) to head (7557d3b).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #29   +/-   ##
=======================================
  Coverage   90.44%   90.44%           
=======================================
  Files           8        8           
  Lines         816      816           
=======================================
  Hits          738      738           
  Misses         78       78           
Files with missing lines Coverage Δ
src/aws_mcp_server/sandbox.py 84.82% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alexei-led alexei-led merged commit 3f4519b into main Dec 1, 2025
4 checks passed
@alexei-led alexei-led deleted the fix/macos-homebrew-sandbox branch December 1, 2025 09:36
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.

2 participants