import { McpServerConfig } from '../client/client.js'; import { Transport } from '@modelcontextprotocol/sdk/shared/transport.js'; import '@modelcontextprotocol/sdk/client/index.js'; import '@modelcontextprotocol/sdk/client/stdio.js'; import '@modelcontextprotocol/sdk/client/streamableHttp.js'; import '@modelcontextprotocol/sdk/types.js'; import 'genkit'; /** * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * Creates an MCP transport instance based on the provided server configuration. * It supports creating SSE, Stdio, or using a pre-configured custom transport. * * @param config The configuration for the MCP server, determining the type of transport to create. * @returns A Promise resolving to an object containing the created `Transport` instance * (or `null` if configuration is invalid) and a string indicating the `type` of transport. * @throws May throw an error if essential MCP SDK components cannot be imported. */ declare function transportFrom(config: McpServerConfig, sessionId?: string): Promise<{ transport: Transport | null; type: string; }>; export { transportFrom };