import type { Server } from "@modelcontextprotocol/sdk/server/index.js"; /** * shortlinks MCP transport/port boilerplate — self-contained, with NO * external harness dependency. The prior version depended on the unpublished * `@hasna/mcp-harness` (a `file:` link), which made `shortlinks-mcp` * unstartable on a fresh `npm i` / `bun add -g`. This version inlines the tiny * amount of transport glue using only the published `@modelcontextprotocol/sdk` * and Bun's built-in HTTP server, matching the pattern used by the reference * apps (conversations, mementos). * * shortlinks builds its MCP server with the low-level `Server`; the WebStandard * transport's `.connect()` works identically on `Server` and the high-level * `McpServer`. */ export declare const MCP_HTTP_SERVICE_NAME = "shortlinks"; export declare const MCP_HTTP_HOST = "127.0.0.1"; export declare const DEFAULT_MCP_HTTP_PORT = 8851; export interface McpHttpServerHandle { port: number; host: string; url: string; close(): Promise; } export declare function isHttpMode(argv?: string[], env?: NodeJS.ProcessEnv): boolean; export declare function isStdioMode(argv?: string[], env?: NodeJS.ProcessEnv): boolean; export declare function resolveMcpHttpPort(argv?: string[], env?: NodeJS.ProcessEnv): number; export declare function startMcpHttpServer(buildServer: () => Server, options?: { port?: number; host?: string; serviceName?: string; }): Promise;