使用说明
MCP Auto-Builder Skill
Autonomous MCP (Model Context Protocol) server generator for Claude Code.
What It Does
Generates complete, production-ready MCP servers from natural language descriptions:
- FastMCP server code with all tools
- Docker containerization with security hardening
- Comprehensive test suite
- Complete documentation
- Automatic Claude Desktop integration
Usage
Just describe what you want:
"Create an MCP server that lets me manage my GitHub repositories"
"I need an MCP server to check my Google Calendar"
"Build an MCP server for querying my PostgreSQL database"
Claude will ask clarifying questions and generate everything automatically.
Prerequisites
- Python 3.11+
- uv package manager
- Docker (optional, for containers)
Install uv:
curl -LsSf https://astral.sh/uv/install.sh | sh
Generated Project Structure
~/mcp-servers/[project-name]/
├── src/[module]/server.py # FastMCP server with tools
├── tests/test_server.py # Comprehensive test suite
├── Dockerfile # Docker configuration
├── docker-compose.yml # Docker Compose setup
├── pyproject.toml # Python project config
├── README.md # Full project documentation
└── USAGE.md # Detailed setup guide
Supported Services
Pre-built Patterns
Version Control:
- GitHub, GitLab, Bitbucket
Communication:
- Slack, Discord, Microsoft Teams
Project Management:
- Jira, Linear, Trello, Todoist
Calendar & Scheduling:
- Google Calendar, Outlook Calendar
Databases:
- PostgreSQL, MySQL, MongoDB
Custom APIs:
- Any REST API with API key or OAuth
File Structure
mcp-auto-builder/
├── SKILL.md # Main skill (orchestration)
├── README.md # This file
├── reference/ # Technical documentation
│ ├── generation_workflow.md # Implementation notes
│ ├── code_templates.md # FastMCP patterns
│ ├── api_integration_patterns.md # Service patterns
│ ├── validation_checklist.md # QA procedures
│ └── troubleshooting.md # Common issues
└── templates/ # Jinja2 templates
├── server_base.py.jinja2 # Server code template
├── Dockerfile.jinja2 # Docker template
└── ...
Workflow
- Requirements Gathering - Interactive questions
- Project Scaffolding - Create directory structure
- Code Generation - Generate server with all tools
- Docker Configuration - Security-hardened containers
- Testing - Comprehensive test suite
- Integration - Update Claude Desktop config
- Handoff - Complete instructions to user
Example: GitHub Integration
User: Create an MCP server for GitHub
Claude: [Generates complete server]
Generated tools:
- create_issue(repo, title, body)
- list_repos(username)
- search_code(query)
- create_pr(repo, title, head, base)
Next steps:
1. Add token: echo "ghp_xxx" > secrets/github_token.txt
2. Test: uv run python src/github_mcp/server.py
3. Restart Claude Desktop
Troubleshooting
Skill Doesn't Activate
Use phrases like:
- "Create an MCP server"
- "Build an MCP server for [service]"
- "Integrate Claude with [API]"
Generation Fails
Check prerequisites:
which uv # uv installed?
python --version # Python 3.11+?
docker info # Docker running?
Generated Server Issues
See the generated project's USAGE.md:
cd ~/mcp-servers/[project-name]
cat USAGE.md
Common fixes:
- Add credentials to secrets/ directory
- Run
uv syncto install dependencies - Restart Claude Desktop
- Check Claude Desktop logs
Best Practices
-
Be specific in requests
- "Create a GitHub MCP server for managing issues"
- Better than: "I need GitHub integration"
-
Test immediately after generation
- Run local tests first
- Use MCP Inspector for debugging
- Verify in Claude Desktop
-
Customize as needed
- Generated code is a starting point
- Add more tools following patterns
- Extend functionality
-
Keep secrets secure
- Never commit secrets/ directory
- Use environment variables in production
- Rotate credentials regularly
Resources
MCP Documentation:
- Official Spec: https://modelcontextprotocol.io
- FastMCP: https://gofastmcp.com
Docker Resources:
- Docker MCP Guide: https://www.docker.com/blog/mcp-toolkit
Claude Code:
- Skills Documentation: https://docs.claude.com/en/docs/claude-code/skills
Version
v1.0.0
License
MIT License
Transform your ideas into working MCP servers in minutes!