MCP Server Starter
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Server Startercalculate 5 times 7"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Server Starter (TypeScript)
A production-ready starter kit for building Model Context Protocol (MCP) servers in TypeScript. Clone it, add your tools, ship. Everything you'd otherwise spend a day wiring up is already here:
✅ Typed, validated config from environment variables (zod) — fails fast on bad input
✅ Clean modular structure for tools, resources and prompts — add a file, register it, done
✅ Three reference tools (
echo,calculator,fetch_url) showing input validation, error handling, and safe network I/O with a timeout + host allowlist✅ Resource and prompt examples wired end to end
✅ stderr-only structured logger (never corrupts the stdio JSON-RPC stream — a common footgun)
✅ Full test suite (Vitest) including an in-memory client↔server round-trip test
✅ Docker multi-stage build and GitHub Actions CI across Node 18/20/22
✅ Graceful shutdown on SIGINT/SIGTERM
✅ MIT licensed — use it in commercial projects freely
Quick start
npm install
npm run build
npm start # runs the MCP server over stdioDevelop with hot reload:
npm run devRun the test suite and type checks:
npm test
npm run typecheckInspect it interactively with the official MCP Inspector:
npm run inspectRelated MCP server: MCP TypeScript Server Template
Use it with Claude Desktop / any MCP client
After npm run build, add this to your client's MCP config (e.g. Claude Desktop's claude_desktop_config.json):
{
"mcpServers": {
"starter": {
"command": "node",
"args": ["/absolute/path/to/mcp-server-starter/dist/index.js"]
}
}
}Project layout
src/
index.ts # entrypoint: loads config, wires stdio transport, handles shutdown
server.ts # builds the McpServer and registers everything
config.ts # zod-validated environment config
logger.ts # structured stderr logger
tools/ # one file per tool + a registrar (index.ts)
resources/ # read-only content exposed to the client
prompts/ # reusable prompt templates
test/ # vitest unit + end-to-end tests
Dockerfile # multi-stage production image
.github/workflows/ # CIAdd your own tool
Create
src/tools/myTool.tsexporting aToolModule(copyecho.ts).Add it to the
toolsarray insrc/tools/index.ts.Add a test in
test/tools.test.ts.
That's the whole loop. The ToolModule type keeps the input schema, metadata and handler together and type-checked.
Configuration
All settings are optional and read from the environment (see .env.example):
Variable | Default | Description |
|
| Name reported to clients |
|
| Version reported to clients |
|
|
|
|
| Timeout for the |
| (empty = all) | Comma-separated host allowlist for |
Docker
docker build -t mcp-server-starter .
docker run --rm -i mcp-server-starterLicense
MIT — see LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
A Model Context Protocol server for Wix AI tools
A simple Typescript MCP server built using the official MCP Typescript SDK and smithery/cli. This…
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Model Context Protocol server for Studex tools, notifications, and profile integrations
Related MCP Servers
- AlicenseCqualityDmaintenanceA production-ready template for creating Model Context Protocol servers with TypeScript, providing tools for efficient testing, development, and deployment.128 npm47MIT
- FlicenseNot gradedqualityDmaintenanceA template repository for building Model Context Protocol (MCP) servers with TypeScript, featuring full TypeScript support, testing setup, CI/CD pipelines, and modular architecture for easy extension.7 npm-
- AlicenseAqualityCmaintenanceA production-grade TypeScript starter for building Model Context Protocol servers, supporting stdio and Streamable HTTP transports with modular tools, resources, and prompts.16 npmMIT
- AlicenseNot gradedqualityCmaintenanceA minimal, production-ready starter for building Model Context Protocol servers in TypeScript, supporting both stdio and streamable HTTP transports with optional bearer-token auth.8 npmMIT