-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[BUG] MCP tool works in MCP Tool block but fails in Agent Block with Authentication failed #3922
Description
Describe the bug
Hi, I may be misunderstanding something about how MCP tools are supposed to work inside Agent blocks.
This seems like the most standard MCP setup:
- external MCP server over HTTP
- auth provided via headers
- tool is discoverable and callable
- deterministic MCP Tool execution works
But when I give that exact same MCP tool to an Agent block, the Agent path consistently fails with Authentication failed.
To Reproduce
Steps to reproduce the behavior:
- I configured an MCP server in Sim.
- The connection works in testing in MCP page, and direct invocation via MCP block.
- The same configured MCP tool, when attached to an Agent block, fails.
Expected behavior
MCP works in both Agent and MCP block
Screenshots
If applicable, add screenshots to help explain your problem.
Error from agent invocation of the tool:
Works when the MCP Tool is directly triggered, cut down to screenshot to hide the response text, but the response is as I expect.

Additional context
Add any other context about the problem here.
Reproduced 100% of the time in both Cloud and Self-hosted version, tried a few different MCP servers
