Skip to content

Header support added to connect and config export#2

Merged
oshea00 merged 2 commits into
mainfrom
feat/header-support-and-config-export
Mar 14, 2026
Merged

Header support added to connect and config export#2
oshea00 merged 2 commits into
mainfrom
feat/header-support-and-config-export

Conversation

@oshea00

@oshea00 oshea00 commented Mar 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replace bearer_token: Option<String> with headers: HashMap<String, String> in ConnectionConfig
  • Add -H "Name: Value" CLI flag (repeatable) for arbitrary HTTP request headers
  • --bearer is now shorthand for -H "Authorization: Bearer <TOKEN>"
  • export_config includes headers in HTTP server entries when non-empty
  • New tests for header export and updated existing tests for renamed field

Test plan

  • cargo test --all passes
  • cargo clippy --all --all-targets -- -D warnings clean
  • Manual: mcpi --connect-http <url> -H "X-Custom: val" -H "X-Other: val2" sends headers
  • Manual: --bearer <token> still works as shorthand
  • Manual: export command includes headers in output JSON

oshea00 added 2 commits March 14, 2026 12:26
- Replace bearer_token with generic headers map in ConnectionConfig
- Add -H "Name: Value" CLI flag (repeatable) for arbitrary HTTP headers
- --bearer is now shorthand for -H "Authorization: Bearer <token>"
- export_config now includes headers in HTTP server entries
- Add tests for new header export behavior
@oshea00 oshea00 merged commit 62702fd into main Mar 14, 2026
3 checks passed
@oshea00 oshea00 deleted the feat/header-support-and-config-export branch March 14, 2026 23:06
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.

1 participant