[BUG] Azure MCP fails to start in Copilot CLI’s macOS sandbox because the default .NET bundle extraction location is inaccessible
Los mantenedores suelen responder en 2 días
@RickWinter ya está trabajando en esto.
Desde el 5/11/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
[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?
- Lenguaje dominante
- C#
- Estrellas
- 3.9k
- Forks
- 689
- Merge medio
- 2 d 11 h
- PR fusionados (30 d)
- 143
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/mcp
-
[BUG] speech tts synthesize rejects valid locales such as fil-PH, yue-CN and sr-Latn-RS in --languagePosiblemente ocupada @Shizoqua la tomó hoy. AbiertoAzure.Mcp.Server needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
[BUG] deploy architecture diagram generate never shows Docker settings for container appsPosiblemente ocupada @Shizoqua la tomó hoy. AbiertoAzure.Mcp.Server needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 2 días
-
[BUG] Single mode: an unknown tool name fails with "An error occurred invoking 'azure'" instead of listing the available toolsPosiblemente ocupada @Ahmed-Manai la tomó hace 9 días. Abiertoserver-Azure.Mcp
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 2 días
-
[BUG] pricing get drops tierMinimumUnits, so tiered meters return same-meter prices with no thresholdPosiblemente ocupada @msalaman la tomó hace 29 días. Abiertocustomer-reported needs-team-triage question server-Azure.Mcp tools-Price tools-Pricing
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
microsoft/mcp#4087 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 2 días
-
[Doc Gap] README.md still shows removed "Basic" resilience usage plan tier after GA SDK updateQuizá libre de nuevo @anishsinghhh3-bit la tomó hace 32 días y no hay ningún pull request abierto. Abiertocopilot documentation server-Azure.Mcp tools-ResilienceManagement
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
microsoft/mcp#4008 · 2 comentarios ·
Los mantenedores suelen responder en 2 días
Todos los issues de microsoft/mcp
Issues similares
-
fix: [v5] FluentTextInput throws from ElementInternals during .NET 11 enhanced form navigationAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
microsoft/fluentui-blazor#5721 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Project dependencies are outdatedPosiblemente ocupada @yasmoradi la tomó hoy. Abiertodependencies
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
bitfoundation/bitplatform#15616 ·
Los mantenedores suelen responder en 1 día
-
:watch: Not Triaged Pri3
Dificultad 1/5 Menos de una hora Aptitud para principiantes 91/100
Los mantenedores suelen responder en 1 día
-
area-controls-shell platform/android
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
dotnet/maui#41304 · 1 reacción ·
Los mantenedores suelen responder en 1 día