🚀 Quickly scaffold MCP (Model Context Protocol) projects with a single command!
mcp-gen
is a CLI tool that helps you quickly create new MCP projects by copying a pre-configured template with all the necessary files and dependencies.
- ✨ Quick Setup: Generate a complete MCP project structure in seconds
- 🎯 Interactive CLI: Uses Clack.js for a beautiful, user-friendly interface
- 📁 Flexible Location: Choose where to create your project
- 🔧 Auto-install: Optionally install dependencies automatically
- 📝 Template-based: Based on a proven MCP project structure
- 🎨 Modern Stack: TypeScript, ES modules, and latest MCP SDK
npm install -g @meta-boltz/mcp-gen
Or use it directly with npx (recommended):
npx -y @meta-boltz/mcp-gen
npx -y @meta-boltz/mcp-gen
This will start an interactive CLI that asks you:
- MCP Project Name: What to name your MCP project (e.g.,
cool-mcp
) - Target Directory: Where to create the project (e.g.,
./my-mcp-project
) - Install Dependencies: Whether to run
npm install
automatically
$ npx -y @meta-boltz/mcp-gen
🚀 MCP Project Generator
? What would you like to name your MCP project? cool-mcp
? Where would you like to create your MCP project? ./cool-mcp
? Would you like to install dependencies after creating the project? Yes
Generating MCP project...
✅ Project generated successfully!
Installing dependencies...
✅ Dependencies installed successfully!
🎉 Your MCP project "cool-mcp" has been created at /path/to/cool-mcp
Next steps:
cd ./cool-mcp
npm run build
npm start
The tool creates a complete MCP project structure:
your-project/
├── package.json # Configured with MCP dependencies
├── tsconfig.ts # TypeScript configuration
├── main.ts # Main MCP server entry point
├── tools/ # MCP tools directory
│ ├── index.ts # Tools export file
│ ├── tool1.ts # Example tool 1
│ └── tool2.ts # Example tool 2
└── helper/ # Helper utilities
├── index.ts # Helper exports
└── register.ts # Tool registration helper
@modelcontextprotocol/sdk
- Official MCP SDKzod
- Schema validationtypescript
- TypeScript compilertsx
- TypeScript execution@types/node
- Node.js type definitions
# Clone the repository
git clone <your-repo>
cd mcp-template
# Install dependencies
npm install
# Build the project
npm run build
# Run in development mode
npm run dev
# Test the built version
npm start
# Build the project
npm run build
# Publish to npm
npm publish
mcp-template/
├── src/ # Source code
│ └── index.ts # Main CLI entry point
├── templates/ # Template files to copy
│ ├── package.json # Package configuration
│ ├── tsconfig.ts # TypeScript config
│ ├── main.ts # MCP server
│ ├── tools/ # MCP tools
│ └── helper/ # Helper utilities
├── dist/ # Built output (generated)
├── package.json # Package configuration
└── tsconfig.json # TypeScript configuration
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
MIT License - see LICENSE file for details
If you encounter any issues or have questions:
- Check the MCP documentation
- Open an issue on GitHub
- Check existing issues for solutions
Made with ❤️ for the MCP community