@ralf9090/create-mcpserver
v1.0.0
Published
Scaffold a new MCP (Model Context Protocol) server in seconds
Maintainers
Readme
create-mcpserver
Scaffold a new MCP (Model Context Protocol) server in seconds.
The official @modelcontextprotocol/create-server is deprecated. This is its modern replacement — fast, interactive, and built for the MCP SDK v1.27+.
npx create-mcpserverFeatures
- Interactive CLI — Beautiful prompts powered by @clack/prompts
- 4 Templates — Basic, Tools, Resources, Full (kitchen sink)
- Transport Choice — stdio (Claude Desktop & Claude Code) or Streamable HTTP
- Testing Setup — Optional Vitest configuration out of the box
- Modern API — Uses
registerTool/registerResource/registerPrompt(not deprecatedserver.tool()) - MCP SDK v1.27+ — Latest SDK with
McpServerclass, Zod validation, and more - Fast — Embedded templates, no git clone. Scaffolds in <1 second
- Package Manager Detection — Works with npm, pnpm, yarn, and bun
Quick Start
# Interactive mode
npx create-mcpserver
# With project name
npx create-mcpserver my-weather-server
# Accept all defaults
npx create-mcpserver my-server --yes
# Specify template
npx create-mcpserver my-server --template fullInteractive Flow
create-mcpserver v1.0.0
◆ What is your server name?
│ my-weather-server
│
◆ Which template would you like?
│ ○ Basic - Minimal server with one example tool
│ ● Tools - Multiple tools with input validation (Recommended)
│ ○ Resources - Static and dynamic resource examples
│ ○ Full - Tools + Resources + Prompts (kitchen sink)
│
◆ Which transport?
│ ● stdio (Recommended - works with Claude Desktop & Claude Code)
│ ○ Streamable HTTP (for web deployment)
│
◆ Include testing setup?
│ ● Yes (Recommended)
│ ○ No
│
◆ Install dependencies now?
│ ● Yes
│ ○ No
✔ Created my-weather-server/
✔ Dependencies installed
Next steps:
cd my-weather-server
npm run dev # Start with hot reload
npm run build # Build for production
npm run inspect # Test with MCP InspectorTemplates
Basic
Minimal MCP server with a single example tool. Perfect for getting started.
Tools (Recommended)
Multiple tools with Zod input validation:
hello— Greet a usercalculate— Math operations (add, subtract, multiply, divide)get-timestamp— Current time in ISO, Unix, or human-readable formatgenerate-uuid— Generate a random UUID v4
Resources
Static and dynamic resource examples:
info://server— Server information (static)greeting://{name}— Dynamic greeting by nameconfig://default— Default configuration (static)env://{key}— Environment variable lookup (dynamic)
Full (Kitchen Sink)
Everything — tools, resources, and prompts:
- All tools from the Tools template
- All resources from the Resources template
summarize— Prompt to summarize textcode-review— Prompt to review codeexplain— Prompt to explain a topic at different levels
Transport Options
stdio (Default)
Works with Claude Desktop and Claude Code. The server communicates over standard input/output.
{
"mcpServers": {
"my-server": {
"command": "node",
"args": ["path/to/my-server/dist/index.js"]
}
}
}Streamable HTTP
For web deployment. The server runs as an Express HTTP server.
PORT=3000 npm start{
"mcpServers": {
"my-server": {
"url": "http://localhost:3000/mcp"
}
}
}CLI Options
| Option | Alias | Description |
|--------|-------|-------------|
| --template <name> | -t | Template: basic, tools, resources, full |
| --yes | -y | Accept all defaults (tools template, stdio, with tests) |
| --version | -v | Show version |
| --help | -h | Show help |
Development
After scaffolding, your project includes:
npm run dev # Start with hot reload (tsx watch)
npm run build # Build TypeScript to dist/
npm run inspect # Open MCP Inspector for testing
npm start # Run the built server
npm test # Run tests (if testing enabled)Why This Exists
The MCP ecosystem has exploded — the reference repo has 79k+ stars and there are 17,000+ MCP servers. But the official scaffolding tool (@modelcontextprotocol/create-server) was deprecated at v0.3.1.
create-mcpserver fills that gap with:
- Modern interactive UX (not just boring prompts)
- Up-to-date MCP SDK support (v1.27+ with latest
registerToolAPI) - Transport choice (stdio + HTTP)
- Testing setup out of the box
- Sub-second scaffolding (embedded templates, no git clone)
License
MIT
