
Mcp Server Template
io.github.qmmughalPublished by GitHub account qmmughalv1.0.0Updated Oct 24, 2026
Production-grade MCP Server Template for TypeScript and Node.js.
Overview
A starter template for building MCP servers in TypeScript and Node.js, not a ready-made tool server; it ships no tools of its own.
- What you can do
- The manifest lists no tools, so it offers no ready-made capabilities to an assistant. It is a project scaffold: strict TypeScript setup, Zod validation for tool inputs and environment variables, esbuild bundling into a single file, and a pino logger writing to stderr so the stdout JSON-RPC transport stays clean. It separates tools, resources, prompts and services into modules, and includes Vitest tests, type checking, a watch-mode dev script and a production build. It also documents connecting a built server to Claude Desktop or Cursor and a release workflow that publishes to npm and the MCP Registry on version tags.
- When to use it
- Use it if you are a developer starting a new MCP server in TypeScript and want boilerplate, validation, logging and test setup already in place. It is not useful for someone looking to add ready-made tools to an assistant.
- Requirements
- Node.js and npm on the local machine, since it runs as a local stdio process. You clone the repository, run npm install, and copy the example environment file to configure variables. Connecting a client requires the absolute path to the built dist/index.js file.
Installation
In SourceWeft
- Open Mcp Server Template in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Enterprise MCP Server Template 🚀
[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:
2. Configuration
Copy the example environment file and configure your variables:
3. Development Workflow
Start the server in watch mode for local development:
Run the test suite:
Verify typings:
4. Production Build
Bundle the server into a single, optimized executable:
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):
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:
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.
Source: README.md at commit 40ac81f
Tools
0Version history
1- v1.0.0LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts