# MCP Generator Documentation Index
Complete guide to using the MCP Project Generator to create new tools and servers.
## β οΈ Important: Always Check Official Documentation
**These generator prompts are templates based on MCP best practices, but the official documentation is the source of truth:**
- **MCP Specification:** https://spec.modelcontextprotocol.io/
- **MCP Documentation:** https://modelcontextprotocol.io/
- **MCP TypeScript SDK:** https://github.com/modelcontextprotocol/typescript-sdk
- **Anthropic MCP Guide:** https://docs.anthropic.com/en/docs/build-with-claude/model-context-protocol
Always instruct your AI assistant to fetch the latest documentation before generating code.
---
## π Quick Navigation
### For New Users (Start Here!)
1. **[Quick Start Generator](../QUICK-START-GENERATOR.md)** β‘
- 5-minute setup guide
- Copy-paste ready commands
- Two clear paths: Add tool vs. Create project
- Perfect for getting started quickly
### For Specific Use Cases
2. **[Generator Examples](../MCP-GENERATOR-EXAMPLES.md)** π―
- Ready-to-use prompts for 7 common scenarios:
- PostgreSQL MCP Server
- GitHub MCP Server
- File System MCP Server
- Slack MCP Server
- MongoDB MCP Server
- REST API MCP Server
- Analytics/Metrics MCP Server
- Customization template for your own needs
### For Detailed Implementation
3. **[MCP Project Generator Prompt](../MCP-PROJECT-GENERATOR-PROMPT.md)** π
- Comprehensive 17KB guide
- Complete architecture patterns
- 4 common tool implementation patterns with code
- Security best practices
- Testing strategies
- VS Code integration details
### For Validation & Testing
4. **[Generator Usage Examples](./GENERATOR-USAGE-EXAMPLES.md)** π§ͺ
- How to test the prompts
- Validation criteria
- Expected outputs
- Integration steps
- Common adjustments needed
---
## π― Use Case Guide
### "I want to add a tool to an existing MCP Server"
β Start with **[Quick Start Generator - Path A](../QUICK-START-GENERATOR.md#path-a-add-tool-to-existing-mcp-server)**
### "I want to create a PostgreSQL MCP Server"
β Use **[PostgreSQL Example](../MCP-GENERATOR-EXAMPLES.md#example-1-postgresql-mcp-server)**
### "I want to create a GitHub integration"
β Use **[GitHub Example](../MCP-GENERATOR-EXAMPLES.md#example-2-github-mcp-server)**
### "I want to create something totally custom"
β Start with **[Quick Start Generator - Path B](../QUICK-START-GENERATOR.md#path-b-create-new-standalone-mcp-server)** and customize
### "I need to understand the architecture deeply"
β Read **[MCP Project Generator Prompt](../MCP-PROJECT-GENERATOR-PROMPT.md)**
### "I want to verify a prompt will work"
β Check **[Generator Usage Examples](./GENERATOR-USAGE-EXAMPLES.md)**
---
## π Learning Path
### Beginner Path
1. Read the **Quick Start Generator** (5 minutes)
2. Try **Path A** to add a simple tool to this project
3. Build and test your new tool
4. Success! π
### Intermediate Path
1. Review **Generator Examples** (10 minutes)
2. Choose an example matching your needs
3. Copy the prompt and customize it
4. Follow the generated initialization commands
5. Integrate with VS Code
### Advanced Path
1. Study the **MCP Project Generator Prompt** (20 minutes)
2. Understand the architecture patterns
3. Review security best practices
4. Create a custom prompt for your specific use case
5. Validate with the **Generator Usage Examples**
---
## π§ macOS/VS Code Specific Notes
All generator prompts include:
- β macOS terminal commands
- β Absolute path requirements for VS Code
- β `.vscode/mcp.json` configuration
- β Directory creation instructions
- β VS Code reload steps
**Important**: Always use absolute paths in `.vscode/mcp.json` for proper integration!
---
## π¦ What Each Prompt Generates
### Adding a Tool (Path A)
- β Single tool file in `src/tools/`
- β Zod schema for validation
- β Tool function implementation
- β Registration code for `server.ts`
- β Type definitions if needed
### Creating a Project (Path B)
- β Complete project structure
- β `package.json` with dependencies
- β `tsconfig.json` configured for ES2022
- β `src/server.ts` (MCP server)
- β `src/config.ts` (Zod validation)
- β `src/client.ts` (test client)
- β Connection/client management
- β 2+ example tools
- β Logging utilities
- β `.env.example` template
- β `.gitignore`
- β `README.md`
- β Initialization commands
---
## π‘οΈ Security Considerations
All prompts emphasize:
- Read-only access when possible
- Input validation with Zod
- No secrets in source code
- Timeout protection
- Result size limits
- Audit logging
- Graceful error handling
- Resource cleanup
---
## π§ͺ Testing Your Generated Code
1. **Build**: `npm run build`
2. **Test Client**: `npm run test-client`
3. **VS Code Integration**: Update `.vscode/mcp.json`
4. **Copilot Test**: Ask about available tools
See **[Generator Usage Examples](./GENERATOR-USAGE-EXAMPLES.md)** for detailed validation criteria.
---
## π‘ Tips for Success
1. **Be specific** in your prompts about what you need
2. **List exact tools** you want (2-4 to start)
3. **Include environment variables** your service needs
4. **Mention special requirements** (rate limits, security)
5. **Request macOS commands** for initialization
6. **Always review** generated code before use
7. **Test incrementally** - build and test each tool
8. **Use absolute paths** in VS Code configuration
---
## π Related Documentation
### MCP Protocol
- [MCP Integration Guide](./MCP-INTEGRATION.md) - Protocol details
- [VS Code Integration Guide](./VSCODE-INTEGRATION.md) - Copilot setup
### This Repository
- [Quick Start Guide](./QUICK-START-VSCODE.md) - Example MCP server setup
- [README](../README.md) - Project documentation
### External - Official MCP Documentation
- **[MCP Specification](https://spec.modelcontextprotocol.io/)** - Protocol specification
- **[MCP Documentation](https://modelcontextprotocol.io/)** - Official docs
- **[MCP TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk)** - Official SDK
- **[Anthropic MCP Guide](https://docs.anthropic.com/en/docs/build-with-claude/model-context-protocol)** - Anthropic's guide
- **[MCP Servers Examples](https://github.com/modelcontextprotocol/servers)** - Official examples
- **[Zod](https://zod.dev)** - Schema validation
- **[ES Modules](https://nodejs.org/api/esm.html)** - Node.js documentation
---
## π Example Workflow
Here's how a typical user would use these generators:
### Scenario: Create a MongoDB MCP Server
1. **Read Quick Start** (2 minutes)
- Understand the two paths
- Choose Path B (new project)
2. **Check Examples** (3 minutes)
- Find MongoDB example
- Review requirements
- Note dependencies needed
3. **Prepare Environment** (2 minutes)
```bash
cd ~/projects
mkdir mcp-mongodb
cd mcp-mongodb
```
4. **Copy & Customize Prompt** (5 minutes)
- Copy MongoDB example prompt
- Customize tools if needed
- Adjust environment variables
5. **Generate Code** (depends on AI)
- Paste to AI assistant
- Review generated structure
- Save files to disk
6. **Initialize Project** (5 minutes)
```bash
npm install
cp .env.example .env
# Edit .env with credentials
npm run build
npm run test-client
```
7. **VS Code Integration** (5 minutes)
- Create `.vscode/mcp.json`
- Update with absolute path
- Reload VS Code
- Test with Copilot
**Total Time: ~30 minutes from zero to working MCP server!**
---
## π Getting Started Now
1. **Choose your starting point:**
- [Quick Start Generator](../QUICK-START-GENERATOR.md) - For fast setup
- [Generator Examples](../MCP-GENERATOR-EXAMPLES.md) - For common use cases
- [Full Generator Guide](../MCP-PROJECT-GENERATOR-PROMPT.md) - For deep dive
2. **Pick your path:**
- Add tool to existing server β Use Path A
- Create new MCP server β Use Path B
3. **Copy a prompt and go!** π
---
## π Support
If you have questions:
1. Review the **Generator Usage Examples** for validation tips
2. Check **Common Pitfalls** in the main prompt guide
3. Refer to the MCP SDK documentation
4. Check this repository's source code as an example implementation
---
**Happy Generating! π**
*Last Updated: 2025-10-30*