# template-mcp-server

> MCP Server

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.

## Overview

- **Category:** Developer Tools
- **Language:** TypeScript
- **Stars:** 76
- **Forks:** 6
- **Owner:** mcpdotdirect
- **GitHub:** https://github.com/mcpdotdirect/template-mcp-server
- **Created:** 2025-03-10T21:29:20+00:00
- **Updated:** 2025-03-26T19:31:51+00:00
- **Source:** https://model-context-protocol.com/servers/mcp-server-typescript-cli-template

## Setup

## Setup

1.  Create a new project using the CLI tool:
   ```bash
   # with npx
   npx @mcpdotdirect/create-mcp-server

   # Or with npm
   npm init @mcpdotdirect/create-mcp-server
   ```
2.  Install dependencies using your preferred package manager:
   ```bash
   # Using npm
   npm install
   
   # Using yarn
   yarn
   
   # Using pnpm
   pnpm install
   
   # Using bun
   bun install
   ```
3.  Start the server:
   ```bash
   # Start the stdio server
   npm start
   
   # Or start the HTTP server
   npm run start:http
   ```
4.  For development with auto-reload:
   ```bash
   # Development mode with stdio
   npm run dev
   
   # Development mode with HTTP
   npm run dev:http
   ```
5.  When adding custom tools, resources, or prompts to your MCP server, use underscores (`_`) instead of hyphens (`-`) in all resource, tool, and prompt names.

## Tools

## Available Tools

1.  Dual Transport Support (Run your MCP server over stdio or HTTP)
2.  TypeScript (Full TypeScript support for type safety)
3.  MCP SDK (Built on the official Model Context Protocol SDK)
4.  Extensible (Easy to add custom tools, resources, and prompts)
