Enterprise Server Template
FreeNot checkedA production-ready TypeScript template for building Model Context Protocol (MCP) servers with Zod validation, structured logging, and seamless integration with
About
A production-ready TypeScript template for building Model Context Protocol (MCP) servers with Zod validation, structured logging, and seamless integration with AI agents like Claude Desktop and Cursor.
README
TypeScript Node.js Model Context Protocol License: MIT
A production-ready, enterprise-grade template for building Model Context Protocol (MCP) servers in TypeScript and Node.js. Designed for scalability, type safety, and seamless integration with AI agents like Claude Desktop and Cursor.
📖 About
The Model Context Protocol (MCP) standardizes how AI models interact with local and remote resources. This template provides a robust foundation for building your own custom MCP servers, eliminating boilerplate and enforcing best practices.
Key Features
- Strict TypeScript: Modern ECMAScript targets with rigorous type safety.
- Zod Validation: Runtime schema validation for tool inputs and environment variables, ensuring your server never crashes from malformed AI payloads.
- Fast Bundling (esbuild): Compiles the entire server into a single, optimized executable (
dist/index.js), eliminating the need to deploynode_modules. - Safe Structured Logging: Pre-configured
pinologger writing safely tostderr, preserving the integrity of thestdoutJSON-RPC transport required by MCP. - Modular Architecture: Clean separation of Tools, Resources, Prompts, and Services.
- Vitest Integration: Blazing fast unit testing out of the box.
🚀 Getting Started
1. Installation
Clone the repository and install dependencies:
git clone https://github.com/qmmughal/mcp-server-template.git
cd mcp-server-template
npm install
2. Configuration
Copy the example environment file and configure your variables:
cp .env.example .env
3. Development Workflow
Start the server in watch mode for local development:
npm run dev
Run the test suite:
npm test
Verify typings:
npm run typecheck
4. Production Build
Bundle the server into a single, optimized executable:
npm run build
The output will be generated at dist/index.js.
🔌 Connecting to an MCP Client
Claude Desktop
To connect this server to the Claude Desktop app, edit your Claude configuration file (usually found at %APPDATA%\Claude\claude_desktop_config.json on Windows or ~/Library/Application Support/Claude/claude_desktop_config.json on Mac):
{
"mcpServers": {
"enterprise-template-server": {
"command": "node",
"args": ["/absolute/path/to/mcp-server-template/dist/index.js"],
"env": {
"LOG_LEVEL": "info",
"EXAMPLE_API_KEY": "your_api_key_here"
}
}
}
}
Cursor
In Cursor, navigate to Settings -> Features -> MCP and add a new MCP server:
- Type:
command - Command:
node /absolute/path/to/mcp-server-template/dist/index.js
🏗️ Architecture Overview
src/index.ts: Application entrypoint, capability registration, and stdio connection setup.src/tools/: Definitions and JSON schemas for MCP Tools (actions the AI can take).src/resources/: Dynamic resources via URI templating (data the AI can read).src/prompts/: Reusable agent prompt templates.src/services/: Core business logic, keeping protocol handlers thin and testable.src/utils/errors.ts: Standardized error handling aligned with MCP error codes.
📦 Publishing & Registry
package.json is publish-ready (scoped name @qmmughal/mcp-server-template, license, repository, keywords), and server.json + .github/workflows/publish-mcp.yml are wired up to publish to both npm and the MCP Registry automatically whenever a v* tag is pushed:
git tag v1.0.0
git push origin v1.0.0
The workflow needs one repo secret before it can run: NPM_TOKEN (an npm automation token with publish rights to the @qmmughal scope). MCP Registry auth uses GitHub OIDC, so no extra secret is needed there.
🤝 Contributing
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
📝 License
This project is MIT licensed.
Install Enterprise Server Template in Claude Desktop, Claude Code & Cursor
unyly install enterprise-mcp-server-templateInstalls into Claude Desktop, Claude Code, Cursor & VS Code — handles npx, uvx and build-from-source repos for you.
First time? Get the CLI: curl -fsSL https://unyly.org/install | sh
Or configure manually
Run in your terminal:
claude mcp add enterprise-mcp-server-template -- npx -y @qmmughal/mcp-server-templateStep-by-step: how to install Enterprise Server Template
FAQ
Is Enterprise Server Template MCP free?
Yes, Enterprise Server Template MCP is free — one-click install via Unyly at no cost.
Does Enterprise Server Template need an API key?
No, Enterprise Server Template runs without API keys or environment variables.
Is Enterprise Server Template hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Enterprise Server Template in Claude Desktop, Claude Code or Cursor?
Open Enterprise Server Template on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
by modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
by xuzexin-hzCompare Enterprise Server Template with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All ai MCPs
