Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.agentfront.dev/llms.txt

Use this file to discover all available pages before exploring further.

The frontmcp CLI provides commands for development, process management, and package management. Install it globally or use via npx.
frontmcp <command> [options]

Development Commands

Commands for building, testing, and debugging your FrontMCP server.
CommandDescription
devStart in development mode (tsx —watch + async type-check)
buildCompile entry with TypeScript (tsc)
build --target nodeBuild distributable executable bundle (esbuild)
build --target cliBuild CLI executable with subcommands per tool
build --target mcpbPackage server as an .mcpb archive for MCPB-aware clients
mcpb validate <path>Validate a .mcpb archive against the MCPB v0.3 spec
testRun E2E tests with auto-injected Jest configuration
initCreate or fix a tsconfig.json suitable for FrontMCP
doctorCheck Node/npm versions and tsconfig requirements. Use --fix to auto-repair (installs missing deps, creates app directories)
inspectorLaunch MCP Inspector (npx @modelcontextprotocol/inspector)
create [name]Scaffold a new FrontMCP project (interactive if name omitted)
socket <entry>Start Unix socket daemon for local MCP server

Process Manager Commands

Manage long-running MCP servers with automatic supervision, restart policies, and logging.
CommandDescription
start <name>Start a named MCP server with supervisor
stop <name>Stop a managed server (graceful by default)
restart <name>Restart a managed server
status [name]Show process status (detail if name given, table if omitted)
listList all managed processes
logs <name>Tail log output for a managed server
service <action> [name]Install/uninstall systemd/launchd service (optional service name)

Package Manager Commands

Install, configure, and manage MCP apps from npm, local paths, or git repositories.
CommandDescription
install <source>Install an MCP app from npm, local path, or git
uninstall <name>Remove an installed MCP app
configure <name>Re-run setup questionnaire for an installed app
esm-update [app-name]Check and apply ESM package updates

ESM Update Options

OptionDescription
--check-onlyOnly check for updates, don’t apply them
--allUpdate all ESM-installed apps
# Check all ESM apps for updates
frontmcp package esm-update --all --check-only

# Apply updates for a specific app
frontmcp package esm-update my-esm-app

# Apply all pending updates
frontmcp package esm-update --all
See ESM Packages for full documentation on ESM dynamic loading.

Options Reference

General Options

OptionDescription
-h, --helpShow help message
-o, --out-dir <dir>Output directory (default: ./dist)
-e, --entry <path>Manually specify entry file path

Build Options

OptionDescription
--target <target>Build target: node, cli, sdk, browser, vercel, lambda, cloudflare, distributed, mcpb
--jsEmit plain JavaScript bundle instead of SEA (use with --target cli)
--seaAlso build a single-executable binary for the host platform (use with --target mcpb)
--merge-from <dir>Merge cross-platform SEA binaries from {dir}/{platform}/{name} (use with --target mcpb)
--icon <path>Override the icon path included in the archive (use with --target mcpb)
--no-deterministicDisable deterministic archive output (use with --target mcpb)
--stage-onlyLeave the MCPB staging directory intact and skip zipping (use with --target mcpb)

Start Options

OptionDescription
-e, --entry <path>Entry file for the server
-p, --port <N>Port number for the server
-s, --socket <path>Unix socket path
--db <path>SQLite database path
--max-restarts <N>Maximum auto-restart attempts (default: 5)

Stop Options

OptionDescription
-f, --forceForce kill (SIGKILL instead of SIGTERM)

Logs Options

OptionDescription
-F, --followFollow log output (like tail -f)
-n, --lines <N>Number of lines to show (default: 50)

Install Options

OptionDescription
--registry <url>npm registry URL for private packages
-y, --yesSilent mode (use defaults, skip questionnaire)
-p, --port <N>Override default port

Create Options

OptionDescription
-y, --yesUse defaults (non-interactive mode)
--target <target>Deployment target: node, vercel, lambda, cloudflare
--redis <setup>Redis setup: docker, existing, none (node target only)
--pm <pm>Package manager: npm, yarn, pnpm
--cicdEnable GitHub Actions CI/CD
--no-cicdDisable GitHub Actions CI/CD
--nxScaffold an Nx monorepo workspace
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

OptionDescription
-s, --socket <path>Unix socket path (default: ~/.frontmcp/sockets/{app}.sock)
--db <path>SQLite database path for persistence
-b, --backgroundRun as background daemon (detached process)

Test Options

OptionDescription
-i, --runInBandRun tests sequentially (recommended for E2E)
-w, --watchRun tests in watch mode
-v, --verboseShow verbose test output
-t, --timeout <ms>Set test timeout (default: 60000ms)
-c, --coverageCollect test coverage

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

frontmcp build --target cli
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

OptionDescriptionDefault
--output <mode>Output format: text or jsontext
-h, --helpShow grouped help (Tools, Resources, Auth, etc)
-V, --versionPrint version

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:
# Pass an object-typed parameter as JSON
./myapp create-user --profile '{"name":"Alice","role":"admin"}'
Resources & Promptsresource list, resource read <uri>, template list, template <name>, prompt list, prompt <name>. Authlogin, logout, sessions list, sessions switch <name>, connect --token <TOKEN>. Subscriptionssubscribe resource <uri>, subscribe notification <name>. Systemserve, daemon start|stop|status|logs, doctor, install, uninstall.

Example Session

# View all available commands grouped by category
./myapp --help

# Run a tool subcommand
./myapp search-users --query "alice" --limit 10

# List and read resources
./myapp resource list
./myapp resource read "file://config.json"

# Read a resource template with parameters
./myapp template user-profile --user-id 42

# OAuth login and session management
./myapp login --server https://auth.example.com
./myapp sessions list
./myapp sessions switch production

# Stream resource updates
./myapp subscribe resource "file://config.json"

# JSON output mode
./myapp search-users --query "alice" --output json

Configuration

Control the generated CLI via the cli block in frontmcp.config.js:
module.exports = {
  name: 'myapp',
  cli: {
    enabled: true,
    outputDefault: 'text',
    authRequired: false,
    description: 'My MCP CLI',
    excludeTools: [],
    oauth: {
      serverUrl: 'https://auth.example.com',
      clientId: 'my-app',
      defaultScope: 'read write',
      portRange: [17830, 17850],
      timeout: 120000,
    },
  },
};

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

# Start dev server with hot-reload
frontmcp dev

# Build to custom output directory
frontmcp build --out-dir build

# Build distributable executable
frontmcp build --target node

# Build CLI executable with subcommands per tool
frontmcp build --target cli

# Run E2E tests sequentially
frontmcp test --runInBand

# Initialize tsconfig
frontmcp init

# Check environment
frontmcp doctor

# Launch MCP Inspector
frontmcp inspector

Project Scaffolding

# Interactive mode
npx frontmcp create

# Use defaults (non-interactive)
npx frontmcp create my-mcp --yes

# Target Vercel deployment
npx frontmcp create my-mcp --target vercel

# Scaffold an Nx monorepo workspace
npx frontmcp create my-workspace --nx

Unix Socket

# Start socket server
frontmcp socket ./src/main.ts --socket /tmp/my-app.sock

# Start with SQLite persistence
frontmcp socket ./src/main.ts --socket /tmp/my-app.sock --db ~/.frontmcp/data/app.sqlite

Process Management

# Start a named server
frontmcp start my-app --entry ./src/main.ts --port 3005

# Stop a server
frontmcp stop my-app

# Tail logs
frontmcp logs my-app --follow

# Install as system service
frontmcp service install my-app

Package Management

# Install from npm (private registry)
frontmcp install @company/my-mcp --registry https://npm.company.com

# Install from local path
frontmcp install ./my-local-app

# Install from GitHub
frontmcp install github:user/repo

# Re-configure an installed app
frontmcp configure my-app

# Uninstall
frontmcp uninstall my-app