mcp-server-template-nodejs-19
Verified Safeby pierrelouistheron
Overview
A TypeScript template for building Model Context Protocol (MCP) servers to enable communication with AI assistants and other MCP clients.
Installation
npm run startEnvironment Variables
- MCP_HTTP_PORT
Security Notes
The server uses Express.js and the Model Context Protocol SDK. Input validation for tools and prompts is handled via Zod schemas, which is a good practice to prevent common injection vulnerabilities. Environment variables are loaded using `dotenv`, promoting separation of configuration. No hardcoded secrets, direct `eval` of user input, or obvious insecure patterns were found in the provided source code. The main `/mcp` endpoint explicitly disallows GET and DELETE requests, focusing on POST for protocol communication. This template provides a good, secure starting point, but custom logic added by developers will require careful security review.
Similar Servers
boilerplate-mcp-server
Provides a production-ready foundation for developing custom Model Context Protocol (MCP) servers in TypeScript to connect AI assistants with external APIs and data sources, exemplified by an IP geolocation tool.
mcp-typescript-template
This project provides a foundational TypeScript template for developing remote Model Context Protocol (MCP) servers with robust tooling and best practices.
mcp-typescript-starter
A feature-complete Model Context Protocol (MCP) server template in TypeScript demonstrating all major MCP features for AI assistant interaction.
Create-MCP
Generates Model Context Protocol (MCP) server projects through a command-line interface.