mcp-server-tamplate
by gustta03·★ 0·Score 33
TypeScript template for creating MCP servers with clean architecture and example tools.
Overview
This is a well-structured TypeScript template for creating MCP servers using the official SDK. It provides a clean architecture with separated concerns for tools, adapters, and core protocols. The template includes an example health check tool and demonstrates proper tool registration patterns. It follows MCP protocol requirements by avoiding console.log in favor of console.error for logging.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose this template when starting a new MCP server project in TypeScript, especially if you value clean architecture and separation of concerns.
When NOT to choose this
Don't choose this if you need MCP servers in languages other than TypeScript or if you require more complex project structures beyond the template's scope.
Tools this server exposes
1 tool extracted from the READMEhealthHealth check tool to verify server status
Comparable tools
Installation
# Clone the repository
git clone https://github.com/gustta03/mcp-server-template.git
cd mcp-server-template
# Install dependencies
npm install
# Build the server
npm run build
# Run the server
npm startTo use with Claude Desktop:
- Copy
claude_desktop_config.example.jsontoclaude_desktop_config.json - Modify the path to point to your built server:
{
"mcpServers": {
"mcp-server-template": {
"command": "node",
"args": ["/absolute/path/to/your/mcp-server-template/build/main.js"]
}
}
}FAQ
- How do I add a new tool to my MCP server?
- Create a new class implementing the McpTool interface in the src/tools directory, then register it in main.ts by importing and adding it to the registerMcpTools function call.
- Why is there no console.log in the template?
- The stdout channel is reserved for the MCP protocol. Always use console.error for logging to avoid interfering with protocol communication.
Compare mcp-server-tamplate with
Last updated · Auto-generated from public README + GitHub signals.