Create Mcpserver
Scaffold a new MCP (Model Context Protocol) server in seconds
Ask AI about Create Mcpserver
Powered by Claude Β· Grounded in docs
I know everything about Create Mcpserver. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
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-mcpserver
Features
- 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 full
Interactive 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 Inspector
Templates
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
