/**
 * Studiograph MCP server (stdio transport)
 *
 * Creates a McpServer instance, registers all tools, and connects via stdio
 * transport for integration with Claude Desktop and other MCP clients.
 *
 * Identity: requires STUDIOGRAPH_MCP_TOKEN to be set to a per-user API token
 * (or a JWT). The token is resolved against the workspace's AuthService to
 * produce the caller identity used by every tool's access control check.
 * Fails closed — if the token is missing or invalid the process exits.
 *
 * NOTE: All logging uses log.error() — stdout is reserved for the
 * JSON-RPC protocol messages and must not be written to directly.
 * log.error writes to stderr (via console.error under the hood), which
 * preserves the stdio-transport invariant.
 */
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { WorkspaceManager } from '../core/workspace-manager.js';
import { AuthService, type AuthUser } from '../services/auth-service.js';
export declare function startMcpServer(workspaceManager: WorkspaceManager, authService: AuthService): Promise<void>;
export declare function resolveStdioUser(authService: AuthService): AuthUser | null;
/**
 * Build an in-process MCP server (full tool surface, same as stdio/HTTP) and
 * return a connected `Client` wired to it over an in-memory transport. Used by
 * the stdio proxy as the LOCAL fallback when no live HTTP server is reachable —
 * in that case there is no open editor, so a direct write is safe.
 *
 * Identity is the resolved per-user `STUDIOGRAPH_MCP_TOKEN`, threaded through
 * `registerTools` exactly as the real stdio server does, so access control is
 * identical on both upstreams.
 */
export declare function createInProcessMcpClient(workspaceManager: WorkspaceManager, authService: AuthService, user: AuthUser): Promise<Client>;
