server.d.ts 703 B

123456789101112131415161718192021
  1. /**
  2. * QMD MCP Server - Model Context Protocol server for QMD
  3. *
  4. * Exposes QMD search and document retrieval as MCP tools and resources.
  5. * Documents are accessible via qmd:// URIs.
  6. *
  7. * Follows MCP spec 2025-06-18 for proper response types.
  8. */
  9. export declare function startMcpServer(): Promise<void>;
  10. export type HttpServerHandle = {
  11. httpServer: import("http").Server;
  12. port: number;
  13. stop: () => Promise<void>;
  14. };
  15. /**
  16. * Start MCP server over Streamable HTTP (JSON responses, no SSE).
  17. * Binds to localhost only. Returns a handle for shutdown and port discovery.
  18. */
  19. export declare function startMcpHttpServer(port: number, options?: {
  20. quiet?: boolean;
  21. }): Promise<HttpServerHandle>;