mcp-use package installs the mcp-use executable and includes the prebuilt @mcp-use/cli implementation. Use this page as the exhaustive command reference for local development, production builds, cloud deploys, saved MCP client sessions, 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, view 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, and handles OAuth.Tunnels
mcp-use dev --tunnel exposes a local server through a public URL.Typecheck
mcp-use typecheck refreshes MCP view types and runs the project’s own
TypeScript compiler.Install the CLI
Most projects install the framework, CLI, and Inspector together:dev
Purpose: Start a development server with TypeScript watching, view builds, automatic reloads, and the Inspector.
Syntax:
Examples:
- The MCP endpoint is served at
/mcp. - Address precedence is
--port/--host, thenPORT/HOST, then the defaults.devdoes not import the server until after its listener is chosen, so it cannot use a server-configured address. - The Inspector supplied by
mcp-useis mounted at/mcp/inspectorand opens automatically unless--no-openis set. - Inspector UI, proxy, and OAuth routes remain local-only. A public tunnel exposes the MCP endpoint but returns
404for/mcp/inspector. - The command sets
NODE_ENV=developmentwhen it is not already set and setsPORTto the chosen listener port before importing the entry. - When
MCP_URLis unset and the listener binds a loopback host, the command setsMCP_URLtohttp://localhost:<port>only while it imports the entry, so module-scope OAuth configuration sees the local origin. Request handlers and tool code do not see this value. With--tunnel, the command still sets this local value and does not replace it with the public tunnel URL. - Source changes reload the exported server without dropping the long-lived HTTP listener. View modules use Vite HMR when views exist at startup.
- Adding the first view to a project that started with none requires restarting
mcp-use dev. mcp-use devkeeps its Vite cache in.mcp-use/cache/and the tunnel subdomain in.mcp-use/state/tunnel.json.- See Tunneling reference for the lifecycle and limits of
--tunnel.
typecheck
Purpose: Refresh the managed mcp-env.d.ts declaration for the discovered server entry, then run the project’s installed TypeScript compiler with --noEmit.
Syntax:
--path, --entry, and --mcp-dir with the same meanings as dev and build. Arguments after -- are forwarded to TypeScript:
mcp-env.d.ts is scaffolded into new projects, so editors and plain tsc --noEmit work before the first CLI run. The command refreshes declarations carrying an mcp-use generated header when the entry changes and never overwrites a user-owned declaration. TypeScript must be installed in the selected project.
build
Purpose: Build the exported MCP server and its views into .mcp-use/build/.
Syntax:
Examples:
- The command bundles the default-exported server as
.mcp-use/build/index.jsand writes.mcp-use/build/manifest.json. - Each
views/<name>/view.tsxbuilds to hashed external assets under.mcp-use/build/views/<name>/by default. - Pass
--inlineto embed each view’s bundled JavaScript and CSS directly in the HTML returned byresources/read. There is no--no-inline; omit--inlineto use external assets. - The build is transpile-only. Run
mcp-use typecheckas a separate project script when type checking is required. - TypeScript path aliases come from the selected project’s
tsconfig.json. - If
MCP_ASSETS_URLis set for an external build, view paths are rewritten to that asset origin using the server’sbasePath. Inline view bundles are not rewritten. - The selected project’s
public/directory is copied to.mcp-use/build/views/public/.
start
Purpose: Run the production server previously written to .mcp-use/build/.
Syntax:
Examples:
- Address precedence is CLI flag, environment variable, server configuration, then default:
--port→PORT→config.port→3000, and--host→HOST→config.host→127.0.0.1. --tunnelstarts the tunnel only after the production server binds. The command prints the public MCP URL and closes the tunnel when the process shuts down.- The command requires
.mcp-use/build/manifest.json; runmcp-use buildfirst. - It imports the manifest’s built
entryPointand requires that module to default-export anMCPServer. startdoes not rediscover source entries or views.--entry,--mcp-dir, and--views-dirbelong todevandbuild.- The command sets
NODE_ENV=productionwhen it is not already defined and loads the selected project’s production.envvalues before importing the built entry. - The build manifest never records Inspector state.
--with-inspectoris a runtime-only opt-in that mounts the Inspector on the same listener; it does not rebuild or alter.mcp-use/build. - The Inspector can call tools and proxy OAuth flows. Keep
--with-inspectorbehind access controls when serving beyond localhost.
Tunneling reference
mcp-use dev --tunnel and mcp-use start --tunnel create a public URL that forwards to the local MCP server.
The standalone package is also available:
Cloud command conventions
Manufact Cloud commands work with any MCP framework. With--json, stdout
contains one JSON result or an error envelope:
--help for its complete flag list.
Cloud credentials live in ~/.manufact/auth.json (mode 0600). Project links live
in .manufact/project.json. Server selection is --server, MANUFACT_SERVER,
then the project link. Organization selection is --org, MANUFACT_ORG, the
project link, the active organization, then the account default.
Authentication commands
login
Sign in to Manufact Cloud.
--api-key uses an existing key; --device-code completes an approved device flow. They are mutually exclusive. --no-open leaves browser navigation to you.
In a terminal, login opens the verification URL and waits. Without a terminal or with --json, it prints the device code and exits. Approve it in a browser, then run the returned completion command. Device login creates a named key. Credentials are stored in ~/.manufact/auth.json with mode 0600.
logout
Remove the local credential and revoke the key created by device login.
--yes to confirm non-interactively. --json emits the result.
An existing key supplied by the user is removed locally without revoking that shared key remotely.
whoami
Show the signed-in account, active organization, credential source, and key name.
MANUFACT_TOKEN overrides stored credentials; MCP_USE_API_KEY is the fallback.
Projects commands
link
Link a project directory to a Cloud server.
.manufact/project.json and adds .manufact/ to the project ignore rules. This works for projects using any MCP framework. Without a terminal, supply a server or an existing link.
unlink
Remove the local project link.
deploy
deploy
Deploy from GitHub, upload local source, or register an already-hosted MCP URL.
--no-github uploads local source. --external-url <url> registers a hosted endpoint. --new creates another server. Use --name, --branch, --root-dir, --build-command, --start-command, --dockerfile, and --region as needed. Repeat --env KEY=VALUE or use --env-file <path>. --no-wait returns early; --open opens the dashboard from a terminal.
Deployment waits by default. A project link is stored in .manufact/project.json. Cloud deployment works with any MCP framework. Deploy-time variables use production scope on the saved production branch, otherwise a preview override for the deployed branch.
Organization commands
org list
List your organizations.
org current
Show the active organization.
org use
Save the active organization.
org create
Create an organization.
org update
Update the selected organization.
org members
List organization members.
org invites list
List organization invitations.
org invites send
Invite a member to the organization.
org invites cancel
Cancel a pending invitation.
Servers commands
servers list
List accessible Cloud servers.
servers get
Inspect a server.
servers update
Change server and repository settings.
--name, --description, --branch, --root-dir, --build-command, --start-command, --watch-paths, --deploy-branches, --wait-for-ci / --no-wait-for-ci, --repo <owner/name>, --disconnect-repo, and --allow-ip <cidr> configure supported settings.
servers rm
Remove a Cloud server.
Environment commands
env list
List environment keys and metadata.
--environment production|preview|development selects scope; --branch selects a preview override. Set/push support --phase runtime|build|both. Use env set --help for passing a secret through stdin with --sensitive.
Values are write-only. Listing returns keys and metadata. A branch-specific override can shadow the shared preview value.
env set
Create or update environment variables.
--environment production|preview|development selects scope; --branch selects a preview override. Set/push support --phase runtime|build|both. Use env set --help for passing a secret through stdin with --sensitive.
Values are write-only. Listing returns keys and metadata. A branch-specific override can shadow the shared preview value.
env rm
Remove an environment variable.
--environment production|preview|development selects scope; --branch selects a preview override. Set/push support --phase runtime|build|both. Use env set --help for passing a secret through stdin with --sensitive.
Values are write-only. Listing returns keys and metadata. A branch-specific override can shadow the shared preview value.
env push
Apply variables from an environment file.
--environment production|preview|development selects scope; --branch selects a preview override. Set/push support --phase runtime|build|both. Use env set --help for passing a secret through stdin with --sensitive.
Values are write-only. Listing returns keys and metadata. A branch-specific override can shadow the shared preview value.
Deployments commands
deployments list
List deployments.
deployments get
Inspect one deployment.
deployments restart
Start a replacement deployment.
deployments promote
Promote a deployment to production.
deployments stop
Stop a deployment.
deployments rm
Remove a deployment.
logs
Read runtime or build logs.
--build selects build output; --follow follows updates. Runtime logs support a time window and line limit. Runtime following continues until interrupted; build following ends at a terminal status. With --json, output is emitted when following ends.
Use the deployment ID returned by deploy to inspect a failed build. When omitting it, select the server through its project link or --server.
Domains commands
domains get
Inspect server domain and DNS details.
domains set-subdomain
Choose a hosted subdomain.
domains add
Attach a custom domain.
domains add at your DNS provider, then verify the domain.
domains verify
Verify a domain DNS record.
domains add at your DNS provider, then verify the domain.
domains rm
Remove a custom domain.
GitHub commands
github connect
Get the GitHub App installation URL.
github installations
List available GitHub App installations.
github repos
List repositories accessible to the GitHub App.
Checklist commands
checklist run
Run the publishing checklist for a server.
--no-wait, then inspect it with checklist get. A completed check does not publish the server.
checklist list
List publishing checklist runs.
checklist get
Inspect a publishing checklist run.
checklist cancel
Cancel a checklist run.
Alerts commands
alerts list
List server alert rules.
alerts get
Inspect an alert rule.
alerts create
Create an alert from dashboard-format YAML.
alerts options lists current metrics.
alerts update
Update an alert from dashboard-format YAML.
alerts options lists current metrics.
alerts rm
Remove an alert rule.
alerts options
List available alert metrics and limits.
alerts options lists current metrics.
Analytics commands
Query a deployed MCP server’s analytics through Manufact Cloud using the existing CLI login. Both commands accept--server <id-or-slug>, --org,
--path, and --json. Server selection uses --server, then MANUFACT_SERVER,
then the project link. No PostHog credentials are needed.
analytics catalog
Read the live ClickHouse schema before constructing a query:
--json emits one compact
JSON document.
analytics query
Run one read-only ClickHouse SELECT or UNION over catalog relations:
Pass exactly one quoted SQL argument, up to 16384 UTF-8 bytes. For SQL starting
with a dash, place flags before a literal delimiter:
--time-range; both dates are required and the start must
precede the end. They bind {from:DateTime64(3)} and {to:DateTime64(3)}.
Include predicates in SQL using the catalog relation’s time column (time for
raw events, bucket for rollups). For example, query one complete UTC day:
queryId, columns, positional rows, truncated,
statistics, and meta, including retention and freshness. Pair row values
with columns in order and preserve 64-bit integer strings. Human output shows
a table plus query metadata and a truncation notice when applicable. Empty
results describe matching retained data, not all historical activity.
Exit codes are 0 for success/help, 1 for operational failures, and 2 for invalid
arguments. JSON errors use the standard error.code, error.message, and
error.nextSteps shape. Analytics-specific API codes are retained, including
ANALYTICS_SQL_REJECTED, ANALYTICS_QUERY_BUDGET, and ANALYTICS_UNAVAILABLE;
authentication and network errors use the existing Cloud CLI codes. Query SQL
and scope values are excluded from passive command telemetry.
Install the version-matched manufact-analytics skill with mcp-use skills install for catalog discovery, SQL aggregation, and result interpretation.
Feedback commands
feedback send
Send feedback about the CLI to Manufact through the SDK’s PostHog project. No
Cloud login or linked server is required.
--json for one JSON result and -h/--help for offline help.
For dash-leading text, use mcp-use feedback send -- '--json output is missing'.
Place output options before --, e.g. feedback send --json -- '--help is unclear'.
Only the supplied message, report ID, random installation ID,
CLI version, OS, architecture, Node version, and CI/terminal indicators are
sent. Files, logs, credentials, account details, and conversations are not
collected. Review the message and omit secrets or personal data.
This explicit action works even with MCP_USE_ANONYMIZED_TELEMETRY=false,
DO_NOT_TRACK=1, or NODE_ENV=test. It reuses the anonymous usage installation
ID; if storage is unavailable, it uses a temporary random ID. Feedback events
(mcp_use_cli_feedback) are separate from passive usage events
(mcp_use_cli_command), which never include report text.
Exit 0 and { "accepted": true, "reportId": "<uuid>" } mean the capture endpoint
accepted the request. They do not confirm downstream ingestion or human review.
The request times out after 10 seconds and is not automatically retried. Exit 1
returns feedback_rejected for HTTP errors, feedback_network_error for network
failures, or feedback_timeout. Network failures and timeouts leave acceptance
unknown; check connectivity before retrying. Invalid input exits 2 with
usage_error. Without --json, success prints a receipt and failures go to stderr.
Agent skills commands
skills install
Install version-matched coding-agent guidance, including the Cloud CLI and
manufact-analytics skills.
.cursor/skills, .claude/skills, and .agents/skills. The skills are bundled with the CLI and work offline. skills add remains an alias. Other project skills are preserved.
Destructive removals and deployment promotion/stopping require --yes without a terminal.
client
Purpose: Save HTTP MCP server connections, call tools, read resources, get prompts, and manage OAuth credentials from the terminal.
Syntax:
Per-server scopes:
Every action in this table accepts
--json except where the top-level table does not advertise it.
Examples:
- Saved server metadata is stored in
~/.mcp-use/client/servers.json. Credentials are stored separately under~/.mcp-use/client/credentials/. - In an interactive TTY, OAuth displays
This server requires OAuth. Press Enter to open your browser.and opens the browser only after Enter. - When protected-resource metadata identifies mixed auth,
connectsucceeds anonymously, reports that public tools are available, and suggestsmcp-use client <name> auth login. The JSON connection result includesauthorizationmetadata. auth loginstarts OAuth for an already-saved server; otherwise the first wire-level OAuth challenge can start the flow later and the CLI retries that operation once.--no-openand non-TTY human output never prompt or open a browser; they print a state-free local launcher URL while the loopback callback continues waiting. The local route redirects to the provider without exposing OAuth state in terminal output.--jsonnever opens a browser or prints an OAuth URL or state. If fresh consent is required, it exits1withoauth_interaction_requiredand an interactive retry command inerror.details.nextSteps.connect --no-oauthprevents automatic OAuth when the server returns401.--protocol autoprefers the modern wire and falls back to legacy.legacyselects only the legacy wire.modernselects the stateless, sessionless modern wire with no fallback.- Repeated
-H, --header <"Key: Value">options store static headers as credentials. - Tool and prompt arguments accept
key=value,key:=<json>, or a single JSON object argument. --jsonmay appear anywhere afterclient. Success emits exactly one JSON value to stdout. Errors emit exactly one JSON error envelope to stderr and no stdout value.- Calls, resource reads, and prompt gets emit raw MCP result envelopes. Lists emit arrays, and
tools describeemits one tool object. - Tool
isErrorresults exit1and retain the original protocol result inerror.detailsunder--json; they and auth-like error text are not interpreted as OAuth challenges.
CLI Client guide
Use the guide for connection workflows, OAuth behavior, argument parsing
examples, and scripting patterns.
screenshot
Purpose: Call a view-backed MCP tool and capture its rendered MCP App as a PNG.
Syntax:
key=value / key:=<json> pairs.
Source options:
Capture options:
Examples:
Environment variables
Examples: