typescript-mcp-server-generator

Solid

Generate a complete MCP server project in TypeScript with tools, resources, and proper configuration

AI & Automation 34,233 stars 4188 forks Updated today MIT

Install

View on GitHub

Quality Score: 93/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Generate TypeScript MCP Server Create a complete Model Context Protocol (MCP) server in TypeScript with the following specifications: ## Requirements 1. **Project Structure**: Create a new TypeScript/Node.js project with proper directory structure 2. **NPM Packages**: Include @modelcontextprotocol/sdk, zod@3, and either express (for HTTP) or stdio support 3. **TypeScript Configuration**: Proper tsconfig.json with ES modules support 4. **Server Type**: Choose between HTTP (with Streamable HTTP transport) or stdio-based server 5. **Tools**: Create at least one useful tool with proper schema validation 6. **Error Handling**: Include comprehensive error handling and validation ## Implementation Details ### Project Setup - Initialize with `npm init` and create package.json - Install dependencies: `@modelcontextprotocol/sdk`, `zod@3`, and transport-specific packages - Configure TypeScript with ES modules: `"type": "module"` in package.json - Add dev dependencies: `tsx` or `ts-node` for development - Create proper .gitignore file ### Server Configuration - Use `McpServer` class for high-level implementation - Set server name and version - Choose appropriate transport (StreamableHTTPServerTransport or StdioServerTransport) - For HTTP: set up Express with proper middleware and error handling - For stdio: use StdioServerTransport directly ### Tool Implementation - Use `registerTool()` method with descriptive names - Define schemas using zod for input and output validation - Pr...

Details

Author
github
Repository
github/awesome-copilot
Created
11 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category