MCP Catalogs
Home

mcp-server-tamplate

by gustta03·0·Score 33

TypeScript template for creating MCP servers with clean architecture and example tools.

developer-toolsai-llmproductivity
0
Forks
0
Open issues
3 mo ago
Last commit
2d ago
Indexed

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:

you:Quickly start building new MCP servers without worrying about boilerplate
you:Learn MCP server architecture through the provided example structure
you:Create standardized tools with proper input validation using Zod
you:How do I add a new tool to my MCP server?
you:Why is there no console.log in the template?

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 README
  • health

    Health check tool to verify server status

Comparable tools

mcp-server-typescriptmcp-server-python-template

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 start

To use with Claude Desktop:

  1. Copy claude_desktop_config.example.json to claude_desktop_config.json
  2. 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

GitHub →

Last updated · Auto-generated from public README + GitHub signals.