All Commands

Server Management

CommandDescription
mcp add <name> <command-or-url>Save a server under a name
mcp lsList saved servers
mcp rm <name>Remove a saved server
mcp expose <server>Create a standalone command for a server
mcp expose --remove <server>Remove an exposed command

Using a Server

CommandDescription
mcp <server> toolsList all tools
mcp <server> tools <tool>Inspect a tool’s schema and usage
mcp <server> <tool> [args...]Call a tool
mcp <server> resourcesList all resources
mcp <server> resource <name>Read a resource
mcp <server> promptsList all prompts
mcp <server> prompt <name> [args...]Render a prompt
mcp <server> shellOpen an interactive shell
mcp <server> doctorDiagnose connection issues
mcp <server> loginPre-authenticate (OAuth/bearer)

Background / Sharing

CommandDescription
mcp <server> upStart server in background (stdio, single client)
mcp <server> up --shareStart server in HTTP mode (multiple clients)
mcp <server> downStop background server

One-off Use

CommandDescription
mcp tools --command '<cmd>'List tools without registering
mcp tool --command '<cmd>' <tool> [args...]Call a tool without registering
mcp tools --url <url>List tools on a remote server
mcp tool --url <url> <tool> [args...]Call a tool on a remote server

Global Flags

FlagDescription
-o, --output <format>Output format: auto, json, yaml, raw, table
--timeout <duration>Request timeout (default: 30s)
-h, --helpShow help

Connection Flags

These are available on tools, tool, resources, resource, prompts, prompt, shell, doctor, and login:

FlagDescription
--command <cmd>Local server command (instead of registered name)
--url <url>Remote server URL
--auth <mode>Auth mode (oauth, bearer)
--bearer-env <var>Environment variable holding a bearer token
--header <key: value>Additional HTTP header (repeatable)
--cwd <dir>Working directory for local commands
--env <KEY=VALUE>Environment override (repeatable)