Skip to main content

create

Create a new LeanMCP project with Streamable HTTP transport.
leanmcp create <projectName> [options]

Arguments

projectName
string
required
Name of the project to create

Options

--allow-all
boolean
default:"false"
Skip interactive confirmations and assume Yes
--no-dashboard
boolean
default:"false"
Disable dashboard UI at / and /mcp GET endpoints
-i, --install
boolean
default:"false"
Install dependencies automatically (non-interactive, no dev server)
--no-install
boolean
default:"false"
Skip dependency installation (non-interactive)
--python
boolean
default:"false"
Create a Python MCP project instead of TypeScript

Examples

# Create new TypeScript project (interactive)
leanmcp create my-app

# Create new Python project
leanmcp create my-app --python

# Create and install deps (non-interactive)
leanmcp create my-app -i

# Create without installing deps
leanmcp create my-app --no-install

dev

Start development server with UI hot-reload (builds @UIApp components).
leanmcp dev

Behavior

  • Scans for @UIApp components in the project
  • Builds UI components with Vite
  • Starts tsx watch main.ts for hot-reload
  • Watches mcp/**/* for changes and rebuilds components automatically

build

Build UI components and compile TypeScript for production.
leanmcp build

Steps

  1. Scans for @UIApp components
  2. Builds UI components with Vite (production mode)
  3. Compiles TypeScript with tsc
  4. Generates schema metadata

start

Build UI components and start production server.
leanmcp start

Behavior

  • Runs the build process (UI + TypeScript)
  • Starts the production server with node dist/main.js

login

Authenticate with LeanMCP cloud using an API key.
leanmcp login

Behavior


logout

Remove stored API key and logout from LeanMCP cloud.
leanmcp logout

whoami

Show current authentication status and account info.
leanmcp whoami

Response Fields

displayName
string
User’s display name
email
string
User’s email address
username
string
User’s username
userTier
string
Account tier (e.g., ‘free’, ‘pro’)

deploy

Deploy an MCP server to LeanMCP cloud.
leanmcp deploy [folder] [options]

Arguments

folder
string
default:"."
Path to the project folder to deploy

Options

-s, --subdomain
string
Subdomain for deployment (e.g., ‘my-app’ → my-app.leanmcp.app)
-y, --yes
boolean
default:"false"
Skip confirmation prompts

Examples

# Deploy current directory
leanmcp deploy

# Deploy with custom subdomain
leanmcp deploy . --subdomain my-api

# Deploy with auto-confirm
leanmcp deploy . -y

add

Add a new MCP service to your project.
leanmcp add <serviceName>

Arguments

serviceName
string
required
Name of the service to create

Behavior

  • Creates mcp/<serviceName>/index.ts with example tool, prompt, and resource
  • Service is auto-discovered on next server start

Example

leanmcp add weather
# Creates mcp/weather/index.ts

projects

Manage LeanMCP cloud projects.

list

List all your deployed projects.
leanmcp projects list
leanmcp projects ls  # alias

get

Get details of a specific project.
leanmcp projects get <projectId>
projectId
string
required
ID of the project to retrieve

delete

Delete a project.
leanmcp projects delete <projectId> [options]
leanmcp projects rm <projectId> [options]  # alias
projectId
string
required
ID of the project to delete
-f, --force
boolean
default:"false"
Skip confirmation prompt

env

Manage environment variables for deployed projects.

list

List all environment variables.
leanmcp env list [folder] [options]
leanmcp env ls [folder] [options]  # alias
folder
string
default:"."
Project folder path
--reveal
boolean
default:"false"
Show actual values instead of masked
--project-id
string
Specify project ID directly

set

Set an environment variable.
leanmcp env set <keyValue> [folder] [options]
keyValue
string
required
Environment variable in KEY=VALUE format
folder
string
default:"."
Project folder path
-f, --file
string
Load from env file instead of single key-value
--force
boolean
default:"false"
Skip confirmation for reserved keys

Examples

# Set a single variable
leanmcp env set API_KEY=secret123

# Load from file
leanmcp env set --file .env.production

get

Get an environment variable value.
leanmcp env get <key> [folder] [options]
key
string
required
Environment variable key
--reveal
boolean
default:"false"
Show actual value

remove

Remove an environment variable.
leanmcp env remove <key> [folder] [options]
leanmcp env rm <key> [folder] [options]  # alias
key
string
required
Environment variable key to remove
--force
boolean
default:"false"
Skip confirmation

pull

Download environment variables to local .env file.
leanmcp env pull [folder] [options]
-f, --file
string
default:".env.remote"
Output file path

push

Upload environment variables from local .env file (replaces all).
leanmcp env push [folder] [options]
-f, --file
string
default:".env"
Input file path
--force
boolean
default:"false"
Skip confirmation

send-feedback

Send feedback to the LeanMCP team.
leanmcp send-feedback [message] [options]
message
string
Feedback message
--anon
boolean
default:"false"
Send feedback anonymously
--include-logs
boolean
default:"false"
Include local log files with feedback

Global Options

These options are available for all commands:
-v, --version
boolean
Output the current version
-h, --help
boolean
Display help for command
-d, --debug
boolean
Enable debug logging for all commands

Build docs developers (and LLMs) love