import { Server } from '../../../serve/server.js'; import { ServerOptions } from '@modelcontextprotocol/sdk/server/index.js'; import { PromptCallback, ReadResourceCallback, ResourceTemplate, ReadResourceTemplateCallback, ToolCallback, McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { ZodRawShape } from 'zod'; import { ToolAnnotations } from '@modelcontextprotocol/sdk/types.js'; /** * Copyright 2025 © BeeAI a Series of LF Projects, LLC * SPDX-License-Identifier: Apache-2.0 */ type MCPServerPrompt = { type: "prompt"; name: string; description: string; callback: PromptCallback; } | { type: "prompt"; name: string; description: string; argsSchema: ZodRawShape; callback: PromptCallback; }; type MCPServerResource = { type: "resource"; name: string; uri: string; callback: ReadResourceCallback; } | { type: "resource"; name: string; template: ResourceTemplate; callback: ReadResourceTemplateCallback; }; interface MCPServerTool { type: "tool"; name: string; description: string; paramsSchema: ZodRawShape | ToolAnnotations; callback: ToolCallback; } type MCPServerEntry = MCPServerPrompt | MCPServerResource | MCPServerTool; declare class MCPServerConfig { transport: "stdio" | "sse" | "streamable-http"; hostname: string; port: number; name: string; version: string; settings?: ServerOptions; constructor(partial?: Partial); } declare class MCPServer extends Server { protected server: McpServer; constructor(config?: MCPServerConfig); serve(): Promise; getFactory(member: any): (input: TInput, config?: Record) => Promise; } export { MCPServer, MCPServerConfig };