MCP TypeScript Starter
@SamMorrowDrums
A minimal Model Context Protocol (MCP) server in TypeScript with hello tool, markdown resource, and prompt. Includes VS Code/devcontainer setup and documentation.
Overview
What is MCP TypeScript Starter?
A feature-complete Model Context Protocol (MCP) server template written in TypeScript. It demonstrates all major MCP features (tools, resources, templates, prompts) with clean, production-ready code. Intended for developers who want to build or learn MCP servers.
How to use MCP TypeScript Starter?
Clone the repository, install dependencies with npm install, and build with npm run build. Run the server using npm run start:stdio for local development or npm run start:http for remote deployment. Development mode with live reload is available via npm run dev.
Key features of MCP TypeScript Starter
- Demonstrates tools with annotations, structured output, LLM sampling, progress updates, and dynamic loading
- Provides static and file-based resources along with resource templates
- Includes prompt templates for greetings and code review
- Supports both stdio and HTTP transports
- Pre-configured VS Code integration with MCP configuration and DevContainers support
- Integrates with the MCP Inspector for testing and debugging
Use cases of MCP TypeScript Starter
- Jumpβstart a new MCP server implementation in TypeScript
- Learn MCP features by studying example tools, resources, templates, and prompts
- Test and debug MCP servers using the MCP Inspector
- Deploy an MCP server locally via stdio or remotely over HTTP
FAQ from MCP TypeScript Starter
What are the prerequisites?
Node.js 20 or later and npm (or pnpm) are required.
How do I run the server in development mode?
Use npm run dev to start with tsx watch for instant reload on file changes.
What transports does the server support?
It supports stdio transport (npm run start:stdio) for local development and HTTP transport (npm run start:http) running on port 3000 by default.
How can I test and debug the server?
Use the MCP Inspector by running npx @modelcontextprotocol/inspector -- npx tsx src/stdio.ts. This provides a tools, resources, prompts, and logs tab for full debugging.
What is the license?
The project is licensed under the MIT License.