Skip to main content
The frontmcp CLI provides commands for development, process management, and package management. Install it globally or use via npx.

Development Commands

Commands for building, testing, and debugging your FrontMCP server.

Process Manager Commands

Manage long-running MCP servers with automatic supervision, restart policies, and logging. An app registered by frontmcp install starts by name (frontmcp start my-app) from its install directory, using the installed bundle, the .env the installer wrote and the port chosen at install time. Pass --entry to run a different file instead.

Package Manager Commands

Install, configure, and manage MCP apps from npm, local paths, or git repositories. install accepts a project directory, its dist/ folder or a per-target folder such as dist/node (the manifest is searched in all of them; a directory holding a frontmcp.config.* is installed after npm install when it has no node_modules). It installs the runtime packages the bundle keeps external (for example @frontmcp/sdk) at the versions the project depends on, plus any native addons the manifest lists.

Plugin Commands (issue #411)

Emit the current FrontMCP server as a plugin for an AI tool. Today supports Claude Code (.claude/plugins/<name>/) and Codex (~/.codex/config.toml). Flags shared across the three subcommands: End-user path (built bin): every CLI built with frontmcp build --target cli inherits install -p claude|codex AND uninstall -p claude|codex. Pass -p (repeatable) plus the same scope flags above to get the same plugin emit (or removal) from the installed binary — the bin reads its sibling bin-meta.json and _skills/ tree, no SDK boot or schema extraction required at install time.
SKILL.md frontmatter is synthesized from @Skill metadata. When a server ships @Skill({ name, description, tags, license, instructions: { file } }) entries, the install flow composes proper YAML frontmatter from the decorator fields (so Claude Code’s filesystem loader can index the skill) and copies the instruction file body verbatim. If the source body already starts with a --- frontmatter block, it is preserved as-is — the user’s authoring is treated as authoritative.

Options Reference

General Options

Build Options

Output directory is cleared on every build

frontmcp build removes the target’s output directory before compiling, so dist/<target>/ only ever contains what the current source set emits. Deleting a source file therefore also removes its compiled output, and a local build matches what CI produces from a clean checkout. Pass --no-clean to keep the previous contents (useful for incremental workflows). Cleaning is skipped automatically — with a warning — when the resolved output directory is the project root, a parent of it, or outside the project entirely, so a stray outDir can never delete your sources.

TypeScript is run from the project, not through npx

The compiler is resolved from the project’s own typescript install and spawned with the current Node binary, so the project’s module resolver stays active. This matters for Yarn Plug’n’Play, where a bare npx tsc starts a process without .pnp.cjs and every entry in compilerOptions.types fails to resolve (TS2688). When the project has no local typescript, the build falls back to the package manager’s own runner (yarn tsc, pnpm exec tsc, bun x tsc, npx -y tsc) selected from the lockfile.

Start Options

Stop Options

Logs Options

Install Options

Create Options

The create command automatically initializes a git repository and creates an initial commit after scaffolding. If git is not installed, this step is silently skipped.

Socket Options

Test Options

.env is loaded, exactly as frontmcp dev loads it

frontmcp test reads .env and .env.local into the environment before spawning Jest, so a spec reading process.env.MY_API_KEY sees the same value the dev server does. Precedence matches dev: the real environment wins over the files, so CI secrets still override a local .env, and config overlays (env.shared + env.test in frontmcp.config.*) sit underneath both. Pass --no-env for a hermetic run that must not see local credentials.

Generated Executable CLI

When you build with --target cli, the output is a self-contained executable whose commands are auto-generated from your MCP server’s tools, resources, prompts, and templates.

Building

This produces a self-contained executable in dist/ that can be distributed and run directly. Use --js to emit a plain JavaScript bundle instead.

Global Options

Command Groups

The generated CLI organizes commands into five groups: Tools — Each MCP tool becomes a kebab-case subcommand. Flags are derived from the tool’s input schema. Object-typed parameters accept JSON strings:
Resources & Prompts — resource list, resource read <uri>, template list, template <name>, prompt list, prompt <name>. Auth — login, logout, sessions list, sessions switch <name>, connect --token <TOKEN>. Subscriptions — subscribe resource <uri>, subscribe notification <name>. System — serve, daemon start|stop|status|logs, doctor, install, uninstall.

Example Session

Configuration

Control the generated CLI via the cli block on the cli deployment in frontmcp.config.js:

Tool Name Conflicts

If a tool name collides with a built-in command (login, logout, serve, connect, doctor, install, uninstall, resource, template, prompt, subscribe, sessions, daemon, job, skills), the tool subcommand is automatically suffixed with -tool (e.g., login-tool).

Examples

Development

Project Scaffolding

Unix Socket

Process Management

Package Management