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

Status Fixed / completed
Maintainer reply ✓ Yes — ashwin-ant
Activity 4 comments · opened Jun 19, 2025 · closed Nov 26, 2025
💡 Likely answer: A maintainer (ashwin-ant, collaborator) responded on this thread — see the highlighted reply below.

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.

View original on GitHub ↗

4 Comments

ashwin-ant collaborator · 1 year ago

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

mfreeman451 · 1 year ago

has this been addressed?

domdomegg · 10 months ago

This is now fixed in the docs

github-actions[bot] · 10 months ago

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.