// With initial servers
<McpClientProvider
mcpServers={{
linear: { url: "https://mcp.linear.app/sse" },
github: { url: "https://mcp.github.com/mcp" }
}}
>
<MyApp />
</McpClientProvider>
// With persistence
<McpClientProvider
storageProvider={new LocalStorageProvider("my-servers")}
enableRpcLogging={true}
>
<MyApp />
</McpClientProvider>
Provider for managing multiple MCP server connections
Provides a context for adding/removing servers and accessing their state. Each server maintains its own connection, notification history, and pending sampling/elicitation requests.
Supports:
mcpServerspropstorageProvider