This repository provides a CLI tool for quickly building MCP servers with TypeScript, offering dual transport support (stdio/HTTP), an MCP SDK, and an extensible structure for custom tools and resources.
This is a CLI tool designed to streamline the creation of Model Context Protocol (MCP) servers.
Utilize npx @mcpdotdirect/create-mcp-server
or npm init @mcpdotdirect/create-mcp-server
to initiate a new project.
The template provides a basic server setup with stdio and HTTP transport options, a structure for defining MCP tools, resources, and prompts, TypeScript configuration, and development scripts.
It features dual transport support (stdio/HTTP), full TypeScript support, and is built on the official MCP SDK. It's designed to be extensible, allowing easy addition of custom tools, resources, and prompts.
After project creation, install dependencies using npm, yarn, pnpm, or bun. Start the server using npm start
(stdio) or npm run start:http
(HTTP). Development modes with auto-reload are available via npm run dev
and npm run dev:http
.
When adding custom elements, use underscores instead of hyphens in names to ensure compatibility with Cursor and other AI tools.
Refer to the MCP Documentation for more information.
Licensed under the MIT License.
mcpdotdirect/template-mcp-server
March 10, 2025
March 26, 2025
TypeScript