π A comprehensive CLI tool for rapidly creating, configuring, and deploying Model Context Protocol (MCP) servers
π Visit our website: modelcontextkit.com
The Model Context Protocol (MCP) is an open standard developed by Anthropic that enables AI applications (like Claude) to connect with external tools, data sources, and APIs in a standardized way. Think of it as "USB-C for AI applications" - it provides a universal connector between AI models and external systems.
β¨ Quick Setup: Generate production-ready MCP servers in minutes, not hours
π§ Multiple Backends: Support for databases, APIs, filesystems, web scrapers, email, and cloud storage
π― Interactive Wizard: Guided setup with intelligent configuration prompts
π Comprehensive Templates: Pre-built templates following MCP best practices
π Security First: Built-in security features and input validation
π§ͺ Testing Ready: Generated projects include test suites and examples
π Auto Documentation: Comprehensive documentation generation
π¨ Claude Desktop Integration: Automatic configuration for Claude Desktop
β
Production Ready: Generates syntactically correct, tested code that works out of the box
π§ Fixed Code Generation: Resolved indentation and syntax issues in generated MCP servers
π Corrected MCP Schema: Updated to use proper input_schema
format
π§ͺ Improved Tests: Updated test templates to use modern MCP patterns
π Fixed Resource URIs: Simplified resource implementations to avoid template issues
β¨ Enhanced Reliability: All backend types now generate working, compilable code
# Install base package
pip install modelcontextkit
# Install with specific backend support
pip install modelcontextkit[database]
pip install modelcontextkit[api]
pip install modelcontextkit[filesystem]
pip install modelcontextkit[webscraper]
pip install modelcontextkit[email]
pip install modelcontextkit[cloudstorage]
# Install with all backends
pip install modelcontextkit[all]
modelctx wizard
# List available backend types
modelctx list
# Create a database MCP server
modelctx create my-db-server --backend database
# Create an API integration server
modelctx create my-api-server --backend api
# View templates
modelctx templates
Connect to SQL databases (PostgreSQL, MySQL, SQLite) with built-in connection pooling and security.
Generated Tools:
execute_query(query: str)
- Execute SQL queries safelyget_table_schema(table_name: str)
- Get table structurelist_tables()
- List all tables
Configuration:
- Database connection parameters
- Connection pooling settings
- Query timeout and limits
Integrate with REST APIs with authentication, rate limiting, and error handling.
Generated Tools:
api_request(endpoint: str, method: str, data: dict)
- Make HTTP requestsget_api_status()
- Check API health
Authentication Support:
- Bearer tokens
- API keys
- OAuth2 flows
Access and manipulate local files and directories with security controls.
Generated Tools:
read_file(file_path: str)
- Read file contentswrite_file(file_path: str, content: str)
- Write to fileslist_directory(dir_path: str)
- List directory contentssearch_files(pattern: str, directory: str)
- Search for files
Scrape and parse web content with respect for robots.txt and rate limiting.
Generated Tools:
scrape_url(url: str)
- Extract content from web pagesextract_links(url: str)
- Get all links from a pagetake_screenshot(url: str)
- Capture page screenshots
Send and receive emails via SMTP/IMAP with support for attachments.
Generated Tools:
send_email(to: str, subject: str, body: str)
- Send emailslist_emails(folder: str, limit: int)
- List emails from folderread_email(email_id: str)
- Read specific email
Connect to cloud storage services (AWS S3, Google Cloud Storage, Azure Blob).
Generated Tools:
upload_file(local_path: str, remote_key: str)
- Upload filesdownload_file(remote_key: str, local_path: str)
- Download fileslist_objects(prefix: str)
- List stored objectsdelete_object(key: str)
- Delete objects
my-mcp-server/
βββ server.py # Main MCP server file
βββ requirements.txt # Python dependencies
βββ pyproject.toml # Python project metadata
βββ README.md # Project documentation
βββ .env.template # Environment variables template
βββ .gitignore # Git ignore rules
βββ config/
β βββ config.yaml # Main configuration file
β βββ claude_desktop_config.json # Claude Desktop integration
β βββ logging.yaml # Logging configuration
βββ src/
β βββ __init__.py
β βββ models/ # Data models
β βββ services/ # Business logic
β βββ utils/ # Utility functions
βββ tests/
β βββ __init__.py
β βββ test_server.py # Server tests
β βββ test_tools.py # Tool-specific tests
βββ docs/
β βββ API.md # API documentation
β βββ DEPLOYMENT.md # Deployment guide
βββ scripts/
βββ setup.sh # Setup script
βββ deploy.sh # Deployment script
The tool supports flexible configuration through:
- Interactive prompts during wizard mode
- Configuration files (YAML/JSON)
- Environment variables for sensitive data
- Command-line arguments for automation
Example configuration:
# config/config.yaml
server:
name: "my-api-server"
description: "API integration MCP server"
backend:
type: "api"
base_url: "https://api.example.com"
auth_type: "bearer"
rate_limit: 60
security:
validate_inputs: true
log_requests: true
timeout: 30
Generated servers automatically include configuration for Claude Desktop:
{
"mcpServers": {
"my-mcp-server": {
"command": "python",
"args": ["/path/to/my-mcp-server/server.py"],
"env": {
"API_KEY": "your-api-key",
"DATABASE_URL": "your-db-connection"
}
}
}
}
Each generated project includes:
- Unit tests with pytest
- Syntax validation - all generated code is syntactically correct
- MCP Inspector integration for testing
- Comprehensive test suites for all tools and resources
- Configuration validation and error handling
# Navigate to your generated project
cd my-mcp-server
# Install dependencies (if not done during creation)
pip install -r requirements.txt
# Validate the generated code syntax
python -c "import server; print('Server syntax OK')"
# Run the test suite
python -m pytest tests/ -v
# Test with MCP Inspector
npx @modelcontextprotocol/inspector python server.py
# Run the server directly
python server.py
- π Input validation and sanitization
- π‘οΈ Access controls and permission systems
- π Audit logging for all operations
- π Secure credential management
- π« SQL injection prevention
- π CORS and rate limiting
ModelContextKit generates high-quality, production-ready code:
- β Syntax Validation: All generated Python code passes syntax validation
- β MCP Compliance: Generated servers follow MCP protocol specifications
- β Type Safety: Proper type hints and schema definitions
- β Error Handling: Comprehensive exception handling and logging
- β Test Coverage: Generated test suites validate all functionality
- β Documentation: Auto-generated documentation and examples
# Create new MCP server
modelctx create <project-name> --backend <type> [options]
# Interactive wizard
modelctx wizard
# List available backends
modelctx list
# Manage templates
modelctx templates [list|add|remove]
# Generate documentation
modelctx docs <project-path>
# Deploy server (if configured)
modelctx deploy <project-name>
We welcome contributions! Please see our Contributing Guide for details.
This project is licensed under the MIT License - see the LICENSE file for details.
- π Official Website
- π Documentation
- π Bug Reports
- π¬ Discussions
- π§ Create an issue for support
Made with β€οΈ for the MCP community