vscode-ai-toolkit icon indicating copy to clipboard operation
vscode-ai-toolkit copied to clipboard

[MCP] The mcp setting headers in Agent Builder does not take effect

Open daydaychen opened this issue 5 months ago • 4 comments

mcp.json Image

generated code Image

As you can see above, the mcp initialization logic in the generated code does not carry headers.

Similarly, the mcp tool call returns 401, which proves that the headers setting is not working.

So how do I set the headers?

daydaychen avatar Jul 17 '25 01:07 daydaychen

Thank you for bringing this issue to our attention. We will fix it in the next release.

XiaofuHuang avatar Jul 21 '25 03:07 XiaofuHuang

Is there a workaround?

atulsinghchauhan avatar Jul 28 '25 12:07 atulsinghchauhan

Is there a workaround?

You can use "env" instead of "headers" in the MCP config

XiaofuHuang avatar Jul 29 '25 07:07 XiaofuHuang

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. As it is labeled with bug, it will be manually handled