/** * Handler for `GET /api/mcp-status`. * * Returns a snapshot of the locally connected MCP servers managed by * `spectral serve`. Pure handler pattern — no framework, no side effects. * The caller (the relay dispatcher) injects `McpExtensionState`. * * This module intentionally imports ONLY `McpExtensionState` (a pure-type * import from `state.ts`) plus the `supportsOAuth` predicate. `supportsOAuth` * comes from `mcp-auth-flow.ts` — the same module the `/api/mcp-auth` handler * already imports — so this endpoint adds no modules to the dispatcher's * graph beyond that handler. What it deliberately avoids is `init.ts` / * `config.ts`, whose runtime deps (config loading, consent manager, UI * resource handlers) the status snapshot does not need. */ import type { McpExtensionState } from "../../mcp/state.js"; export interface McpServerStatus { name: string; status: "connected" | "disconnected" | "needs-auth" | "failed" | "cached"; toolCount: number; /** Whether the server can run the OAuth flow via `POST /api/mcp-auth`. */ oauthCapable: boolean; /** Epoch-ms of the most recent connection failure, if the server is in a failed state. */ failedAt?: number; } export declare function handleListMcpStatus(state: McpExtensionState): McpServerStatus[]; //# sourceMappingURL=mcp-status.d.ts.map