Back to Home
my-mcp-hub icon

node-mcp-server

Verified Safe

by 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

Run Command
npm run build && node build/index.js web --port 8401

Environment 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

Stats

Interest Score30
Security Score8
Cost ClassLow
Avg Tokens10
Stars1
Forks0
Last Update2026-01-15

Tags

Node.jsMCPServerAPITypeScript