claude-code - 💡(How to fix) Fix [BUG] [REGRESSION] Claude Code no longer allows for additional headersHelper on oauth MCP servers [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#51740Fetched 2026-04-22 07:54:07
View on GitHub
Comments
2
Participants
2
Timeline
8
Reactions
0
Timeline (top)
labeled ×5commented ×2closed ×1

Error Message

Error Messages/Logs

Root Cause

This was actually a feature, not a bug, because it allowed for forwarding additional headers to MCP Proxy servers such as LiteLLM and still allowed for usage of the native Oauth2 servers. Without this functionality, we can no longer use the MCP Proxy feature of LiteLLM properly since the "Authenticate" option has been removed. This should be restored to allow for custom headers to be forwarded in addition to oauth

Code Example

Fixed the /mcp menu offering OAuth-specific actions for MCP servers configured with headersHelper; Reconnect is now offered instead to re-invoke the helper script

---



---

"time": {
    "headersHelper": "/Users/dennis.henry/fetch-mcp-headers.sh",
    "type": "http",
    "url": "https://litellm.host.here/time/mcp"
  }

---

#!/bin/sh
TOKEN="$(op item get 'litellm-api-key')"
printf '{"x-litellm-api-key":"Bearer %s"}\n' "$TOKEN"
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

In version v2.1.101, a major change was including per the changelog:

Fixed the /mcp menu offering OAuth-specific actions for MCP servers configured with headersHelper; Reconnect is now offered instead to re-invoke the helper script

This was actually a feature, not a bug, because it allowed for forwarding additional headers to MCP Proxy servers such as LiteLLM and still allowed for usage of the native Oauth2 servers. Without this functionality, we can no longer use the MCP Proxy feature of LiteLLM properly since the "Authenticate" option has been removed. This should be restored to allow for custom headers to be forwarded in addition to oauth

What Should Happen?

I should be able to Authenticate/Re-authenticate an OAuth MCP server as well as have a custom headersHelper that sends additional needed headers.

Error Messages/Logs

Steps to Reproduce

  1. Create an entry such as the following in your ~/.claude.json under .mcpHeaders:
"time": {
    "headersHelper": "/Users/dennis.henry/fetch-mcp-headers.sh",
    "type": "http",
    "url": "https://litellm.host.here/time/mcp"
  }
  1. And add a ~/fetch-mcp-headers.sh with the following content:
#!/bin/sh
TOKEN="$(op item get 'litellm-api-key')"
printf '{"x-litellm-api-key":"Bearer %s"}\n' "$TOKEN"
  1. Start claude code and type /mcp
  2. Navigate to time MCP and hit Enter
  3. Note no Authenticate or Re-Authenticate option, just Connect

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

1.1.100

Claude Code Version

1.1.101

Platform

AWS Bedrock

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

No response

extent analysis

TL;DR

The issue can be resolved by reverting the change that removed the "Authenticate" option for MCP servers configured with headersHelper, allowing for custom headers to be forwarded in addition to OAuth.

Guidance

  • Review the changelog for version v2.1.101 to understand the changes made to the /mcp menu and OAuth-specific actions.
  • Verify that the headersHelper script is correctly configured and functioning as expected.
  • Consider downgrading to version 1.1.100 where the issue was last known to work, as a temporary workaround.
  • Check the ~/.claude.json file to ensure that the .mcpHeaders entry is correctly formatted and points to the correct headersHelper script.

Example

No code snippet is provided as the issue is related to a specific feature removal and not a code error.

Notes

The issue is a regression and was introduced in version 1.1.101. The removal of the "Authenticate" option for MCP servers configured with headersHelper has caused the issue.

Recommendation

Apply workaround: Downgrade to version 1.1.100 until the feature is restored, as it is the last known working version.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING