mcp-use client when you want to test or automate an MCP server from the terminal. The fastest useful loop is: connect to a server, list its tools, then call one tool.
For the complete command and flag catalog, see the CLI reference.
Install the CLI
Run the CLI withnpx, or install it globally if you use it often.
Connect and call a tool
Save the server under a short name, then use that name in every later command.connect, the CLI prints the server name, version, capabilities, and tool count. Use tools list as the quick verification step. If the command returns the tools you expect, the server is reachable and initialized.
Use any short name that helps you remember the target, such as dev, staging, prod, or filesystem.
Connect to HTTP or stdio servers
HTTP servers use a URL. The saved name comes before the URL.--stdio. Quote the command so the CLI can split it into the executable and arguments.
Call tools
Start withtools list, then inspect a tool schema before calling tools with required inputs.
key=value pairs. Use key:=<json> for nested values, or pass one JSON object.
--json when another command or script needs to parse the result.
--timeout <ms> for slow tools.
Read resources
Resources are server-provided content identified by URI. List resources first, then read the URI you need.Get prompts
Prompts are reusable message templates exposed by the server. List prompts, then get one with its arguments.Check OAuth status
For HTTP servers that require OAuth,connect starts the browser-based OAuth flow when the server returns 401 Unauthorized. After authentication, the saved server reuses those credentials for tools, resources, prompts, and screenshots.
auth refresh when you want to force a token refresh, and auth logout when you want to clear stored OAuth tokens for that server URL.
--auth when connecting.
--no-oauth when you want the CLI to fail on 401 Unauthorized instead of starting OAuth.
Capture widget screenshots
Use screenshots to verify MCP Apps widgets from a terminal or an automated test. The saved-server form reuses the auth fromconnect.
--mcp.
--output, --width, --height, --device-scale-factor, --theme, --wait-for, --delay, --timeout, and --cdp-url. See the CLI reference for the full screenshot option list.
Use interactive mode
Interactive mode opens a small REPL for one saved server. Use it when you want to explore tools, resources, and prompts without repeating the full command prefix.Script common checks
Use--json and stable saved names when scripting. This keeps stdout parseable while status messages stay on stderr.
When a command fails
Most failures can be diagnosed from the command you just ran:Server '<name>' not found: runnpx mcp-use client list, or reconnect withnpx mcp-use client connect <name> <url>.This tool requires arguments: runtools describe <tool>and pass the required inputs.Tool '<name>' not found: runtools listagainst the same saved server.- OAuth refresh fails: run
mcp-use client connect <name> <url>again to re-authenticate.