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
The CodeCall plugin provides AgentScript-based meta-tools for orchestrating MCP tools, enabling programmatic discovery, description, execution, and invocation of server capabilities within a sandboxed JavaScript environment.
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 feature-complete Model Context Protocol (MCP) server template in TypeScript demonstrating all major MCP features for AI assistant interaction.