import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import type { CompanyClient } from './company.js';
import { type OperationOptions, type OperationOutcome } from './operations.js';
import type { PoppyApiEntry } from './types.js';
export interface McpConnection {
    client: Client;
    api: PoppyApiEntry;
    /**
     * Calls a tool. With the Operations extension, a tool that wants approval returns an operation:
     * it is decided and the same tool is called again with the approval in `_meta`; `operation` says
     * how it ended (the action was done only when it is `performed`).
     */
    callTool(name: string, args?: Record<string, unknown> | undefined, options?: OperationOptions): Promise<{
        result: Awaited<ReturnType<Client['callTool']>>;
        operation?: OperationOutcome | undefined;
    }>;
    close(): Promise<void>;
}
/**
 * Connects to a listed MCP server over Streamable HTTP (section 7): the Session header on every
 * request and, when signed in, an access token requested with `resource` set to the server's
 * `url`. A challenge rejects the call with a {@link ResourceAuthError} naming the needed `scope`.
 */
export declare function connectMcp(company: CompanyClient, apiIndex?: number | undefined): Promise<McpConnection>;
//# sourceMappingURL=mcp.d.ts.map