Use this file to discover all available pages before exploring further.
The @mcp-use/cli is a build and development tool for creating MCP servers with integrated UI widgets. It provides commands for development, building, deployment, and authentication.
mcp-use dev hot-reloads tools, prompts, and resources without dropping connected clients.
--tunnel flag
mcp-use start --tunnel exposes your local server through a public URL for ChatGPT, Claude, and other remote clients.
skills add
Install mcp-use agent skills into Cursor, Claude Code, and Codex presets with one command.
generate-types
Auto-derive TypeScript types from your Zod tool schemas for fully-typed widget code.
client
mcp-use client drives MCP servers from the terminal with full OAuth support, plus client screenshot for headless widget capture in agent visual feedback loops.
When using create-mcp-use-app, the CLI is automatically installed as a
project dependency.
# Install globallynpm install -g @mcp-use/cli# Or use with npx (no installation needed)npx @mcp-use/cli dev# Install as project dependencynpm install --save-dev @mcp-use/cli
Start a development server with hot reload, automatic TypeScript compilation, and auto-opening inspector.
mcp-use dev [options]
What happens in dev mode:
TypeScript files are compiled in watch mode
UI widgets are built with hot reload
Server runs with automatic restart on changes
Inspector automatically opens at http://localhost:3000/inspector
MCP endpoint is available at http://localhost:3000/mcp
Options:
Option
Description
Default
-p, --path <path>
Project directory
Current directory
--port <port>
Server port
3000
--host <host>
Bind address; 0.0.0.0 listens on all interfaces
0.0.0.0
--mcp-dir <dir>
Folder holding the MCP entry + resources (e.g. src/mcp)
-
--entry <file>
Explicit server entry file
Auto-detected
--widgets-dir <dir>
Path to widgets directory
resources
--no-open
Don’t auto-open inspector
false
--no-hmr
Disable Hot Module Reloading
false
--tunnel
Expose the dev server through a public tunnel URL
false
Use --mcp-dir when your MCP server lives inside an existing project (e.g. a Next.js app).
With --mcp-dir src/mcp, the CLI looks for src/mcp/index.ts as the entry and
src/mcp/resources/ as the widgets directory.
Examples:
# Basic developmentmcp-use dev# Custom portmcp-use dev --port 8080# Disable inspector auto-openmcp-use dev --no-open# Disable HMR (uses tsx watch instead)mcp-use dev --no-hmr# Custom project pathmcp-use dev -p ./my-server# MCP server inside a Next.js appmcp-use dev --mcp-dir src/mcp# Share the dev server publicly (useful with ChatGPT/Claude remote MCP)mcp-use dev --tunnel
HMR is enabled by default in development mode. It allows you to modify tools, prompts, and resources without restarting the server or dropping client connections.What can be hot-reloaded:
Adding new tools, prompts, resources, or resource templates
Explicit server entry file (overrides the build manifest)
Auto-detected
--mcp-dir <dir>
Folder holding the MCP entry + resources (e.g. src/mcp)
-
--tunnel
Expose via tunnel
false
Examples:
# Start production servermcp-use start# Custom portmcp-use start --port 8080# Start with tunnel (exposes server publicly)mcp-use start --tunnel# Start specific projectmcp-use start -p ./my-server# Start MCP server inside a Next.js appmcp-use start --mcp-dir src/mcp
The start command looks for the server entry point in the build manifest
(dist/mcp-use.json). If not found, it falls back to checking
dist/index.js, dist/server.js, etc. When --mcp-dir is set, the
TypeScript source is run directly via tsx instead of expecting pre-built
.js files.
--tunnel creates a public URL via Manufact Cloud - ideal for testing with ChatGPT, Claude, or any remote MCP client before you deploy. The subdomain persists across restarts (stored in dist/mcp-use.json). See the Tunneling guide for rate limits, expiry, and the standalone npx @mcp-use/tunnel command.
Open deployment in browser after a successful deploy
false
--env <key=value>
Environment variable (repeatable)
-
--env-file <path>
Path to a .env file with environment variables
-
--new
Force creation of a new deployment (don’t reuse the project link)
false
--root-dir <path>
Root directory inside the repo to deploy from (for monorepos)
Repo root
--org <slug-or-id>
Deploy to a specific organization (by slug or ID)
Active org
-y, --yes
Skip confirmation prompts (for non-interactive / CI use)
false
--region <region>
Deploy region: US, EU, or APAC
US
--build-command <cmd>
Custom build command (overrides auto-detection)
Auto-detected
--start-command <cmd>
Custom start command (overrides auto-detection)
Auto-detected
Examples:
# Basic deploymentmcp-use deploy# Deploy with custom name and open in browsermcp-use deploy --name my-server --open# Deploy with environment variablesmcp-use deploy --env DATABASE_URL=postgres://... --env API_KEY=secret# Deploy with .env filemcp-use deploy --env-file .env.production# Python runtimemcp-use deploy --runtime python# Monorepo: deploy a subdirectorymcp-use deploy --root-dir apps/mcp-server# Force a brand-new deployment instead of reusing the linked onemcp-use deploy --new --name my-server-v2# Non-interactive deploy to a specific org and regionmcp-use deploy --org manufact-inc --region EU --yes
Deployment Process:
Checks if project is a GitHub repository
Prompts to install GitHub App if needed
Creates or links deployment project
Builds and deploys from GitHub
Returns deployment URLs (MCP endpoint and Inspector)
The deploy command automatically creates a .mcp-use/project.json file to
link your local project to the cloud deployment for stable URLs across
redeployments.
Starts an OAuth-style device code flow to authenticate with Manufact Cloud. Opens a browser window to complete authentication.Options:
--api-key <key> - Skip the browser flow and save an API key directly. Intended for CI/CD.
--org <slug|id|name> - Pick an organization up-front and skip the post-login prompt. Use this when running in agent harnesses or non-TTY environments where the interactive selection cannot be answered.
What happens:
CLI generates a device code
Opens browser to authentication page
Stores session token in ~/.mcp-use/config.json
If you have more than one organization and --org was not supplied, CLI prompts you to pick one. Without a TTY, the command fails with a message pointing at --org rather than hanging.
Manage which Manufact Cloud organization the CLI talks to. Every deploy, deployments, and servers call resolves against the active org unless --org overrides it.
mcp-use org list # List orgs you belong to (active marked with ←)mcp-use org current # Show the currently active orgmcp-use org switch # Interactive picker that updates ~/.mcp-use/config.json
For non-interactive flows (CI, agents), pass --org <slug|id|name> directly to login / deploy / servers ls / deployments ls instead of switching state up-front.
Values are masked by default — pass --show-values to reveal non-sensitive ones
env add
--env defaults to all three environments when omitted
env update
Use --no-sensitive to unmark a previously-sensitive var
env remove
Address the var by its UUID (find it via env list)
Use mcp-use servers ls to discover server IDs, then mcp-use deployments ls (or get <id>) to drill into individual deploys. The two commands are intentionally split: a server is a long-lived target; deployments are immutable builds against it.
mcp-use client is the interactive MCP client that lives inside the same binary as the build/deploy commands above. Use it to drive a running MCP server from the terminal — call tools, read resources, get prompts, run OAuth flows, or capture a PNG of a widget for an agent’s visual feedback loop.
# Save an MCP server under a short namemcp-use client connect <name> <url> # OAuth or --auth <token> for bearermcp-use client connect <name> "<cmd args>" --stdio# Per-server commands (every subcommand takes the name positional)mcp-use client <name> tools listmcp-use client <name> tools call <tool> [args...] [--screenshot]mcp-use client <name> resources listmcp-use client <name> prompts listmcp-use client <name> auth statusmcp-use client <name> screenshot --tool <name> [args...]mcp-use client <name> interactivemcp-use client <name> disconnect# Ad-hoc widget screenshot, no saved server neededmcp-use client screenshot --mcp <url> --tool <name> [args...]# Manage saved serversmcp-use client listmcp-use client remove <name>
Render the tool’s UI resource headlessly and write a PNG
Full Client CLI reference
Connect/list/remove, every scope, the arg-parsing rules, OAuth flows, ad-hoc vs. saved-server screenshot forms, --cdp-url for remote browsers, and storage layout. Read this if you’re using mcp-use client from your terminal or from an agent harness.
Location:<project>/dist/mcp-use.jsonCreated by:mcp-use buildPurpose: Stores metadata about the built server, including widget information, build details, and runtime configuration.Structure:
Location:<project>/.mcp-use/project.jsonCreated by:mcp-use deployPurpose: Links your local project to a cloud deployment, ensuring stable URLs across redeployments.Structure:
Location:<project>/.mcp-use/sessions.jsonCreated by:mcp-use dev (automatically)Purpose: Persists session metadata during development to survive hot reloads and server restarts.Structure:
How it works:The CLI introspects your server’s tool registrations and converts Zod schemas to TypeScript type strings. The generated file uses TypeScript’s module augmentation to add types to the ToolRegistry interface, which useCallTool uses for automatic type inference.