@smithery/sdk
Version:
SDK to develop with Smithery
12 lines (11 loc) • 515 B
JavaScript
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
import { createSmitheryUrl } from "../shared/config.js";
/**
* Creates a transport to connect to the Smithery server
* @param baseUrl The URL of the Smithery server (without trailing slash or protocol)
* @param options Optional configuration object
* @returns Transport
*/
export function createTransport(baseUrl, options) {
return new StreamableHTTPClientTransport(createSmitheryUrl(baseUrl, options));
}