@mcp-use/client connects your app to one or more MCP servers. The client negotiates legacy (v1 sessionful) and modern (v2 sessionless) servers automatically and exposes one connection API for both.
Install
Entry points
MCP App view hooks (
useToolContext, useCallTool, …) live in mcp-use/react, not the client package.
Quick start
Core types
MCPClient— holds server config and opens connections.MCPConnection— call tools, read resources, fetch prompts. Checkconnection.infoforprotocolEra,protocolVersion, capabilities, and instructions.MCPSession— deprecated alias forMCPConnection.
client.connect(name) over createSession(). Use client.connectAll() for every configured server.
Configure servers
Next steps
Tools
List and call server tools.
v2 Migration
Breaking changes and upgrade checklist.
Authentication
OAuth and bearer tokens.
React
McpClientProvider and hooks.Environments
Node, browser, and React differences.