Overview
Theleanmcp create command scaffolds a new MCP server project with production-ready templates and optional interactive setup.
Basic Usage
Interactive prompts
You’ll be asked:
- Would you like to install dependencies now? (yes/no)
- Would you like to start the development server? (yes/no)
Options
--allow-all
Skip all interactive confirmations and assume “Yes”:
- Create the project
- Install dependencies automatically
- Start the development server
--no-dashboard
Disable the dashboard UI at / and /mcp GET endpoints:
main.ts will include:
-i, --install
Install dependencies automatically without starting the dev server:
--no-install
Skip dependency installation entirely:
npm install manually later.
--python
Create a Python MCP project instead of TypeScript:
Python projects require manual virtual environment setup:
Generated Project Structure
TypeScript Project
Python Project
Example: Generated Files
main.ts (TypeScript)
mcp/example/index.ts
package.json
Common Workflows
Create and Start Immediately
- Creates the project
- Installs dependencies
- Starts the dev server
Create Without Dependencies
Create Python Project
Terminal Output
Error Handling
Project Already Exists
Invalid Project Name
Project names should follow npm naming conventions:- Lowercase letters, numbers, hyphens, underscores
- No spaces or special characters
Next Steps
Add Service
Add new services to your project
Dev Commands
Start developing with hot-reload
Deploy
Deploy to LeanMCP Cloud
Core Package
Learn about @leanmcp/core decorators