import React from 'react';
import type { PromptDefinition, UseMcpOptions } from 'react-mcp-hook';
export type McpServerId = string;
export type ToolPermission = 'enabled' | 'ask_first' | 'disabled';
export type ToolPreferenceMap = Record<string, ToolPermission>;
export interface StdioConfig {
    command: string;
    args?: string[];
    env?: Record<string, string>;
    autoRestart?: boolean;
}
export type StoredMcpServer = (UseMcpOptions | Partial<UseMcpOptions>) & {
    serverName?: string;
    toolPreferences?: ToolPreferenceMap;
    serverEnabled?: boolean;
    cachedPrompts?: PromptDefinition[];
    cachedPromptsUpdatedAt?: number;
    transportMode?: 'sse' | 'stdio';
    stdioConfig?: StdioConfig;
};
export interface McpServerEntry {
    id: McpServerId;
    options: StoredMcpServer;
}
interface McpServersState {
    order: McpServerId[];
    byId: Record<McpServerId, StoredMcpServer>;
    selectedId: McpServerId | null;
    initialServersApplied?: boolean;
}
export interface McpServersProviderProps {
    children: React.ReactNode;
    /** Optional list used to merge into the store on mount and when updated. */
    initialServers?: McpServerEntry[];
    /** Local storage key used to persist data. */
    storageKey?: string;
}
export interface McpServersContextValue {
    state: McpServersState;
    servers: McpServerEntry[];
    addServer: (options: StoredMcpServer, id?: McpServerId) => McpServerId;
    updateServer: (id: McpServerId, options: StoredMcpServer) => void;
    removeServer: (id: McpServerId) => void;
    selectServer: (id: McpServerId | null) => void;
    clearServers: () => void;
    getServer: (id: McpServerId) => StoredMcpServer | undefined;
    setServerEnabled: (id: McpServerId, enabled: boolean) => void;
    setToolPermission: (id: McpServerId, toolName: string, permission: ToolPermission) => void;
    getToolPermission: (id: McpServerId, toolName: string) => ToolPermission;
    isToolEnabled: (id: McpServerId, toolName: string) => boolean;
    setServerPrompts: (id: McpServerId, prompts: PromptDefinition[] | undefined) => void;
}
declare const McpServersContext: React.Context<McpServersContextValue | undefined>;
export declare const McpServersProvider: React.FC<McpServersProviderProps>;
export declare const useMcpServers: () => McpServersContextValue;
export default McpServersContext;
//# sourceMappingURL=McpContext.d.ts.map