@mcp-use/client connects your app to one or more MCP servers. It negotiates the
server’s supported MCP protocol automatically and exposes the same connection
API across sessionful and sessionless servers.
Install
>=22.22.2 for Node applications and is ESM-only.
Quick start
connect(name) returns a ready MCPConnection. Always close the client when
your application is finished so its active connections and transports are
released.
Core types
MCPClient— holds server configuration and opens connections.MCPConnection— calls tools, reads resources, and fetches prompts.connection.infoexposes the negotiated protocol, server metadata, capabilities, and instructions.MCPSession— deprecated compatibility alias forMCPConnection.
client.connect(name) for one configured server or client.connectAll() to
connect to every configured server.
Configure servers
Next steps
Tools
List and call server tools.
Migration guide
Update packages, imports, configuration, and connection code.
Authentication
Configure OAuth and bearer tokens.
React
Manage connections with
McpClientProvider and hooks.Environments
Compare Node, browser, and React support.