MCP Server Builder
Interactive CLI tool for creating new MCP (Model Context Protocol) servers from a template.
🎯 Overview
The MCP Server Builder is a standalone tool that helps you quickly scaffold new MCP servers with:
- Interactive configuration
- Template processing
- Dependency management
- Validation and error reporting
- Pleasant logging and progress tracking
🚀 Quick Start
Installation```bash
Clone the repository
git clone <repository-url>
cd mcp_server_builder
Make scripts executable
chmod +x mcp_server_builder.sh
chmod +x mcp_server_builder.py
### Usage
#### Using Shell Script (Recommended)```bash
./mcp_server_builder.sh
Using Python Script Directly```bash
python3 mcp_server_builder.py
#### With Output Directory```bash
./mcp_server_builder.sh my_server_name
# or
python3 mcp_server_builder.py my_server_name
📋 Requirements
- Python 3.10+
- pip (usually included with Python)
- bash (for shell script, macOS/Linux)
Note: The template is included in this repository, so no additional setup is needed!
🔧 Setup
1. Install Dependencies```bash
Install Python dependencies
pip install -r requirements.txt
Or with uv
uv pip install -r requirements.txt
### 2. Make Scripts Executable```bash
chmod +x mcp_server_builder.sh
chmod +x mcp_server_builder.py
3. Run the Builder```bash
Using shell script (recommended)
./mcp_server_builder.sh
Or using Python directly
python3 mcp_server_builder.py
**Note:** The template is included in this repository, so no additional setup is needed!
## 📖 Features
### Interactive Configuration
- Server name and description
- Resource type selection
- Database type selection
- Feature toggles (RAG, API, etc.)
- Port and Python version configuration
### Template Processing
- Automatic placeholder replacement
- File customization
- Dependency generation
- Configuration file updates
### Validation
- Python version check
- File structure validation
- Syntax validation
- Dependency checking
### Error Reporting
- Clear error messages
- Troubleshooting suggestions
- Build summary
- Next steps guidance
## 📁 Project Structure```
mcp_server_builder/
├── mcp_server_builder.py # Python builder script
├── mcp_server_builder.sh # Shell wrapper script
├── setup.sh # Setup script
├── README.md # This file
├── LICENSE # License file
├── .gitignore # Git ignore rules
├── requirements.txt # Python dependencies
├── pyproject.toml # Python package configuration
├── CHANGELOG.md # Version history
├── CONTRIBUTING.md # Contribution guidelines
├── template/ # MCP Server Template (included)
│ ├── mcp_server.py
│ ├── api_server.py
│ ├── core_logic.py
│ ├── init_database.py
│ ├── main.py
│ └── ...
├── docs/ # Additional documentation
│ ├── QUICKSTART.md
│ └── GIT_SETUP.md
└── tests/ # Test files
└── test_builder.py
🎨 Usage Examples
Basic Usage```bash
$ ./mcp_server_builder.sh
╔══════════════════════════════════════════════════════════════════════════════╗
║ MCP Server Builder - Shell Wrapper ║
╚══════════════════════════════════════════════════════════════════════════════╝
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Pre-flight Checks
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✓ Found Python 3.13.3
✓ Found pip 24.0
✓ All pre-flight checks passed!
[Interactive builder runs...]
✓ MCP server created successfully!
### With Output Directory```bash
$ ./mcp_server_builder.sh document-search
[Pre-flight checks...]
[Interactive configuration...]
✓ Server created in: document-search
🔍 How It Works
- Pre-flight Checks: Validates Python, pip, and template
- Configuration: Interactive prompts for server setup
- Template Processing: Copies and customizes template files
- Dependency Generation: Creates requirements.txt and pyproject.toml
- Installation: Optionally installs dependencies
- Validation: Checks setup and reports issues
- Summary: Shows what was done and next steps
📚 Documentation
- README.md - This file (overview)
- docs/QUICKSTART.md - Quick start guide
- docs/API.md - API documentation (if applicable)
- docs/CONTRIBUTING.md - Contribution guidelines
🛠️ Development
Running Tests```bash
python3 test_builder.py
### Contributing
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Test thoroughly
5. Submit a pull request
## 📝 License
[Specify your license here]
## 🤝 Support
- **Issues**: GitHub Issues
- **Discussions**: GitHub Discussions
- **Documentation**: See `docs/` directory
## 🙏 Acknowledgments
- Built for the Model Context Protocol (MCP)
- Template based on best practices from the MCP community
## 📦 Distribution
### As Standalone Tool
The builder can be distributed as:
- Git repository
- Standalone scripts
- Python package (with setup.py)
### Installation Methods
**From Git:**```bash
git clone <repository-url>
cd mcp_server_builder
./mcp_server_builder.sh
As Python Package (if setup.py provided):bash
pip install -e .
mcp-server-builder
🔗 Related Projects
- MCP Server Template - The template included in this repository
- Model Context Protocol - Official MCP documentation
📊 Status
- ✅ Interactive configuration
- ✅ Template processing
- ✅ Dependency management
- ✅ Validation
- ✅ Error reporting
- ✅ Shell wrapper
- ✅ Documentation
🚧 Roadmap
- [ ] Package as Python package
- [ ] Add more database types
- [ ] Support custom templates
- [ ] CI/CD integration
- [ ] Docker support
- [ ] Windows support
Made with ❤️ for the MCP community
