4.6 KiB
4.6 KiB
MCP Gateway + Open-UI Deployment Checklist
✅ Completed Setup
Files Created/Modified:
- ✅
gateway-proxy/openai_routes.py- NEW - OpenAI API handlers - ✅
openai_adapter.py- NEW - Adapter class (optional) - ✅
gateway-proxy/gateway_proxy.py- MODIFIED - Added OpenAI routes integration - ✅
OPENAI_INTEGRATION.md- NEW - Technical integration guide - ✅
SETUP_OPEN_UI.md- NEW - Quick start guide - ✅
DEPLOYMENT_CHECKLIST.md- NEW - This file
What Was Added:
# In gateway_proxy.py:
from openai_routes import chat_completions, list_models
# Routes added:
Route("/v1/models", openai_models, methods=["GET"]),
Route("/v1/chat/completions", openai_completions, methods=["POST"]),
🚀 Deployment Steps
On Your Server (wherever docker-compose is running):
-
Navigate to gateway directory:
cd /path/to/MCP\ Servers/mcp-gateway/ -
Verify the files are in place:
ls -la gateway-proxy/openai_routes.py ls -la openai_adapter.py -
Restart the gateway:
docker compose restart mcp-gateway -
Verify startup was successful:
docker compose logs mcp-gateway | grep -i "openai\|v1"Expected output:
mcp-gateway | 2026-03-30 09:15:42 - mcp-gateway - INFO - OpenAI-compatible endpoints registered at /v1/* -
Test the endpoint:
curl -H "Authorization: Bearer rIoRseJSR9rqwl5bp4CEOyOUKdymaoJnAsT-y752BDi2qD9jJYbgd8sWkiQIGMtz" \ https://mcp.wilddragon.net/v1/models
📋 Open-UI Configuration
After restart, configure Open-UI:
Location: Admin Panel → Settings → Connections
- Scroll to "Direct Connections"
- Toggle ON (if not already enabled)
- Add New Connection
- Fill in:
API Base URL: https://mcp.wilddragon.net/v1 API Key: rIoRseJSR9rqwl5bp4CEOyOUKdymaoJnAsT-y752BDi2qD9jJYbgd8sWkiQIGMtz - Save
In Chat:
- Model selection:
mcp-gateway - Start chatting!
🔒 Security Notes
Bearer Token
- Current token:
rIoRseJSR9rqwl5bp4CEOyOUKdymaoJnAsT-y752BDi2qD9jJYbgd8sWkiQIGMtz - Keep secret: This token grants access to all MCP tools
- Share carefully: Only give to trusted Open-UI instances
- Rotate if needed: Generate a new token with the gateway's token generation
HTTPS Only
- Ensure
https://mcp.wilddragon.nethas a valid SSL certificate - Never use
http://in production
📊 What You Get
In Claude.ai:
- ✅ Full MCP protocol support (existing)
- ✅ All tools available via OAuth
In Open-UI:
- ✅ OpenAI-compatible API (
/v1/*) - ✅ Tool listing and discovery
- ✅ Bearer token authentication
- ✅ Streaming responses support
Services Connected:
- ✅ ERPNext (ERP data)
- ✅ Wave Finance (accounting)
- ✅ TrueNAS (storage)
- ✅ Home Assistant (automation)
🧪 Testing
Quick Test - List Models:
curl -H "Authorization: Bearer YOUR_TOKEN" \
https://mcp.wilddragon.net/v1/models
Full Test - Chat Request:
curl -X POST \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "mcp-gateway",
"messages": [
{"role": "user", "content": "What tools are available?"}
]
}' \
https://mcp.wilddragon.net/v1/chat/completions
⚠️ If Something Goes Wrong
Gateway won't start:
docker compose logs mcp-gateway
# Look for import errors or Python syntax errors
OpenAI endpoints not showing:
# Check if openai_routes.py was properly created
python3 -m py_compile gateway-proxy/openai_routes.py
Can't connect from Open-UI:
# Verify gateway is running
docker compose ps mcp-gateway
# Test connectivity
curl -k https://mcp.wilddragon.net/v1/models
📞 Support
This Setup Provides:
- MCP protocol - For Claude.ai (existing, working)
- OpenAI API - For Open-UI (newly added)
- Bearer tokens - For authentication (both)
- Multiple backends - ERPNext, Wave, TrueNAS, Home Assistant
Files to Reference:
SETUP_OPEN_UI.md- Step-by-step guideOPENAI_INTEGRATION.md- Technical detailsgateway-proxy/openai_routes.py- Implementationdocker-compose.yml- Service configuration
✨ Next Steps (Optional)
- Tool Execution: Implement actual tool calls (not just listing)
- Custom Prompts: Add system prompts to guide tool usage
- Logging: Track all API calls for debugging
- Rate Limiting: Protect against abuse
- Caching: Cache tool responses for better performance
You're all set! 🎉 Your MCP Gateway now works with both Claude.ai and Open-UI.