Skip to main content
The Node.js template is a minimal, production-ready starting point for building MCP servers with TypeScript.

Clone the template

Project structure

How it works

The template implements MCP over HTTP + SSE (Server-Sent Events) using Express: The MCP Server from @modelcontextprotocol/sdk handles the protocol layer. You only need to register tools.

Adding tools

Open src/index.ts and modify the two request handlers:

1. Register the tool in ListToolsRequestSchema

2. Handle the tool call in CallToolRequestSchema

Using environment variables

Access secrets injected by ezforge env set:
Set the variable before deploying:

Local development

Build and deploy

Dependencies

Dockerfile

The template uses a multi-stage build:
  1. Build stage — TypeScript compilation
  2. Production stage — Minimal Node.js image with only compiled output