claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] Fix the docs. You use --header to add an authorization header, not -e

Open mmaunder opened this issue 6 months ago • 1 comments

This page: https://docs.anthropic.com/en/docs/claude-code/mcp

Says:

Example: Adding an HTTP server with authentication header
claude mcp add --transport http secure-server https://api.example.com/mcp -e Authorization="Bearer your-token"

Which is wrong. The syntax is:

claude mcp add --transport http secure-server https://api.example.com/mcp --header "Authorization: Bearer your-token"

Please fix asap to save many others much time. Thanks for a great product.

mmaunder avatar Jun 19 '25 16:06 mmaunder

Thanks, we'll get this fixed in the next docs update!

ashwin-ant avatar Jun 20 '25 19:06 ashwin-ant

has this been addressed?

mfreeman451 avatar Jul 27 '25 05:07 mfreeman451

This is now fixed in the docs

domdomegg avatar Nov 26 '25 14:11 domdomegg

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Dec 04 '25 14:12 github-actions[bot]