node-mcp-server
Verified Safeby my-mcp-hub
Overview
A template for building Model Context Protocol (MCP) compatible servers with support for multiple transport protocols like HTTP, SSE, and standard I/O.
Installation
npm run build && node build/index.js web --port 8401Environment Variables
- PORT
- NODE_ENV
Security Notes
The server uses Fastify, a robust web framework. Input validation for tools is implemented using Zod, which is a good practice for type safety and preventing unexpected data. Session IDs are generated using nanoid. By default, CORS is configured to allow all origins, which is typical for a template but should be restricted in a production environment to prevent cross-origin attacks. No direct 'eval' or obvious command injection vulnerabilities were found without proper sanitization.
Similar Servers
frontmcp
A TypeScript-first framework for building Model Context Protocol (MCP) servers, enabling agents to orchestrate tools and manage sessions, authentication, and UI interactions with strong typing and modularity. The CodeCall plugin specifically adds dynamic script execution and meta-tool capabilities.
template-mcp-server
Provides a CLI tool and template to quickly get started building a Model Context Protocol (MCP) server using FastMCP, supporting both stdio and HTTP transports.
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 versatile Model Context Protocol (MCP) server template in TypeScript, designed to demonstrate comprehensive MCP features for AI assistant integration and development.