Skip to content

Conversation

liemle3893
Copy link

@liemle3893 liemle3893 commented Aug 11, 2025

Summary

  • Add HTTP basic authentication support for all HTTP-based MCP commands
  • Support multiple authentication methods with proper fallback

Changes

  • New --auth-user username:password flag following cURL format
  • Keep --auth-header for custom Authorization headers
  • URL-embedded credentials support (https://user:[email protected])
  • Authentication works with both SSE and HTTP transports
  • Added to call, shell, and other HTTP-based commands

Authentication Methods

  1. --auth-user username:password (supports empty username/password)
  2. --auth-header 'Basic base64creds' or 'Bearer token'
  3. URL embedded: https://user:[email protected]

Test plan

  • Test normal username:password format
  • Test empty username (:password)
  • Test empty password (username:)
  • Test error handling for invalid format (username without colon)
  • Test auth-header flag still works
  • Test URL-embedded credentials
  • Verify works with both HTTP and SSE transports

🤖 Generated with Claude Code

- Add support for HTTP basic authentication via multiple methods:
  * --auth-user username:password flag (cURL-style format)
  * --auth-header for custom Authorization headers
  * URL-embedded credentials (https://user:[email protected])
- Remove --auth-password flag in favor of unified --auth-user format
- Support for both SSE and HTTP transports with authentication
- Add proper error handling for invalid auth formats
- Enable authentication for call, shell, and other HTTP-based commands

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants