Skip to content
MCP server

MCP Server Template

Starter template for building production-style MCP servers in TypeScript and Node.js

Runs locallyStatus and history
Install
Pricing
Open source
Platforms
CLI, self-hosted
Runs
Locally
Version
1.0.0
Listing updated
today

Similar MCP servers

About MCP Server Template

MCP Server Template is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.

The README describes this repository as a scaffold for writing Model Context Protocol servers in TypeScript on Node.js, so developers begin with tooling, folder layout and build steps already in place rather than assembling them from scratch. It separates tools, resources, prompts and services into their own directories, and keeps protocol handlers thin so business logic can be tested on its own.

The project is wired for a typical workflow: a watch-mode dev command, a Vitest test suite, a typecheck script, and an esbuild step that bundles the server into a single dist/index.js file. Logging goes through pino to stderr so that stdout stays clean for JSON-RPC traffic. Input validation for tools and environment variables uses Zod.

The README includes setup snippets for connecting the built server to Claude Desktop and Cursor over stdio. It also covers a GitHub Actions workflow that publishes to npm and the MCP Registry when a v* tag is pushed, which requires an NPM_TOKEN repository secret. It is aimed at developers who want to build their own MCP server.

Install

Run in a terminal

claude mcp add mcp-server-template -- npx -y @qmmughal/mcp-server-template

Add to claude_desktop_config.json

{
  "mcpServers": {
    "mcp-server-template": {
      "command": "npx",
      "args": [
        "-y",
        "@qmmughal/mcp-server-template"
      ]
    }
  }
}
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "mcp-server-template": {
      "command": "npx",
      "args": [
        "-y",
        "@qmmughal/mcp-server-template"
      ]
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

{
  "servers": {
    "mcp-server-template": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@qmmughal/mcp-server-template"
      ]
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "mcp-server-template": {
      "command": "npx",
      "args": [
        "-y",
        "@qmmughal/mcp-server-template"
      ]
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "mcp-server-template": {
      "command": "npx",
      "args": [
        "-y",
        "@qmmughal/mcp-server-template"
      ]
    }
  }
}

Using several servers? Build one config file with the MCP config generator.

What it does

Strict TypeScript setup
Ships with a TypeScript configuration targeting modern ECMAScript with strict type checking and a typecheck script.
Runtime input validation
Uses Zod schemas to validate tool inputs and environment variables at runtime.
Single-file bundling
esbuild compiles the server into one dist/index.js so node_modules need not be deployed.
Stderr-safe logging
A pino logger writes to stderr so stdout remains usable for the JSON-RPC stdio transport.
Modular project layout
Separate folders for tools, resources, prompts, services and error utilities.
Automated registry publishing
A GitHub workflow publishes to npm and the MCP Registry when a version tag is pushed.

Good for

  • Starting a new custom MCP server in TypeScript without writing boilerplate
  • Exposing internal APIs or data to Claude Desktop or Cursor through MCP tools
  • Publishing a scoped MCP server package to npm and the MCP Registry from a tagged release

Pricing

Open source

Free and MIT licensed.

MCP Server Template FAQ

Which transport does the template use?

The registry entry lists stdio as the transport, and the README's stdio connection setup is used by the entrypoint.

What is needed to publish automatically?

The README says the publish workflow needs an NPM_TOKEN repository secret with publish rights to the @qmmughal scope; MCP Registry auth uses GitHub OIDC.

Which clients does the README show how to connect to?

It gives setup instructions for Claude Desktop and Cursor.

Is MCP Server Template free?

Yes. MCP Server Template is open source, so you can use and self-host it for free.

How do I add MCP Server Template to Claude Code?

Run this command in your terminal: claude mcp add mcp-server-template -- npx -y @qmmughal/mcp-server-template

What are the best alternatives to MCP Server Template?

The closest alternatives to MCP Server Template are Srecode Template MCP, Makefile MCP, Swapi MCP, Velocity Template Language MCP and Skybridge Example MCP App.

Where this comes from

  • Description: written from the project's README and its MCP Registry entry.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers