#!/usr/bin/env node import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; import { z } from "zod"; const server = new McpServer({ name: "{{PROJECT_NAME}}", version: "{{VERSION}}", }); // ── Example tool ────────────────────────────────────────── // Replace this with your own tools. Each tool needs: // 1. A clear name (snake_case) // 2. A description (shown to the AI model) // 3. Input schema (using Zod) // 4. An async handler server.tool( "hello", "Say hello and return a greeting message", { name: z.string().describe("Name to greet"), }, async ({ name }) => { return { content: [ { type: "text", text: `Hello, ${name}! This is {{PROJECT_NAME}} speaking.`, }, ], }; } ); // ── Add more tools below ───────────────────────────────── // server.tool("your_tool", "description", { ...schema }, async (params) => { ... }) // ── Start server ───────────────────────────────────────── async function main() { const transport = new StdioServerTransport(); await server.connect(transport); } main().catch(console.error);