Skip to content

Commit ecaac65

Browse files
committed
feat: Add comprehensive multi-transport example configuration
- Complete example showing all 4 transport types (STDIO, HTTP, SSE, WebSocket) - Demonstrates modern transport configuration alongside legacy format - Includes realistic server examples with proper configuration - Shows namespace handling across different transport types - Documents best practices for multi-transport setups
1 parent 1f1c24d commit ecaac65

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Multi-transport configuration example - ALL TRANSPORTS NOW SUPPORTED!
2+
name: "Multi-Transport MCP Gateway"
3+
version: "1.0.0"
4+
description: "Demonstrates all supported MCP transport types"
5+
6+
servers:
7+
# STDIO Transport - Local MCP servers
8+
- name: "user-review-stdio"
9+
transport:
10+
type: "stdio"
11+
command: "npx"
12+
args: ["-y", "user-review-mcp"]
13+
env:
14+
NODE_ENV: "production"
15+
namespace: "review"
16+
enabled: true
17+
18+
# HTTP Transport - Remote MCP servers
19+
- name: "context7-http"
20+
transport:
21+
type: "http"
22+
url: "https://mcp.context7.com/mcp"
23+
apiKey: "YOUR_CONTEXT7_API_KEY"
24+
headers:
25+
User-Agent: "mcp-aggregator/1.0.0"
26+
namespace: "docs"
27+
enabled: true
28+
29+
# SSE Transport - Server-Sent Events for streaming
30+
- name: "streaming-mcp"
31+
transport:
32+
type: "sse"
33+
sseUrl: "https://stream.example.com/events"
34+
postUrl: "https://stream.example.com/messages"
35+
apiKey: "YOUR_SSE_API_KEY"
36+
headers:
37+
User-Agent: "mcp-aggregator/1.0.0"
38+
namespace: "stream"
39+
enabled: false # Enable when you have a real SSE MCP server
40+
41+
# WebSocket Transport - Real-time bidirectional communication
42+
- name: "websocket-mcp"
43+
transport:
44+
type: "websocket"
45+
url: "wss://ws.example.com/mcp"
46+
apiKey: "YOUR_WS_API_KEY"
47+
headers:
48+
User-Agent: "mcp-aggregator/1.0.0"
49+
namespace: "ws"
50+
enabled: false # Enable when you have a real WebSocket MCP server
51+
52+
# Backward compatibility - legacy format still works
53+
- name: "legacy-config"
54+
command: "npx"
55+
args: ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
56+
namespace: "legacy"
57+
enabled: false
58+
59+
settings:
60+
enableToolConflictResolution: true
61+
enableResourceConflictResolution: true
62+
enablePromptConflictResolution: true
63+
logLevel: "info"
64+
maxConcurrentConnections: 20 # Increased for multiple transports
65+
healthCheckInterval: 45000

0 commit comments

Comments
 (0)