mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 08:37:22 +00:00
Support custom headers in MCP servers
This commit is contained in:
5 files changed
+127
-3
No files matched your search
@@ -21,8 +21,12 @@ export class MCPClient {
|
||||
capabilities: {}
|
||||
});
|
||||
|
||||
// Create HTTP transport
|
||||
this.transport = new StreamableHTTPClientTransport(new URL(server.url));
|
||||
// Create HTTP transport with optional custom headers
|
||||
this.transport = new StreamableHTTPClientTransport(new URL(server.url), {
|
||||
requestInit: server.headers ? {
|
||||
headers: server.headers,
|
||||
} : undefined,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user