npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ralf9090/create-mcpserver

v1.0.0

Published

Scaffold a new MCP (Model Context Protocol) server in seconds

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-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 deprecated server.tool())
  • MCP SDK v1.27+ — Latest SDK with McpServer class, 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 user
  • calculate — Math operations (add, subtract, multiply, divide)
  • get-timestamp — Current time in ISO, Unix, or human-readable format
  • generate-uuid — Generate a random UUID v4

Resources

Static and dynamic resource examples:

  • info://server — Server information (static)
  • greeting://{name} — Dynamic greeting by name
  • config://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 text
  • code-review — Prompt to review code
  • explain — 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 registerTool API)
  • Transport choice (stdio + HTTP)
  • Testing setup out of the box
  • Sub-second scaffolding (embedded templates, no git clone)

License

MIT