mcp-use
Version:
Opinionated MCP Framework for TypeScript (@modelcontextprotocol/sdk compatible) - Build MCP Agents, Clients and Servers with support for ChatGPT Apps, Code Mode, OAuth, Notifications, Sampling, Observability and more.
28 lines • 942 B
TypeScript
import type { McpServerOptions } from "../McpClientProvider.js";
import type { StorageProvider } from "./StorageProvider.js";
/**
* LocalStorage-based storage provider for browser environments
*
* Persists server configurations to browser localStorage with automatic
* serialization/deserialization.
*
* @example
* ```typescript
* const storage = new LocalStorageProvider("my-servers");
* const provider = (
* <McpClientProvider storageProvider={storage}>
* <App />
* </McpClientProvider>
* );
* ```
*/
export declare class LocalStorageProvider implements StorageProvider {
private storageKey;
constructor(storageKey?: string);
getServers(): Record<string, McpServerOptions>;
setServers(servers: Record<string, McpServerOptions>): void;
setServer(id: string, config: McpServerOptions): void;
removeServer(id: string): void;
clear(): void;
}
//# sourceMappingURL=LocalStorageProvider.d.ts.map