feat: Add Cloudflare integration for MCPhub#8
Conversation
- Add Cloudflare Worker for proxying requests to MCPhub - Add Cloudflare Tunnel setup script - Add client configuration generator - Add documentation for Cloudflare deployment - Add sample client configuration for Cloudflare Co-authored-by: Zeeeepa <zeeeepa@gmail.com>
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Join our Discord community for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
- Update Cloudflare Worker configuration with specific account details - Add deployment script for Cloudflare Worker - Update client configuration generator to support API keys - Generate client configuration for Cloudflare Worker - Add README for Cloudflare Worker Co-authored-by: Zeeeepa <zeeeepa@gmail.com>
- Use environment variables for sensitive information - Add validation for required environment variables - Improve error handling and user feedback Co-authored-by: Zeeeepa <zeeeepa@gmail.com>
Cloudflare Worker Integration UpdateI've updated the PR with the following changes:
Deployment Instructions
The worker will proxy requests to your MCPhub instance running on port 3001, making it accessible at |
Cloudflare Integration for MCPhub
This PR adds Cloudflare integration to MCPhub, allowing you to expose your MCPhub instance through Cloudflare with SSL/TLS encryption and custom domain support.
Features
Implementation Details
Cloudflare Worker
The Cloudflare Worker (
cloudflare-worker/src/index.js) proxies requests to the MCPhub SSE endpoint, handling:Cloudflare Tunnel Setup
The setup script (
scripts/setup-cloudflare-tunnel.sh) automates the process of:Client Configuration Generator
The generator script (
scripts/generate-client-config.js) creates client configuration for:Documentation
Comprehensive documentation (
docs/CLOUDFLARE_DEPLOYMENT.md) covers:Usage
Setup Cloudflare Tunnel:
chmod +x scripts/setup-cloudflare-tunnel.sh DOMAIN="pixeliumperfecto.co.uk" ./scripts/setup-cloudflare-tunnel.shGenerate Client Configuration:
Use the Generated Configuration:
{ "mcpServers": { "MCPhub": { "type": "sse", "url": "https://pixeliumperfecto.co.uk/sse", "keepAliveInterval": 60000, "owner": "admin" } } }Testing
This PR addresses the requirement to expose MCPhub through Cloudflare at pixeliumperfecto.co.uk:3000/sse.
💻 View my work • 👤 Initiated by @Zeeeepa • About Codegen
⛔ Remove Codegen from PR • 🚫 Ban action checks
Description by Korbit AI
What change is being made?
Add a Cloudflare integration for MCPhub by introducing a Cloudflare Worker and a setup for Cloudflare Tunnel, allowing secure access and management of an MCPhub instance through both local and public deployments.
Why are these changes being made?
The changes are made to enhance the accessibility and security of MCPhub by leveraging Cloudflare's network capabilities, including secure SSL/TLS connections, custom domain support, and Server-Sent Events (SSE) management. The integration efforts aim to provide a robust and scalable way to deploy MCPhub for local and public access, solving potential issues of direct server exposure and enhancing user management approach.