Skip to content

Add user_config to Azure MCP Bundle#2618

Open
pl4nty wants to merge 3 commits into
microsoft:mainfrom
devicie:main
Open

Add user_config to Azure MCP Bundle#2618
pl4nty wants to merge 3 commits into
microsoft:mainfrom
devicie:main

Conversation

@pl4nty
Copy link
Copy Markdown

@pl4nty pl4nty commented May 10, 2026

What does this PR do?

Add user_config to Azure MCP Bundle, so users can configure settings in clients like Claude Desktop. Some settings were excluded because bundles only support stdio.

image

Pre-merge Checklist

  • Required for All PRs
    • Read contribution guidelines
    • PR title clearly describes the change
    • Commit history is clean with descriptive messages (cleanup guide)
    • Added comprehensive tests for new/modified functionality
    • Created a changelog entry if the change falls among the following: new feature, bug fix, UI/UX update, breaking change, or updated dependencies. Follow the changelog entry guide
  • For MCP tool changes:
    • One tool per PR: This PR adds or modifies only one MCP tool for faster review cycles
    • Updated servers/Azure.Mcp.Server/README.md and/or servers/Fabric.Mcp.Server/README.md documentation
    • Validate README.md changes running the script ./eng/scripts/Process-PackageReadMe.ps1. See Package README
    • For new or modified tool descriptions, ran ToolDescriptionEvaluator and obtained a score of 0.4 or more and a top 3 ranking for all related test prompts
    • For tools with new names, including new tools or renamed tools, update consolidated-tools.json
    • For renamed tools, follow the Tool Rename Checklist and tag the PR with the breaking-change label
    • For new tools associated with Azure services or publicly available tools/APIs/products, add URL to documentation in the PR description
  • Extra steps for Azure MCP Server tool changes:
    • Updated command list in servers/Azure.Mcp.Server/docs/azmcp-commands.md
    • Ran ./eng/scripts/Update-AzCommandsMetadata.ps1 to update tool metadata in azmcp-commands.md (required for CI)
    • Updated test prompts in servers/Azure.Mcp.Server/docs/e2eTestPrompts.md
    • 👉 For Community (non-Microsoft team member) PRs:
      • Security review: Reviewed code for security vulnerabilities, malicious code, or suspicious activities before running tests (crypto mining, spam, data exfiltration, etc.)
      • Manual tests run: added comment /azp run mcp - pullrequest - live to run Live Test Pipeline

Signed-off-by: Tom Plant <tom.plant@devicie.com>
@pl4nty pl4nty requested review from a team as code owners May 10, 2026 00:50
Copilot AI review requested due to automatic review settings May 10, 2026 00:50
@pl4nty pl4nty requested review from JonathanCrd, jairmyree, jongio, joshfree, saikoumudi, sandeep-sen and xiangyan99 and removed request for Copilot May 10, 2026 00:50
@github-actions
Copy link
Copy Markdown
Contributor

Thank you for your contribution @pl4nty! We will review the pull request and get back to you soon.

Turns out 0.3 does support user_config

Signed-off-by: Tom Plant <tom.plant@devicie.com>
Copilot AI review requested due to automatic review settings May 10, 2026 00:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds user_config support to the Azure MCP bundle manifest so MCP clients (e.g., Claude Desktop) can configure server startup options and environment-based settings via a UI rather than requiring manual process configuration.

Changes:

  • Adds an MCPB manifest $schema reference.
  • Updates the bundle mcp_config.args / mcp_config.env to be driven by ${user_config.*} placeholders.
  • Introduces a user_config schema with authentication, telemetry, and server-mode settings.

Invoking Livetests

Copilot submitted PRs are not trustworthy by default. Users with write access to the repo need to validate the contents of this PR before leaving a comment with the text /azp run mcp - pullrequest - live. This will trigger the necessary livetest workflows to complete required validation.

Comment thread servers/Azure.Mcp.Server/mcpb/manifest.json
Comment thread servers/Azure.Mcp.Server/mcpb/manifest.json Outdated
Comment thread servers/Azure.Mcp.Server/mcpb/manifest.json
Comment thread servers/Azure.Mcp.Server/mcpb/manifest.json
"type": "string",
"title": "Entra Tenant ID",
"description": "Entra tenant ID. Use this to authenticate against a specific tenant. Example: 00000000-0000-0000-0000-000000000000",
"default": ""
Copy link
Copy Markdown
Author

@pl4nty pl4nty May 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While implementing microsoft/fabric-rti-mcp#172, I noticed Claude Desktop only substitutes string variables if a value is provided. This can cause server issues like trying to parse a guid from raw ${user_config.azure_tenant_id}, so I've set default values

"type": "boolean",
"title": "Collect Telemetry",
"description": "Whether to allow Azure MCP Server to collect anonymous usage telemetry. Set to false to opt out.",
"default": true
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Booleans in Claude Desktop are non-nullable and currently default to false

Signed-off-by: Tom Plant <tom.plant@devicie.com>
Copy link
Copy Markdown
Contributor

@jongio jongio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This adds a useful user_config surface for MCP clients. A few things to address before merge:

  1. The platform_overrides.win32 section still has "args": [] and no env block. Depending on how the mcpb runtime handles overrides (merge vs replace), Windows users may not receive the new args or env vars from user_config. Should the win32 override be updated to mirror the main mcp_config, or does the runtime inherit unset fields from the parent?

  2. The boolean env vars (AZURE_MCP_COLLECT_TELEMETRY, AZURE_MCP_COLLECT_TELEMETRY_MICROSOFT) have default: true in user_config. You mentioned Claude Desktop defaults booleans to false. If the client ignores the manifest default and uses false, telemetry would be disabled for all bundle users by default. This contradicts the server's built-in behavior (telemetry on unless explicitly opted out). Can you confirm which default wins at runtime?

  3. The sensitive: true additions look correct and address the credential storage concern.

"--debug",
"${user_config.debug}",
"--read-only",
"${user_config.read_only}",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When user_config.debug is false (the default), this expands to --debug false. System.CommandLine parses it fine, but it means every launch always includes --debug false --read-only false --dangerously-disable-elicitation false which is noisy. Not blocking, but if mcpb supports conditional arg inclusion (only add when true), that'd be cleaner.

"AZURE_MCP_COLLECT_TELEMETRY_MICROSOFT": "${user_config.azure_mcp_collect_telemetry_microsoft}",
"AZURE_MCP_ONLY_USE_BROKER_CREDENTIAL": "${user_config.azure_mcp_only_use_broker_credential}",
"AZURE_MCP_ENABLE_OTLP_EXPORTER": "${user_config.azure_mcp_enable_otlp_exporter}",
"APPLICATIONINSIGHTS_CONNECTION_STRING": "${user_config.applicationinsights_connection_string}"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The server reads AZURE_MCP_COLLECT_TELEMETRY at ServiceStartCommand.cs:967-969. Empty/whitespace is treated as true (telemetry enabled). So empty string defaults for string env vars are safe and won't override existing user env in a harmful way.

But boolean-typed user_config values always resolve to a concrete true/false string. If a user previously set AZURE_MCP_COLLECT_TELEMETRY=false in their shell profile and the bundle sets it to true (from the manifest default), their opt-out is silently overridden. Worth documenting this behavior in the description fields, something like 'Overrides any existing environment variable when configured.'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

3 participants