import { ConfigService } from "@nestjs/config"; import { Server } from "@modelcontextprotocol/sdk/server/index.js"; import { McpUserContext } from "../interfaces/mcp.tool.interface"; import { McpToolRegistry } from "./mcp.tool.registry"; /** * Builds a per-request, stateless MCP protocol server. * * Uses the SDK's low-level `Server` (NOT `McpServer`) so tool input schemas * stay plain JSON Schema objects produced by the tool layer. Each authenticated * request gets its own Server instance bound to that user's context, so * tools/list and tools/call are always RBAC-filtered through McpToolRegistry. */ export declare class McpServerFactory { private readonly configService; private readonly registry; constructor(configService: ConfigService, registry: McpToolRegistry); /** * Creates a stateless MCP Server for one authenticated request. * Registers tools/list (with `annotations.readOnlyHint` derived from each * tool's `readOnly` flag) and tools/call (dispatched through the registry). */ create(ctx: McpUserContext): Server; } //# sourceMappingURL=mcp.server.factory.d.ts.map