import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { ServerContext } from "@sentry/mcp-core/types";

//#region src/transports/stdio.d.ts

/**
 * Starts the MCP server with stdio transport and telemetry.
 *
 * Connects the server using stdio transport for process-based communication.
 * Context is already captured in tool handler closures during buildServer().
 * All operations are wrapped in Sentry tracing for observability.
 *
 * @param server - Configured and instrumented MCP server instance (with context in closures)
 * @param context - Server context with authentication and configuration (for telemetry attributes)
 *
 * @example CLI Integration
 * ```typescript
 * import { buildServer } from "./server.js";
 * import { startStdio } from "./transports/stdio.js";
 *
 * const context = {
 *   accessToken: userToken,
 *   sentryHost: "sentry.io",
 *   userId: "user-123",
 *   clientId: "cursor-ide",
 *   constraints: {}
 * };
 *
 * const server = buildServer({ context }); // Context captured in closures
 * await startStdio(server, context);
 * ```
 */
declare function startStdio(server: McpServer, context: ServerContext): Promise<void>;
//# sourceMappingURL=stdio.d.ts.map
//#endregion
export { startStdio };
//# sourceMappingURL=stdio.d.ts.map