Clone the template
Project structure
How it works
The template implements MCP over HTTP + SSE (Server-Sent Events) using Express:| Endpoint | Description |
|---|---|
GET /healthz | Health check — must return 200 for deploys to succeed |
GET /sse | MCP clients connect here to open a session |
POST /message | MCP clients send tool calls here |
Server from @modelcontextprotocol/sdk handles the protocol layer. You only need to register tools.
Adding tools
Opensrc/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 byezforge env set:
Local development
Build and deploy
Dependencies
| Package | Purpose |
|---|---|
@modelcontextprotocol/sdk | Official MCP SDK (server + types) |
express | HTTP transport layer |
Dockerfile
The template uses a multi-stage build:- Build stage — TypeScript compilation
- Production stage — Minimal Node.js image with only compiled output