typescript-mcp-server-generator
Installation
Summary
Complete TypeScript MCP server project generator with tools, resources, and transport configuration.
- Scaffolds a full Node.js/TypeScript project with @modelcontextprotocol/sdk, zod validation, and choice of HTTP (Express) or stdio transport
- Generates at least one production-ready tool with schema validation, error handling, and structured content responses
- Includes tsconfig.json with ES modules, proper package.json setup, and dev tooling (tsx/ts-node)
- Optionally adds resources with dynamic URI templates and prompts with argument schemas for extensibility
- Provides testing guidance via MCP Inspector, example tool invocations, and troubleshooting for common deployment issues
SKILL.md
Generate TypeScript MCP Server
Create a complete Model Context Protocol (MCP) server in TypeScript using the MCP TypeScript SDK v2 with the following specifications:
Requirements
- Project Structure: Create a new TypeScript/Node.js project with proper directory structure
- NPM Packages: The v1 monolithic
@modelcontextprotocol/sdkpackage is retired. Use the focused v2 packages:@modelcontextprotocol/server— server implementation (stdio transport via the@modelcontextprotocol/server/stdiosubpath)@modelcontextprotocol/node— Node HTTP transport (NodeStreamableHTTPServerTransport), or a framework adapter:@modelcontextprotocol/express,@modelcontextprotocol/hono,@modelcontextprotocol/fastify— each adapter requires its peer framework to be installed alongside it (e.g.@modelcontextprotocol/express+express)@modelcontextprotocol/core— shared protocol schemas (import*Schemaconstants from here, not fromsdk/types.js)zod@^4.2— v2 requires Zod 4.2+; do not use zod@3
- Runtime: Node.js 20+ (v2 minimum); ESM-first with
"type": "module"(a CommonJS build is also shipped, sorequire()works if needed) - Server Type: Choose between HTTP (Streamable HTTP transport) or stdio-based server. SSE and WebSocket transports were removed in v2 — do not generate them.
- Tools: Create at least one useful tool with proper schema validation
- Error Handling: Include comprehensive error handling and validation