[BUG] Azure MCP fails to start in Copilot CLI’s macOS sandbox because the default .NET bundle extraction location is inaccessible
メンテナーはふだん 2 日以内に返信
@RickWinter がすでに取り組んでいます。
2026年11月5日 から。
評価
この issue はまだ評価されていません。
説明
[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?
- 主要言語
- C#
- スター
- 3.9k
- フォーク
- 689
- 平均マージ
- 2日 11時間
- マージ済み PR(30日)
- 143
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/mcp のほかの issue
-
[BUG] speech tts synthesize rejects valid locales such as fil-PH, yue-CN and sr-Latn-RS in --language対応中かも @Shizoqua が今日担当しました。 オープンAzure.Mcp.Server needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
[BUG] deploy architecture diagram generate never shows Docker settings for container apps対応中かも @Shizoqua が今日担当しました。 オープンAzure.Mcp.Server needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 2 日以内に返信
-
[BUG] Single mode: an unknown tool name fails with "An error occurred invoking 'azure'" instead of listing the available tools対応中かも @Ahmed-Manai が 9 日前に担当しました。 オープンserver-Azure.Mcp
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 2 日以内に返信
-
[BUG] pricing get drops tierMinimumUnits, so tiered meters return same-meter prices with no threshold対応中かも @msalaman が 29 日前に担当しました。 オープンcustomer-reported needs-team-triage question server-Azure.Mcp tools-Price tools-Pricing
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
microsoft/mcp#4087 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
[Doc Gap] README.md still shows removed "Basic" resilience usage plan tier after GA SDK update再び着手できるかも @anishsinghhh3-bit が 32 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンcopilot documentation server-Azure.Mcp tools-ResilienceManagement
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
microsoft/mcp#4008 · コメント 2 件 ·
メンテナーはふだん 2 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
microsoft/fluentui-blazor#5721 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Project dependencies are outdated対応中かも @yasmoradi が今日担当しました。 オープンdependencies
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
bitfoundation/bitplatform#15616 ·
メンテナーはふだん 1 日以内に返信
-
:watch: Not Triaged Pri3
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
メンテナーはふだん 1 日以内に返信
-
area-controls-shell platform/android
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
dotnet/maui#41304 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信