@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
dev
Purpose: Start a development server with TypeScript watching, widget builds, automatic restarts, and the Inspector.
Syntax:
Examples:
- The MCP endpoint is served at
/mcp. - The Inspector is mounted at
/inspectorand opens automatically unless--no-openis set. - The command sets
NODE_ENV=development, setsPORT, and setsMCP_URLto the tunnel URL or local server URL whenMCP_URLis 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 devwrites development session metadata to.mcp-use/sessions.json.--tunneluses the same tunnel service asmcp-use start --tunnel. See Tunneling reference.
build
Purpose: Build TypeScript server code, bundle widgets, generate tool registry types, and write the production manifest.
Syntax:
Examples:
- The command writes
dist/mcp-use.json. - Widget
.tsxfiles under the widget directory are bundled as standalone HTML pages. - The command generates
.mcp-use/tool-registry.d.tswhen it can load the server entry. Type generation errors duringbuildare non-blocking. - Without
--mcp-dir, TypeScript is transpiled with esbuild and typechecked with the localtypescriptbinary unless--no-typecheckis 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_URLis set, widget builds receive that value for server URL and asset path generation. - The
public/directory is copied todist/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:
Examples:
- Port resolution order is
--port, thenPORT, then3000. - If the selected port is unavailable, the CLI chooses the next available port.
- The command reads
dist/mcp-use.jsonfirst. If the manifest hasentryPoint,startruns 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, anddist/src/server.js. - With
--mcp-dir, the fallback list also checks<mcp-dir>/index.ts,<mcp-dir>/index.tsx,dist/<mcp-dir>/index.js, anddist/<mcp-dir>/server.js. - TypeScript source entries are run through the local
tsxpackage when available, withnpx tsxas a fallback. - The command sets
NODE_ENV=production, setsPORT, and setsMCP_URLto the tunnel URL orhttp://localhost:<port>whenMCP_URLis 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.
The standalone package is also available:
deploy
Purpose: Create or update a Manufact Cloud deployment for an MCP server.
Syntax:
Examples:
- The default path deploys from GitHub and prompts to install or connect the GitHub App when needed.
--no-githubpacks 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-githubis only required on the first deploy for that path. - The command writes
.mcp-use/project.jsonto link the local project to the cloud server. - The CLI adds
.mcp-use/to.gitignorewhen it writes a project link. - Environment variables passed through
--envand--env-fileare synced to the target branch preview environment when--branchis 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:
Examples:
- Interactive login starts a device-code flow and opens a browser.
- If the account belongs to multiple organizations and
--orgis omitted, the CLI prompts for an organization. - In non-TTY environments, use
--orgto avoid an organization selection prompt. MCP_USE_API_KEYcan provide the API key for non-interactive login.
whoami
Purpose: Print the current authentication status and user information.
Syntax:
~/.mcp-use/config.json.
logout
Purpose: Remove saved Manufact Cloud credentials.
Syntax:
~/.mcp-use/config.json.
Organization commands
Organization commands control the active Manufact Cloud organization for cloud commands.
Notes and behavior:
deploy,deployments, andserversuse the active organization unless--orgoverrides it.- For CI or agent runs, pass
--org <org>tologin,deploy,servers, ordeploymentscommands 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:
Examples:
logsshows runtime logs by default. Use--buildfor build logs.restartredeploys the same server and uses the deployment branch unless--branchis set.deleteprompts for confirmation unless--yesis set.
Server management commands
Purpose: Manage cloud servers, which are long-lived Git-backed deploy targets that own deployments. Syntax:
Examples:
servers update --branchchanges the production branch for future production deploys.- Pass an empty string to
--build-command,--start-command,--root-dir,--watch-paths, or--deploy-branchesto clear that setting. --wait-for-ciand--no-wait-for-cicontrol whether auto-deploys wait for other check runs before deploying.servers deleteprompts for confirmation unless--yesis set.
Server environment commands
Purpose: List, add, update, and remove environment variables on a cloud server. Syntax:
Examples:
- Values are masked by default.
--show-valuesreveals non-sensitive values. --env <environments>accepts comma-separatedproduction,preview, anddevelopment.env add --envdefaults to all three environments when omitted.--branch <name>scopes preview environment variables to a branch. Omit--branchfor production resolution.env updateandenv removeaccept 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:
Per-server scopes:
Examples:
- 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-oauthprevents automatic OAuth when the server returns401.- Tool and prompt arguments accept
key=value,key:=<json>, or a single JSON object argument. tools call --screenshotcaptures a widget screenshot when the tool declares a UI resource.resources subscribekeeps the process running until interrupted.
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:
Examples:
skills installis an alias forskills 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-appcan install skills during project creation unless--no-skillsis used.
generate-types
Purpose: Generate TypeScript module augmentation for MCP tool schemas.
Syntax:
Examples:
- The command writes
.mcp-use/tool-registry.d.ts. mcp-use devruns type generation automatically.mcp-use buildalso attempts type generation when it can find a server entry, but build-time generation failures are non-blocking.- Include
.mcp-use/**/*intsconfig.jsonso widget code can see generated types.
Environment variables
Examples: