/** * Server-spec parsing + transport construction. * * Per docs/SPEC.md, v0.1 supports three forms: * * stdio: [args...] — spawn process; stdio transport * stdio:./path/to/binary --arg — relative path also accepted * http://localhost:3000 — HTTP transport * * The HTTP transport stub is here for v0.1; the implementation * lands in week 2 once we have a real HTTP-transport MCP server to * test against. For week 1 the focus is stdio + the official * @modelcontextprotocol/server-filesystem. */ import { Client } from "@modelcontextprotocol/sdk/client/index.js"; /** A parsed server-spec — the union of supported transport variants. */ export type ServerSpec = { kind: "stdio"; command: string; args: string[]; } | { kind: "http"; url: string; }; /** * Parse a server-spec string into structured form. * * Throws if the spec doesn't match a supported shape — we fail loud * here rather than silently degrading to a default, because a * mistyped spec produces a confusing connect-failure later. */ export declare function parseServerSpec(spec: string): ServerSpec; /** * Open a connected MCP `Client` for the given spec. * * Caller owns shutdown — pass the result to `closeClient` when * finished. We do not auto-close on process exit because some * commands (`scan`) hold the client across multiple steps. */ export declare function openClient(spec: ServerSpec): Promise; /** Close a client opened by `openClient`. Safe to call multiple times. */ export declare function closeClient(client: Client): Promise; //# sourceMappingURL=transport.d.ts.map