Skip to content

Comments

Add support for custom HTTP headers via -h flag#7

Open
dankelleher wants to merge 3 commits intoalpic-ai:mainfrom
dankelleher:feature/header-support
Open

Add support for custom HTTP headers via -h flag#7
dankelleher wants to merge 3 commits intoalpic-ai:mainfrom
dankelleher:feature/header-support

Conversation

@dankelleher
Copy link

Enables passing custom headers to MCP server requests using the -h/--header flag. Multiple headers can be specified by repeating the flag.

Example usage:
mcp-eval run test.yml -u https://example.com -h "Authorization: Bearer TOKEN" -h "X-Custom: value"

rodincave and others added 3 commits September 29, 2025 13:30
Enables passing custom headers to MCP server requests using the -h/--header flag. Multiple headers can be specified by repeating the flag.

Example usage:
mcp-eval run test.yml -u https://example.com -h "Authorization: Bearer TOKEN" -h "X-Custom: value"

Changes:
- Add --header flag to CLI (accepts multiple values)
- Implement parseHeaders() helper using functional approach
- Pass headers via requestInit to both StreamableHTTP and SSE transports
- Update README with usage examples
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