Skip to content

foundry-mcp server fails to connect — missing auth in .mcp.json #1235

@chashea

Description

@chashea

Summary

The foundry-mcp MCP server defined in the azure@azure-skills plugin fails to connect with ✗ Failed to connect in claude mcp list.

Root Cause

The .mcp.json in the plugin cache (~/.claude/plugins/cache/azure-skills/azure/1.0.0/.mcp.json) configures the foundry server as a plain HTTP endpoint with no authentication:

"foundry-mcp": { 
  "type": "http", 
  "url": "https://mcp.ai.azure.com" 
}

The https://mcp.ai.azure.com endpoint returns 401 Unauthorized for all requests without a bearer token. Tested manually:

  • GET / → 405 (server is reachable)
  • POST / with az account get-access-token --resource https://management.azure.com → 401
  • POST / with az account get-access-token --resource https://ai.azure.com → 401
  • POST / with az account get-access-token --resource https://ml.azure.com → 401

The server config needs authentication headers (likely an Azure AD bearer token with the correct resource/audience).

Expected Behavior

The foundry-mcp server should authenticate automatically using the user's Azure CLI credentials (similar to how the azure server works via @azure/mcp).

Environment

  • Claude Code (CLI)
  • Plugin: azure@azure-skills v1.0.0
  • macOS, az login active session

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions