mcp icon indicating copy to clipboard operation
mcp copied to clipboard

AI foundry unable to connect with Azure MCP server

Open matrahul opened this issue 2 months ago • 7 comments

Is there any MCP.json file for Azure MCP server available ? so instead of adding all the tools one by one and creating an instruction for AI Ageny to use. we can just use that file to activate all the tools in one go and Is there Container image to deploy that. I do not want to use the Github co-pilot to do that. we want to use that in a production and we want to use our own client to perform the deployment and other tasks via AI foundry.

matrahul avatar Oct 07 '25 16:10 matrahul

Hi @matrahul thank you for reaching out. Yes, there are instructions on the README.md for Docker to deploy as a local mcp server.

We will have updated docker images and instructions in November+ for remote mcp server support, including easy deploying to ACA/AKS to use from Azure AI Foundry. @anuchandy is working on this area now.

@diberry is our doc writer and will be updating the docs/learn site with instructions on the various installer options too. Until then, the README.md is your best bet for information like this: https://github.com/microsoft/mcp/blob/main/servers/Azure.Mcp.Server/README.md

joshfree avatar Oct 07 '25 17:10 joshfree

@joshfree thanks for the update however I'm unable to connect the AI Foundry agent to MCP server. I can use the tools via remote client but somehow it doesn't connects with AI agent for any LLM or AI request. The flow directly pulls tools from MCP server and provides the answer.

matrahul avatar Oct 09 '25 06:10 matrahul

can i get a response on this? How can i connect Azure MCP server with AI foundry Agent. Is there is server URL or endpoint to connect it .

matrahul avatar Oct 13 '25 13:10 matrahul

https://github.com/microsoft/mcp/blob/main/servers/Azure.Mcp.Server/TROUBLESHOOTING.md#streamable-http-transport

joshfree avatar Oct 27 '25 14:10 joshfree

Hi @matrahul this issue tracks updates for the documentation you're seeking https://github.com/microsoft/mcp/issues/789

joshfree avatar Oct 27 '25 14:10 joshfree

Hi @joshfree @anuchandy , how can we authenticate the MCP server with Azure. I have tried deploying it under the container app but to access the tools it should authenticate it with Azure. How does it work? Readme doc doesn't help.

matrahul avatar Oct 29 '25 18:10 matrahul

MCP Server still has some binary issues where it doesn't connect or provide any tools or output. where i found that The binary is missing a required C library function (__strdup). The Microsoft image is missing some dependencies that our Alpine base image doesn't have. We need to install the missing dependencies! T The issue was resolved by adding gcompat to the Alpine Linux container: RUN apk add --no-cache
nodejs
npm
bash
curl
gcompat

Root Cause

  • Alpine Linux uses musl libc
  • Azure MCP binary requires glibc
  • Symbol __strdup is a glibc internal function
  • Docker Desktop masked the issue with emulation

Solution Implemented

  • Migrated from Alpine to Debian base image
  • Native glibc support (no compatibility layer)
  • Multi-stage build for optimization

matrahul avatar Oct 30 '25 14:10 matrahul