Skip to content

Last update 

Start here

Minimum safe baseline

Apply six controls before a Model Context Protocol (MCP) server on Microsoft Azure exposes write, delete, or execution tools.

Print this page as a pre-release checklist.

1. Start read-only

  • Prove your MCP server design with retrieval and reporting tools before you add write, delete, or command-execution tools.
  • Separate read-only tools from tools that modify state to assign distinct permissions and policies. See MCP02 Privilege Escalation via Scope Creep and MCP05 Command Injection and Execution.
  • Pass structured arguments, not shell strings, to external commands or subprocesses.

2. Enforce identity and least privilege

  • Authenticate callers with Microsoft Entra ID. Call downstream Azure services with managed identities for Azure resources, not shared secrets or long-lived keys. Services: Entra ID, managed identities.
  • Validate the token audience (aud) claim in Azure API Management and your MCP server. Require MCP clients to send the RFC 8707 resource parameter. Service: API Management.
  • Store required third-party credentials in Azure Key Vault with role-based access control. Service: Key Vault.
  • Never pass raw caller tokens to downstream services. See MCP01 Token Mismanagement and Secret Exposure.
  • Keep secrets out of form-mode elicitation payloads and tool arguments. See MCP01 Token Mismanagement and Secret Exposure.
  • Bind each opaque state handle to the authenticated caller with a key pattern such as {tenantId}:{userId}:{handleId}. Never treat handle possession as authentication. See MCP10 Context Injection and Over-Sharing.

3. Treat tool metadata and outputs as untrusted

  • Treat tool descriptions, schemas, retrieved resources, and outputs as untrusted data that must not override the user's goal.
  • Canonicalize and pin tool definitions. Alert on unexpected changes between releases. MCP specification 2026-07-28 makes deterministic tools/list order only a SHOULD.
  • Treat tool annotations as untrusted unless they come from a trusted MCP server.
  • Enable document attack detection in Azure AI Content Safety Prompt Shields for untrusted tool outputs and retrieved documents. Service: Prompt Shields. See MCP03 Tool Poisoning and MCP06 Intent Flow Subversion.

4. Restrict servers, network paths, and egress

5. Require approval for high-impact actions

6. Log the full decision path

  • Log authentication, tool calls, resource reads, approval outcomes, and denials to Azure Monitor Application Insights and Azure Monitor Log Analytics. Services: Application Insights, Log Analytics.
  • Correlate gateway and MCP server traces with W3C traceparent headers and _meta trace context when MCP clients send them.
  • Forward security alerts and audit logs to Microsoft Sentinel for detection and incident response. Service: Sentinel. See MCP08 Lack of Audit and Telemetry.

Next steps

Pick your next step: