UNPKG

@kya-os/mcp-i

Version:

The TypeScript MCP framework with identity features built-in

62 lines (61 loc) 2.05 kB
import { Server as McpServer } from "@modelcontextprotocol/sdk/server/index.js"; import { Implementation } from "@modelcontextprotocol/sdk/types.js"; export type ToolFile = { metadata: unknown; schema: unknown; default: (args: Record<string, unknown>) => Promise<unknown> | unknown; }; export declare const injectedTools: Record<string, () => Promise<ToolFile>>; export declare const SERVER_INFO: Implementation; export declare const SERVER_CAPABILITIES: { capabilities: { tools: {}; }; }; declare global { var __MCPI_SERVER_INSTANCE__: McpServer | undefined; var __MCPI_SERVER_CREATED__: boolean | undefined; } /** Loads tools and injects them into the server */ export declare function configureServer(server: McpServer, toolModules: Map<string, ToolFile>): Promise<McpServer>; export declare function loadTools(): readonly [Promise<void>[], Map<string, ToolFile>]; export declare function createServer(): Promise<McpServer<{ method: string; params?: { [x: string]: unknown; task?: { [x: string]: unknown; ttl?: number | null | undefined; pollInterval?: number | undefined; } | undefined; _meta?: { [x: string]: unknown; progressToken?: string | number | undefined; "io.modelcontextprotocol/related-task"?: { [x: string]: unknown; taskId: string; } | undefined; } | undefined; } | undefined; }, { method: string; params?: { [x: string]: unknown; _meta?: { [x: string]: unknown; "io.modelcontextprotocol/related-task"?: { [x: string]: unknown; taskId: string; } | undefined; } | undefined; } | undefined; }, { [x: string]: unknown; _meta?: { [x: string]: unknown; "io.modelcontextprotocol/related-task"?: { [x: string]: unknown; taskId: string; } | undefined; } | undefined; }>>;