Skip to content

Make it possible to supply custom headers along with StreamableHttp#18

Merged
thekid merged 1 commit intomainfrom
feature/streamable_http_headers
Jan 21, 2026
Merged

Make it possible to supply custom headers along with StreamableHttp#18
thekid merged 1 commit intomainfrom
feature/streamable_http_headers

Conversation

@thekid
Copy link
Copy Markdown
Member

@thekid thekid commented Jan 20, 2026

Example:

use io\modelcontextprotocol\{McpClient, StreamableHttp};
use util\cmd\Console;

$client= new McpClient(new StreamableHttp($argv[1])->with(['Authorization' => 'Token '.$argv[2]]));

// Initialize
$init= $client->initialize();
Console::writeLine('=> Connected to ', $argv[1], ': ', $init);

// Fetch tool list
$response= $client->call('tools/list');
Console::writeLine($response->value());

@thekid thekid merged commit 3c76723 into main Jan 21, 2026
16 checks passed
@thekid thekid deleted the feature/streamable_http_headers branch January 21, 2026 12:12
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