Scaffold a new Model Context Protocol (MCP) server in seconds. Think of it as create-react-app but for MCP servers.
It downloads the mcp-typescript template and sets it up locally with your project name - ready to build on.
Note: The template uses Fastify as the HTTP framework and TypeScript for type-safe development.
- One-command project scaffolding
- Downloads the latest template directly from GitHub
- Automatically sets your project name in
package.json - No dependencies installed automatically - you stay in control
- Colorful CLI output with progress spinners
- Refuses to overwrite non-empty directories
- Node.js 22+
- npm
You can use it directly with npx:
npx setup-mcp-server my-awesome-serveror install globally using npm:
npm install -g setup-mcp-serversetup-mcp-server my-awesome-serverIf no project name is provided, it defaults to my-mcp-server:
setup-mcp-serversetup-mcp-server - scaffold an MCP server in seconds
✔ Template downloaded
✔ Template extracted
✔ Project scaffolded
Done! Your MCP server is ready.
cd my-awesome-server
npm install
cp sample.env .env
npm run build
npm start
Usage: setup-mcp-server [options] [project-name]
Scaffold a new MCP server from the mcp-typescript template
Arguments:
project-name Name of the project directory (default: "my-mcp-server")
Options:
-V, --version output the version number
-h, --help display help for command
The scaffolded project includes:
- MCP SDK integration with tool registration and SSE transport
- Fastify HTTP server with environment-based logging
- TypeScript compilation and ESLint configuration
- Docker support with a production-ready Dockerfile
- Example tool implementation to get you started
- Test setup with tap
- Downloads the
mainbranch tarball from karankraina/mcp-typescript - Extracts it into a new directory named after your project
- Updates
package.jsonwith your project name and resets the version to0.1.0
This project uses the native Node.js test runner:
npm testContributions are welcome! Please open an issue or submit a pull request on GitHub.
This project is licensed under the MIT License. See the LICENSE file for details.
Feel free to reach out if you have any questions or need further assistance.
Happy coding!