[BUG] Azure MCP fails to start in Copilot CLI’s macOS sandbox because the default .NET bundle extraction location is inaccessible
Maintainers usually reply within 2 days
@RickWinter is already working on this.
Since Nov 5, 2026.
Assessment
This issue has not been assessed yet.
Description
[BUG] Azure MCP fails to start in Copilot CLI's macOS sandbox because the default .NET bundle extraction location is inaccessible
Target repository: https://github.com/microsoft/mcp
Describe the bug
The Azure plugin starts Azure MCP Server through npx:
npx -y @azure/mcp@latest server start
On macOS, with Copilot CLI's local sandbox enabled for MCP servers, startup fails while the .NET host selects a directory for extracting embedded files. DOTNET_BUNDLE_EXTRACT_BASE_DIR is not set, and the default home-based location is inaccessible for read/write inside the sandbox.
Setting DOTNET_BUNDLE_EXTRACT_BASE_DIR to a private directory under the current user's macOS temporary directory, for one Copilot invocation only, resolves the failure. No additional filesystem grants, plugin changes, or sandbox disabling were needed. The plugin-provided Azure MCP server then exposed 69 tools.
I am reporting this here because the npm launcher or distribution may be able to accommodate restricted execution environments before starting the .NET executable. It is not yet established whether the appropriate fix belongs in Azure MCP's launcher/distribution, the Azure plugin, or Copilot's sandbox integration.
Expected behavior
Azure MCP should be able to start in a sandbox that provides a writable, user-private temporary directory without requiring write access to the user's home directory.
If explicit extraction-directory configuration is required, please provide or document a supported server-scoped solution, rather than requiring users to set a global environment variable for all .NET applications.
Actual behavior
Copilot reports that the plugin-provided Azure MCP server failed to initialize inside the sandbox. The server's stderr contains:
Default extraction directory [/Users/<user>] either doesn't exist or is not accessible for read/write.
Failure processing application bundle.
Failed to determine location for extracting embedded files.
DOTNET_BUNDLE_EXTRACT_BASE_DIR is not set, and a read-write cache directory couldn't be created.
The home directory exists. The failure occurs in the sandboxed launch.
Reproduction Steps
- On macOS, use the Azure plugin, whose MCP definition invokes
npx -y @azure/mcp@latest server startwithout an explicit bundle extraction directory. - Enable Copilot CLI's local sandbox and MCP sandboxing (
sandbox.sandboxMcpServers: true). Do not grant broad write access to the home directory. - Start
copilotnormally withDOTNET_BUNDLE_EXTRACT_BASE_DIRunset. - Run
/mcp show azure. Observe initialization failure and the .NET extraction error above. - Exit Copilot. From the same terminal, start it with the following process-scoped workaround:
(
set -eu
case "${TMPDIR:-}" in
/*) ;;
*) printf '%s\n' 'An absolute macOS TMPDIR is required.' >&2; exit 1 ;;
esac
extraction_dir=$(mktemp -d "${TMPDIR%/}/azure-mcp-bundle.XXXXXX")
DOTNET_BUNDLE_EXTRACT_BASE_DIR="$extraction_dir" copilot
)
- Run
/mcp show azureagain. With this extraction-directory override, the server initializes and exposes 69 tools.
The workaround leaves its temporary directory in place; remove only that directory after Copilot exits if cleanup is needed. It does not modify persistent environment settings, plugin files, or sandbox policy.
Environment
- OS: macOS, Apple Silicon.
- Client: GitHub Copilot CLI; version
1.0.100-1was observed during the investigation. The version associated with the earliest failure log was not separately recorded. - Server source: plugin-contributed Azure MCP from
microsoft/azure-skills. - Azure plugin version observed on macOS:
1.2.92. - Launch command:
npx -y @azure/mcp@latest server start. - Exact resolved Azure MCP version for the macOS failure: not captured. The
@latestcommand alone should not be treated as proof of a specific resolved version. - No Azure tool calls, authentication changes, or cloud operations were needed to reproduce or verify startup.
Additional context
.NET's single-file deployment documentation describes the default extraction base as $HOME/.net on Unix and %TEMP%/.net on Windows, unless DOTNET_BUNDLE_EXTRACT_BASE_DIR is provided.
For comparison, a successful Windows sandboxed launch was observed through .NET host tracing:
Detected Single-File app bundle
Files embedded within the bundle will be extracted to [<user-temp>\.net\azmcp\<bundle-id>] directory.
Reusing existing extraction of application bundle.
The launching PowerShell had DOTNET_BUNDLE_EXTRACT_BASE_DIR unset, and its TEMP and TMP matched the parent temporary directory shown in the trace. This confirms the selected Windows location and reuse of an existing extraction, not a fresh extraction/write test or direct inspection of the server process's environment.
PR https://github.com/microsoft/mcp/pull/2252 addressed the same .NET error class in a Docker image with a missing home directory. This report concerns a different condition: an existing home directory that is not writable from the macOS sandbox.
Would it be appropriate for the npm launcher to establish a safe, user-private extraction location before spawning the .NET executable, while preserving an explicitly configured DOTNET_BUNDLE_EXTRACT_BASE_DIR? Alternatively, should this be handled in the Azure plugin or coordinated with Copilot CLI?
- Dominant language
- C#
- Stars
- 3.9k
- Forks
- 689
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 143
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/mcp
-
[BUG] speech tts synthesize rejects valid locales such as fil-PH, yue-CN and sr-Latn-RS in --languagePossibly taken @Shizoqua claimed this today. OpenAzure.Mcp.Server needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
[BUG] deploy architecture diagram generate never shows Docker settings for container appsPossibly taken @Shizoqua claimed this today. OpenAzure.Mcp.Server needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 2 days
-
[BUG] Single mode: an unknown tool name fails with "An error occurred invoking 'azure'" instead of listing the available toolsPossibly taken @Ahmed-Manai claimed this 9 days ago. Openserver-Azure.Mcp
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days
-
[BUG] pricing get drops tierMinimumUnits, so tiered meters return same-meter prices with no thresholdPossibly taken @msalaman claimed this 29 days ago. Opencustomer-reported needs-team-triage question server-Azure.Mcp tools-Price tools-Pricing
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/mcp#4087 · 1 comment · 1 assignee ·
Maintainers usually reply within 2 days
-
[Doc Gap] README.md still shows removed "Basic" resilience usage plan tier after GA SDK updateMay be free again @anishsinghhh3-bit claimed this 32 days ago, and no pull request is open. Opencopilot documentation server-Azure.Mcp tools-ResilienceManagement
Difficulty 1/5 Under an hour Newbie friendliness 86/100
microsoft/mcp#4008 · 2 comments ·
Maintainers usually reply within 2 days
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
microsoft/fluentui-blazor#5721 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Project dependencies are outdatedPossibly taken @yasmoradi claimed this today. Opendependencies
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
bitfoundation/bitplatform#15616 ·
Maintainers usually reply within 1 day
-
:watch: Not Triaged Pri3
Difficulty 1/5 Under an hour Newbie friendliness 91/100
Maintainers usually reply within 1 day
-
area-controls-shell platform/android
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
dotnet/maui#41304 · 1 reaction ·
Maintainers usually reply within 1 day