This repository provides a TypeScript template for building Model Context Protocol (MCP) servers, offering utilities, type safety, security features, and example implementations to facilitate a quick start. This repository provides
This repository offers a beginner-friendly TypeScript template for building Model Context Protocol (MCP) servers, with future support planned for clients. It provides a solid foundation with production-ready utilities, structured code, and examples for rapid MCP server development.
Key features include reusable utilities for logging, error handling, ID generation, rate limiting, and request context management. TypeScript ensures type safety, catching errors early. The template also offers built-in security features, robust error handling, and comprehensive documentation. Example implementations of an echo_message
tool and an echo://hello
resource are included.
The template includes a .clinerules
file, a developer cheat sheet for LLM coding agents. It features input validation using validator
and sanitization with sanitize-html
. The project is licensed under Apache 2.0.
cyanheads/mcp-ts-template
March 20, 2025
March 28, 2025
TypeScript