Skip to content

.NET: Foundry Agent - MCP fails server side. No error propagated to client #1643

Closed

Description

@graemefoster

Hi,

On Agent Framework version: 1.0.0-preview.251016.1

I referenced an MCP server in a Foundry Agent. The Foundry Agent fails when I run the thread.

I can see the following message in Fiddler:

event: thread.run.failed
data: {
  "id": "run_AptSDFasdasddasd",
  "object": "thread.run",
  "created_at": 1761180339,
  "assistant_id": "asst_asdasdasd",
  "thread_id": "thread_asdasdas",
  "status": "failed",
  "started_at": 1761180340,
  "expires_at": null,
  "cancelled_at": null,
  "failed_at": 1761180340,
  "completed_at": null,
  "required_action": null,
  "last_error": {
    "code": "tool_server_error",
    "message": "Error: list_tools_server_error; Server error while listing tools: Failed to enumerate tools from remote server: https://8e5c3d750dc4.ngrok-free.app:443/. Response status code does not indicate success: 405 (Method Not Allowed)."
  },
  "tools": [
    {
      "type": "mcp",
      "server_label": "WeatherMcp",
      "server_url": "https://sdfasdasdadasdaddas.ngrok-free.app",
      "allowed_tools": null
    }
  ],
 ...
}

A call to await agent.RunAsync completes successfully, with an empty string in the Agent Message.

Image

Would expect an exception, or something to indicate the failure in the RunAsync response.

Activity

  1. added
    .NETUsage: [Issues, PRs], Target: .Net
    agentsUsage: [Issues, PRs], Target: Single agent
    and removed
    triageUsage: [Issues], Target: All issues that still need to be triaged
    on Oct 23, 2025
  2. changed the title [-]Foundry Agent - MCP fails server side. No error propagated to client[/-] [+].NET: Foundry Agent - MCP fails server side. No error propagated to client[/+] on Oct 23, 2025
  3. tonybaloney commented on Oct 23, 2025

    @tonybaloney

    Python has the same issue. All of my MCP calls timed out (the endpoint was broken) but instead of erroring the workflow, it continued and hallucinated the output.

  4. rogerbarreto commented on Dec 1, 2025

    @rogerbarreto
    Member

    The root cause of this issue is related to the

    which was recently addressed, I'm closing this issue as resolved and the fix should be available as soon a new release of Azure.AI.Agents.Persistent package is included in MAF next release.

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

Metadata

Metadata

Labels

.NETUsage: [Issues, PRs], Target: .NetagentsUsage: [Issues, PRs], Target: Single agentmcpUsage: [Issues, PRs], Target: MCP

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions