/** * `create()` Factory Function * * Spins up a FrontMCP direct server from a flat config object — no decorators, * no App classes, no HTTP server. Supports machineId injection for session * continuity and caching for reuse. * * @example * ```typescript * import { create } from '@frontmcp/sdk'; * * const server = await create({ * info: { name: 'my-service', version: '1.0.0' }, * tools: [MyTool], * adapters: [OpenapiAdapter.init({ name: 'api', spec, baseUrl })], * }); * * const { tools } = await server.listTools(); * const result = await server.callTool('my-tool', { arg: 'value' }); * await server.dispose(); * ``` */ import 'reflect-metadata'; import type { CreateConfig } from './create.types'; import type { DirectMcpServer } from './direct.types'; /** * Create a FrontMCP direct server from a flat config object. * * Returns a `DirectMcpServer` that provides `listTools`, `callTool`, * `listResources`, `readResource`, `listPrompts`, `getPrompt`, and `dispose`. * * @param config - Flat configuration combining server and app fields * @returns A ready-to-use `DirectMcpServer` * * @example Basic usage * ```typescript * const server = await create({ * info: { name: 'my-service', version: '1.0.0' }, * tools: [MyTool], * }); * const { tools } = await server.listTools(); * await server.dispose(); * ``` * * @example With caching and machineId * ```typescript * const server = await create({ * info: { name: 'my-service', version: '1.0.0' }, * tools: [MyTool], * machineId: 'stable-id-for-sessions', * cacheKey: 'tenant-123', * }); * ``` */ export declare function create(config: CreateConfig): Promise; /** * Clear the create() instance cache. * Useful for testing to ensure clean state between test runs. * Does NOT dispose cached servers — call `dispose()` on each first. */ export declare function clearCreateCache(): void; //# sourceMappingURL=create.d.ts.map