Having issues calling MCP servers using Azure Open AI responses api

Scott McIsaac 0 Reputation points
2025-12-12T04:42:32.5033333+00:00

Microsoft Support Ticket Details


Issue Summary

Azure OpenAI Responses API rejects MCP (Model Context Protocol) tool requests with error: "MCP server url 'mcp.zapier.com' is not allowed. Allowed domains: []."

This was working and stopped


Error Message


HTTP/1.1 400 Bad Request

{

  "error": {

    "message": "MCP server url 'mcp.zapier.com' is not allowed. Allowed domains: [].",

    "type": "invalid_request_error",

    "param": "tools",

    "code": null

  }

}


Environment

  • Azure OpenAI Endpoint: https://helioscore.openai.azure.com/openai/v1/responses
  • API Version: v1 (Responses API)
  • Model: gpt-4.1 (also tested with other models)
  • Region: (include your Azure region)
  • SDK: OpenAI Python SDK (latest version)

Request Details

We are calling the Responses API with MCP tools as documented in Microsoft's official documentation:

https://dori-uw-1.kuma-moon.com/en-us/azure/ai-foundry/openai/how-to/responses

Request format:


client = OpenAI(

    api_key="<AZURE_API_KEY>",

    base_url="https://helioscore.openai.azure.com/openai/v1/",

)

response = client.responses.create(

    model="gpt-4.1",

    input=[{"role": "user", "content": "Hello"}],

    tools=[

        {

            "type": "mcp",

            "server_label": "zapier",

            "server_url": "https://mcp.zapier.com/api/mcp/mcp",

            "headers": {"Authorization": "Bearer <token>"},

            "require_approval": "never"

        }

    ]

)


Expected Behavior

Per Microsoft documentation, the Responses API should support remote MCP servers. The documentation states:

"You can extend the capabilities of your model by connecting it to tools hosted on remote Model Context Protocol (MCP) servers."


Actual Behavior

The API returns a 400 error stating the MCP server URL is not allowed, with an empty allowed domains list: Allowed domains: []

This blocks all API requests when any MCP tool is included - even for simple queries that wouldn't invoke the MCP tool.


Questions for Microsoft

  1. Is there a configuration setting in Azure Portal or AI Foundry to whitelist MCP server domains?
  2. Is this a new security feature that requires explicit configuration?
  3. If domain whitelisting is required, where is this configured?
  4. Is this behavior specific to certain Azure regions or subscription types?

Impact

  • MCP tool integration is completely blocked
  • This was previously working (unclear when it stopped)
  • Affects production application functionality

What We've Tried

  1. Using AzureOpenAI client vs standard OpenAI client with base_url - same error
  2. Different MCP server URLs (Zapier, custom servers) - same error
  3. Different models (gpt-4.1, gpt-4o, gpt-5) - same error
  4. Verified MCP tool format matches Microsoft documentation exactly
Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Scott McIsaac 0 Reputation points
    2025-12-12T04:55:51.3666667+00:00

    also to add .. i switched to a different instance of AI foundry and it works there .. ???

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.