FrontMcpProvider
The provider manages the MCP client lifecycle and populates the sharedServerRegistry.
Props
Lifecycle
- On mount, registers the primary server (and any
servers) inServerRegistry - If
autoConnectis true, callsserver.connect()and discovers tools/resources/prompts - Updates registry entry with
status: 'connected'and populates tool/resource/prompt lists - Also auto-connects additional servers from
serversprop - On unmount, unregisters all servers from the registry
FrontMcpContext
The React context carries a slim value — no state, just pointers:ServerRegistry and is accessed via hooks.