Skip to content

[BUG] MCP tool works in MCP Tool block but fails in Agent Block with Authentication failed #3922

@nickyli98

Description

@nickyli98

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:

  1. I configured an MCP server in Sim.
  2. The connection works in testing in MCP page, and direct invocation via MCP block.
  3. 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.

Workflow:
Image

Error from agent invocation of the tool:

Image

Works when the MCP Tool is directly triggered, cut down to screenshot to hide the response text, but the response is as I expect.
Image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions