Skip to main content
The @mcp-use/cli package installs the mcp-use executable. Use this page as the exhaustive command reference for local development, production builds, cloud deploys, saved MCP client sessions, skills, and CLI environment variables. For hands-on workflows, see the CLI Client guide, Tunneling guide, and Manufact Cloud deployment guide.

Command map

Run locally

mcp-use dev starts the development server, widget watcher, and Inspector.

Build and start

mcp-use build writes production artifacts. mcp-use start runs the built server.

Deploy

mcp-use deploy, mcp-use deployments, and mcp-use servers manage Manufact Cloud resources.

Client CLI

mcp-use client saves MCP servers, calls tools, reads resources, gets prompts, handles OAuth, and captures widget screenshots.

Tunnels

mcp-use dev --tunnel and mcp-use start --tunnel expose a local server through a public URL.

Skills and types

mcp-use skills add installs agent skills. mcp-use generate-types writes widget type augmentation.

Install the CLI

create-mcp-use-app installs the CLI as a project dependency.

dev

Purpose: Start a development server with TypeScript watching, widget builds, automatic restarts, and the Inspector. Syntax:
Options: Examples:
Notes and behavior:
  • The MCP endpoint is served at /mcp.
  • The Inspector is mounted at /inspector and opens automatically unless --no-open is set.
  • The command sets NODE_ENV=development, sets PORT, and sets MCP_URL to the tunnel URL or local server URL when MCP_URL is not already set.
  • HMR updates tools, prompts, resources, and resource templates without dropping connected clients.
  • Server configuration changes, middleware changes, and OAuth configuration changes require a restart.
  • mcp-use dev writes development session metadata to .mcp-use/sessions.json.
  • --tunnel uses the same tunnel service as mcp-use start --tunnel. See Tunneling reference.

build

Purpose: Build TypeScript server code, bundle widgets, generate tool registry types, and write the production manifest. Syntax:
Options: Examples:
Notes and behavior:
  • The command writes dist/mcp-use.json.
  • Widget .tsx files under the widget directory are bundled as standalone HTML pages.
  • The command generates .mcp-use/tool-registry.d.ts when it can load the server entry. Type generation errors during build are non-blocking.
  • Without --mcp-dir, TypeScript is transpiled with esbuild and typechecked with the local typescript binary unless --no-typecheck is set.
  • With --mcp-dir, the host app owns its build. The CLI skips full-project transpilation and records the TypeScript source entry in the manifest.
  • If MCP_SERVER_URL is set, widget builds receive that value for server URL and asset path generation.
  • The public/ directory is copied to dist/public/ when it exists.

start

Purpose: Run a production server from built files or from the TypeScript source entry recorded for --mcp-dir projects. Syntax:
Options: Examples:
Notes and behavior:
  • Port resolution order is --port, then PORT, then 3000.
  • If the selected port is unavailable, the CLI chooses the next available port.
  • The command reads dist/mcp-use.json first. If the manifest has entryPoint, start runs that file.
  • If the manifest is missing or does not contain an entry point, the CLI checks common paths such as dist/index.js, dist/server.js, dist/src/index.js, and dist/src/server.js.
  • With --mcp-dir, the fallback list also checks <mcp-dir>/index.ts, <mcp-dir>/index.tsx, dist/<mcp-dir>/index.js, and dist/<mcp-dir>/server.js.
  • TypeScript source entries are run through the local tsx package when available, with npx tsx as a fallback.
  • The command sets NODE_ENV=production, sets PORT, and sets MCP_URL to the tunnel URL or http://localhost:<port> when MCP_URL is not already set.
  • The Inspector is only available when the build was created with mcp-use build --with-inspector.

Tunneling reference

mcp-use dev --tunnel and mcp-use start --tunnel create a public URL that forwards to the local MCP server. The tunnel subdomain is stored in dist/mcp-use.json and reused across restarts when available.
Tunnel limits and lifecycle: The standalone package is also available:
See the Tunneling guide for client setup and testing workflows.

deploy

Purpose: Create or update a Manufact Cloud deployment for an MCP server. Syntax:
Options: Examples:
Notes and behavior:
  • The default path deploys from GitHub and prompts to install or connect the GitHub App when needed.
  • --no-github packs and uploads local source to a platform-managed repository.
  • Redeploys of a project already linked to a platform-managed server auto-detect the upload path. --no-github is only required on the first deploy for that path.
  • The command writes .mcp-use/project.json to link the local project to the cloud server.
  • The CLI adds .mcp-use/ to .gitignore when it writes a project link.
  • Environment variables passed through --env and --env-file are synced to the target branch preview environment when --branch is set.

Authentication commands

Authentication commands manage the user-level Manufact Cloud credentials in ~/.mcp-use/config.json.

login

Purpose: Authenticate the CLI with Manufact Cloud. Syntax:
Options: Examples:
Notes and behavior:
  • Interactive login starts a device-code flow and opens a browser.
  • If the account belongs to multiple organizations and --org is omitted, the CLI prompts for an organization.
  • In non-TTY environments, use --org to avoid an organization selection prompt.
  • MCP_USE_API_KEY can provide the API key for non-interactive login.

whoami

Purpose: Print the current authentication status and user information. Syntax:
Options: None. Examples:
Notes and behavior: The command reads ~/.mcp-use/config.json.

logout

Purpose: Remove saved Manufact Cloud credentials. Syntax:
Options: None. Examples:
Notes and behavior: The command removes credentials from ~/.mcp-use/config.json.

Organization commands

Organization commands control the active Manufact Cloud organization for cloud commands. Notes and behavior:
  • deploy, deployments, and servers use the active organization unless --org overrides it.
  • For CI or agent runs, pass --org <org> to login, deploy, servers, or deployments commands instead of switching global state. The value can be an organization slug, ID, or name.

Deployment management commands

Purpose: Inspect and manage existing Manufact Cloud deployments. Syntax:
Subcommands: Examples:
Notes and behavior:
  • logs shows runtime logs by default. Use --build for build logs.
  • restart redeploys the same server and uses the deployment branch unless --branch is set.
  • delete prompts for confirmation unless --yes is set.

Server management commands

Purpose: Manage cloud servers, which are long-lived Git-backed deploy targets that own deployments. Syntax:
Subcommands: Examples:
Notes and behavior:
  • servers update --branch changes the production branch for future production deploys.
  • Pass an empty string to --build-command, --start-command, --root-dir, --watch-paths, or --deploy-branches to clear that setting.
  • --wait-for-ci and --no-wait-for-ci control whether auto-deploys wait for other check runs before deploying.
  • servers delete prompts for confirmation unless --yes is set.

Server environment commands

Purpose: List, add, update, and remove environment variables on a cloud server. Syntax:
Subcommands: Examples:
Notes and behavior:
  • Values are masked by default. --show-values reveals non-sensitive values.
  • --env <environments> accepts comma-separated production, preview, and development.
  • env add --env defaults to all three environments when omitted.
  • --branch <name> scopes preview environment variables to a branch. Omit --branch for production resolution.
  • env update and env remove accept either a variable key or UUID.

client

Purpose: Use MCP servers from the terminal. The client command can save server connections, call tools, read resources, get prompts, manage OAuth tokens, and render MCP Apps widgets as PNG screenshots. Syntax:
Top-level subcommands: Per-server scopes: Examples:
Notes and behavior:
  • Saved servers are stored in ~/.mcp-use/cli-sessions.json.
  • OAuth tokens for saved HTTP servers are stored under ~/.mcp-use/oauth/<urlHash>/.
  • connect --auth <token> stores a static bearer token and skips OAuth.
  • connect --no-oauth prevents automatic OAuth when the server returns 401.
  • Tool and prompt arguments accept key=value, key:=<json>, or a single JSON object argument.
  • tools call --screenshot captures a widget screenshot when the tool declares a UI resource.
  • resources subscribe keeps the process running until interrupted.
Common screenshot options:

CLI Client guide

Use the guide for connection workflows, OAuth behavior, argument parsing examples, scripting patterns, and screenshots.

skills add

Purpose: Install mcp-use AI agent skills for Cursor, Claude Code, and Codex. Syntax:
Options: Examples:
Notes and behavior:
  • skills install is an alias for skills add.
  • The command downloads the latest mcp-use skills from github.com/mcp-use/mcp-use.
  • Skills are installed into .cursor/skills/, .claude/skills/, and .agents/skills/.
  • create-mcp-use-app can install skills during project creation unless --no-skills is used.

generate-types

Purpose: Generate TypeScript module augmentation for MCP tool schemas. Syntax:
Options: Examples:
Notes and behavior:
  • The command writes .mcp-use/tool-registry.d.ts.
  • mcp-use dev runs type generation automatically.
  • mcp-use build also attempts type generation when it can find a server entry, but build-time generation failures are non-blocking.
  • Include .mcp-use/**/* in tsconfig.json so widget code can see generated types.

Environment variables

Examples: