Calls a tool on the MCP server.
The name of the tool to call.
The arguments to pass to the tool.
A promise that resolves to the result of the tool call.
Connects to the MCP server.
Ensures that the client is connected to the MCP server.
Checks if the user is authenticated.
True if the user is authenticated, false otherwise.
Lists the available tools on the MCP server.
A promise that resolves to a list of tools.
Loads an existing session from session storage.
Logs out from the MCP server and clears the session.
Handles the OAuth callback, exchanging the authorization code for an access token.
A promise that resolves to true if the callback was handled, false otherwise.
Starts the OAuth flow by redirecting the user to the authorization server.
StaticcreateCreates a new instance of McpClientController.
The base URL of the MCP server.
Optionalscopes: string[]The OAuth scopes to request.
A new instance of McpClientController.
McpClientController Controls the MCP client, including OAuth flow, connection, and tool calls.