{"kind":"Skill","metadata":{"namespace":"community","name":"typescript-mcp-server-generator","version":"0.1.0"},"spec":{"description":"Generate a complete MCP server project in TypeScript with tools, resources, and proper configuration","files":{"SKILL.md":"---\nname: typescript-mcp-server-generator\ndescription: 'Generate a complete MCP server project in TypeScript with tools, resources, and proper configuration'\n---\n\n# Generate TypeScript MCP Server\n\nCreate a complete Model Context Protocol (MCP) server in TypeScript with the following specifications:\n\n## Requirements\n\n1. **Project Structure**: Create a new TypeScript/Node.js project with proper directory structure\n2. **NPM Packages**: Include @modelcontextprotocol/sdk, zod@3, and either express (for HTTP) or stdio support\n3. **TypeScript Configuration**: Proper tsconfig.json with ES modules support\n4. **Server Type**: Choose between HTTP (with Streamable HTTP transport) or stdio-based server\n5. **Tools**: Create at least one useful tool with proper schema validation\n6. **Error Handling**: Include comprehensive error handling and validation\n\n## Implementation Details\n\n### Project Setup\n- Initialize with `npm init` and create package.json\n- Install dependencies: `@modelcontextprotocol/sdk`, `zod@3`, and transport-specific packages\n- Configure TypeScript with ES modules: `\"type\": \"module\"` in package.json\n- Add dev dependencies: `tsx` or `ts-node` for development\n- Create proper .gitignore file\n\n### Server Configuration\n- Use `McpServer` class for high-level implementation\n- Set server name and version\n- Choose appropriate transport (StreamableHTTPServerTransport or StdioServerTransport)\n- For HTTP: set up Express with proper middleware and error handling\n- For stdio: use StdioServerTransport directly\n\n### Tool Implementation\n- Use `registerTool()` method with descriptive names\n- Define schemas using zod for input and output validation\n- Provide clear `title` and `description` fields\n- Return both `content` and `structuredContent` in results\n- Implement proper error handling with try-catch blocks\n- Support async operations where appropriate\n\n### Resource/Prompt Setup (Optional)\n- Add resources using `registerResource()` with ResourceTemplate for dynamic URIs\n- Add prompts using `registerPrompt()` with argument schemas\n- Consider adding completion support for better UX\n\n### Code Quality\n- Use TypeScript for type safety\n- Follow async/await patterns consistently\n- Implement proper cleanup on transport close events\n- Use environment variables for configuration\n- Add inline comments for complex logic\n- Structure code with clear separation of concerns\n\n## Example Tool Types to Consider\n- Data processing and transformation\n- External API integrations\n- File system operations (read, search, analyze)\n- Database queries\n- Text analysis or summarization (with sampling)\n- System information retrieval\n\n## Configuration Options\n- **For HTTP Servers**: \n  - Port configuration via environment variables\n  - CORS setup for browser clients\n  - Session management (stateless vs stateful)\n  - DNS rebinding protection for local servers\n  \n- **For stdio Servers**:\n  - Proper stdin/stdout handling\n  - Environment-based configuration\n  - Process lifecycle management\n\n## Testing Guidance\n- Explain how to run the server (`npm start` or `npx tsx server.ts`)\n- Provide MCP Inspector command: `npx @modelcontextprotocol/inspector`\n- For HTTP servers, include connection URL: `http://localhost:PORT/mcp`\n- Include example tool invocations\n- Add troubleshooting tips for common issues\n\n## Additional Features to Consider\n- Sampling support for LLM-powered tools\n- User input elicitation for interactive workflows\n- Dynamic tool registration with enable/disable capabilities\n- Notification debouncing for bulk updates\n- Resource links for efficient data references\n\nGenerate a complete, production-ready MCP server with comprehensive documentation, type safety, and error handling.\n"},"import":{"commit_sha":"541b7819d8c3545c6df122491af4fa1eae415779","imported_at":"2026-05-18T20:05:35Z","license_text":"MIT License\n\nCopyright GitHub, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","owner":"github","repo":"github/awesome-copilot","source_url":"https://github.com/github/awesome-copilot/tree/541b7819d8c3545c6df122491af4fa1eae415779/plugins/typescript-mcp-development/skills/typescript-mcp-server-generator"}},"content_hash":[58,13,102,178,127,92,151,75,60,77,194,231,96,32,80,227,47,116,190,149,192,252,160,93,82,180,72,161,113,252,73,182],"trust_level":"unsigned","yanked":false}
