What is the LeanMCP CLI?
The LeanMCP CLI is a command-line interface that streamlines the entire MCP server development workflow from project creation to production deployment. Key capabilities:- Quick project scaffolding with production-ready templates
- Hot-reload development server with UI component building
- One-command cloud deployment to LeanMCP platform
- Interactive setup with guided prompts
- Project management and environment variable handling
Installation
- Node.js >= 18.0.0
- npm >= 9.0.0
Quick Start
Generated Project Structure
The CLI creates a clean, production-ready structure:Available Commands
Local Development
| Command | Description |
|---|---|
leanmcp create <name> | Create a new MCP server project |
leanmcp add <service> | Add a new service to existing project |
leanmcp dev | Start development server with hot-reload |
leanmcp build | Build UI components and compile TypeScript |
leanmcp start | Build and start production server |
Cloud Deployment
| Command | Description |
|---|---|
leanmcp login | Authenticate with LeanMCP Cloud |
leanmcp logout | Remove stored API key |
leanmcp whoami | Show authentication status |
leanmcp deploy [folder] | Deploy to LeanMCP Cloud |
Project Management
| Command | Description |
|---|---|
leanmcp projects list | List your cloud projects |
leanmcp projects get <id> | Get project details |
leanmcp projects delete <id> | Delete a cloud project |
Environment Variables
| Command | Description |
|---|---|
leanmcp env list [folder] | List environment variables |
leanmcp env set <key=value> | Set an environment variable |
leanmcp env get <key> | Get environment variable value |
leanmcp env remove <key> | Remove environment variable |
leanmcp env pull [folder] | Download variables to local file |
leanmcp env push [folder] | Upload variables from local file |
NPM Scripts
Generated projects include helpful npm scripts:Configuration
Port Configuration
Set the port in your.env file:
.env
TypeScript Configuration
Generatedtsconfig.json:
Global Options
Available for all commands:Next Steps
Create Command
Learn about creating new projects with interactive setup
Add Service
Add new services to existing projects
Dev Commands
Development, build, and start commands
Deploy
Deploy to LeanMCP Cloud