
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
The stable, production-ready orchestrator for Model Context Protocol (MCP) servers
Transform any MCP server into a unified SSE gateway with proven reliability across TypeScript, Python, and other implementations.
MCP Runner (formerly MCP Gateway Orchestrator) is a minimalist, stateless orchestrator that transforms any MCP server into a production-grade SSE (Server-Sent Events) gateway. Built on John Carmack's engineering principles: every line justified, complexity eliminated, robustness through radical simplicity.
https://img.shields.io/badge/Docker-ezezzjzsh%2Funiversal--mcp--stable-blue?logo=docker](https://hub.docker.com/r/ezezzjzsh/universal-mcp-stable) https://img.shields.io/badge/Node.js-22%20LTS-green?logo=node.js]([***] https://img.shields.io/badge/License-MIT-yellow.svg](https://opensource.org/licenses/MIT)
bash# Deploy DataForSEO MCP Server (52 SEO/SERP tools) docker run -d -p 8765:8765 \ -e REPO_URL="https://github.com/dataforseo/mcp-server-typescript" \ -e PREFLIGHT_COMMANDS="npm install && npm run build" \ -e MCP_GATEWAY_CONFIG='{"input":{"type":"repo","protocol":"stdio","runCommand":"npx dataforseo-mcp-server"},"output":{"protocol":"sse","port":8765}}' \ ezezzjzsh/universal-mcp-stable:latest # Verify deployment curl http://localhost:8765/sse
bash# Clone and build git clone https://github.com/thinkbuddyai/mcp-runner.git cd mcp-runner docker build -t mcp-runner:local . # Run with local image docker run -d -p 8765:8765 \ -e REPO_URL="https://github.com/alexwohletz/language-server-mcp" \ -e PREFLIGHT_COMMANDS="npm install" \ -e MCP_GATEWAY_CONFIG='{"input":{"type":"repo","protocol":"stdio","runCommand":"npx @languages/language-server-mcp"},"output":{"protocol":"sse","port":8765}}' \ mcp-runner:local
mermaidgraph LR A[MCP Server] -->|STDIO/SSE/HTTP| B[MCP Runner] B --> C[SSE Port 8765] subgraph "Input Sources" D[Git Repository] E[Remote URL] F[Local Command] end subgraph "Core Components" G[index.ts - Orchestrator] H[entrypoint.sh - Supervisor] I[known-fixes.ts - Auto-healing] J[types.ts - Validation] end D --> A E --> A F --> A B -.-> G B -.-> H B -.-> I B -.-> J
| Variable | Required | Description | Example |
|---|---|---|---|
MCP_GATEWAY_CONFIG | ✅ | Main configuration JSON | See examples below |
REPO_URL | ⚠️ | Git repository URL (required for repo inputs) | https://github.com/user/repo |
PREFLIGHT_COMMANDS | ❌ | Setup commands to run before starting | npm install && npm run build |
LOG_LEVEL | ❌ | Logging verbosity | debug, info |
typescriptinterface Config { input: { type: "repo" | "url" protocol: "stdio" | "sse" | "streamableHttp" runCommand?: string // For repo inputs target?: string // For URL inputs port?: number // For network protocols options?: { // For URL inputs headers?: Record<string, string> oauth2Bearer?: string } } output: { protocol: "sse" // Always SSE port: number // Default: 8765 options?: { cors?: boolean | string | string[] healthEndpoint?: string | string[] baseUrl?: string ssePath?: string messagePath?: string } } }
Perfect for CLI-based MCP servers that communicate via standard input/output.
bashdocker run -d -p 8765:8765 \ -e REPO_URL="https://github.com/username/mcp-server" \ -e PREFLIGHT_COMMANDS="npm install && npm run build" \ -e MCP_GATEWAY_CONFIG='{ "input": { "type": "repo", "protocol": "stdio", "runCommand": "npm start" }, "output": { "protocol": "sse", "port": 8765 } }' \ ezezzjzsh/universal-mcp-stable:latest
For MCP servers that run as HTTP/SSE servers themselves.
bashdocker run -d -p 8765:8765 \ -e REPO_URL="https://github.com/username/sse-server" \ -e PREFLIGHT_COMMANDS="npm install" \ -e MCP_GATEWAY_CONFIG='{ "input": { "type": "repo", "protocol": "sse", "runCommand": "npm start", "port": 3001 }, "output": { "protocol": "sse", "port": 8765 } }' \ ezezzjzsh/universal-mcp-stable:latest
Connect to external MCP services.
bashdocker run -d -p 8765:8765 \ -e MCP_GATEWAY_CONFIG='{ "input": { "type": "url", "protocol": "sse", "target": "https://api.example.com/mcp", "options": { "oauth2Bearer": "token", "headers": { "X-API-Key": "key" } } }, "output": { "protocol": "sse", "port": 8765, "options": { "cors": true, "healthEndpoint": ["/health", "/status"] } } }' \ ezezzjzsh/universal-mcp-stable:latest
MCP Runner includes intelligent auto-healing that detects and fixes common deployment issues automatically:
| Issue | Detection | Automatic Fix |
|---|---|---|
Missing npm start script | Missing script: "start" | Uses node dist/index.js or node build/index.js |
Missing npm build script | Missing script: "build" | Uses npx tsc or removes build step |
| Python environment restrictions | externally-managed-environment | Adds --break-system-packages flag |
| Missing TypeScript | tsc: command not found | Installs TypeScript automatically |
| Missing package-lock.json | Build optimization | Uses npm install instead of npm ci |
| UV package manager missing | uv: command not found | Falls back to python -m or installs UV |
Some issues require manual configuration:
Deploy to Railway with automatic scaling and monitoring:
yaml# railway.toml [build] builder = "dockerfile" dockerfilePath = "Dockerfile" [deploy] startCommand = "/entrypoint.sh" healthcheckPath = "/health" healthcheckTimeout = 10 restartPolicyType = "on-failure" restartPolicyMaxRetries = 3 [[services]] name = "mcp-runner" port = 8765
yamlversion: '3.8' services: mcp-runner: image: ezezzjzsh/universal-mcp-stable:latest ports: - "8765:8765" environment: - MCP_GATEWAY_CONFIG=${MCP_CONFIG} - REPO_URL=${REPO_URL} - PREFLIGHT_COMMANDS=${PREFLIGHT} restart: unless-stopped healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8765/sse"] interval: 30s timeout: 10s retries: 3 resources: limits: memory: 1GB cpus: '0.5'
yamlapiVersion: apps/v1 kind: Deployment metadata: name: mcp-runner spec: replicas: 3 selector: matchLabels: app: mcp-runner template: spec: containers: - name: mcp-runner image: ezezzjzsh/universal-mcp-stable:latest ports: - containerPort: 8765 env: - name: MCP_GATEWAY_CONFIG valueFrom: configMapKeyRef: name: mcp-config key: config.json resources: requests: memory: "512Mi" cpu: "250m" limits: memory: "1Gi" cpu: "500m"
bash# Clone repository git clone https://github.com/thinkbuddyai/mcp-runner.git cd mcp-runner # Install dependencies npm install # Run tests npm test npm run typecheck # Build TypeScript npm run build # Test locally MCP_GATEWAY_CONFIG='{"input":{"type":"repo","protocol":"stdio","runCommand":"echo test"},"output":{"protocol":"sse","port":8765}}' \ node dist/index.js
Use the deployment helper for quick testing:
bash# Create deployment config cat > test-config.json << 'EOF' { "name": "test-mcp", "port": 8765, "repo": { "url": "https://github.com/dataforseo/mcp-server-typescript", "preflight": "npm install && npm run build" }, "config": { "input": { "type": "repo", "protocol": "stdio", "runCommand": "npx dataforseo-mcp-server" }, "output": { "protocol": "sse", "port": 8765 } } } EOF # Deploy ./deploy.sh test-config.json
bash# Check logs docker logs <container-name> # Verify configuration echo $MCP_GATEWAY_CONFIG | jq . # Test configuration locally node dist/index.js
bash# Find process using port lsof -i :8765 netstat -tulpn | grep 8765 # Kill process kill -9 <PID>
bash# For Azure DevOps -e AZURE_DEVOPS_ORG_URL="https://dev.azure.com/org" \ -e AZURE_DEVOPS_PAT="your_token" # For DataForSEO -e DATAFORSEO_LOGIN="your_login" \ -e DATAFORSEO_PASSWORD="your_password" # For API services -e API_KEY="your_key" \ -e API_SECRET="your_secret"
bash# Increase timeout -e PREFLIGHT_COMMANDS="npm install --timeout=600000" # Use legacy peer deps -e PREFLIGHT_COMMANDS="npm install --legacy-peer-deps" # Skip optional dependencies -e PREFLIGHT_COMMANDS="npm install --no-optional"
bash# Load testing ab -n 1000 -c 10 http://localhost:8765/sse # Memory monitoring docker stats <container-name> # Response time time curl -s http://localhost:8765/sse | head -1
| Server | Protocol | Tools | Repository |
|---|---|---|---|
| DataForSEO | STDIO | 52 | dataforseo/mcp-server-typescript |
| Language Server | STDIO | 3 | alexwohletz/language-server-mcp |
| DX MCP | STDIO | 2 | get-dx/dx-mcp-server |
| Filesystem | STDIO | 6 | @modelcontextprotocol/server-filesystem |
| Server | Status | Requirements |
|---|---|---|
| Azure DevOps | ✅ Infrastructure ready | Organization URL + PAT |
| Agentset AI | ✅ Infrastructure ready | API Key + Namespace |
| Paragon | ✅ Infrastructure ready | Project ID + Signing Key |
We welcome contributions! Please see our Contributing Guide for details.
git checkout -b feature/amazing)npm test)git commit -m 'Add amazing feature')git push origin feature/amazing)MIT License - see LICENSE for details.
MCP Runner
Universal MCP Server Orchestrator
⚡ Simple • 🛡️ Reliable • 🚀 Production Ready
https://hub.docker.com/r/ezezzjzsh/universal-mcp-stable • https://github.com/thinkbuddyai/mcp-runner • https://github.com/thinkbuddyai/mcp-runner/issues
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务