Replies: 2 comments 1 reply
-
|
Can you confirm whether it works correctly without Traefik, by accessing the MCP Gateway directly |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
The closest to working that I've got this so far is if I completely bypass the internal nginx service, but still have some client issues where the clients error when connecting with labels:
# Static files router (port 80) - lowest priority, catches everything else
traefik.enable: true
traefik.http.routers.mcpgateway.rule: Host(`mcpgateway.my.internal.domain`)
traefik.http.routers.mcpgateway.priority: 1
traefik.http.routers.mcpgateway.entrypoints: websecure
traefik.http.routers.mcpgateway.tls.certresolver: le
traefik.http.routers.mcpgateway.service: mcpgateway
traefik.http.services.mcpgateway.loadbalancer.server.port: 80
# API router (port 5234) - excludes websocket paths
traefik.http.routers.mcpgateway-api.rule: Host(`mcpgateway.my.internal.domain`) && PathPrefix(`/api`) && !PathPrefix(`/api/ws`)
traefik.http.routers.mcpgateway-api.priority: 3
traefik.http.routers.mcpgateway-api.entrypoints: websecure
traefik.http.routers.mcpgateway-api.tls.certresolver: le
traefik.http.routers.mcpgateway-api.service: mcpgateway-api
traefik.http.services.mcpgateway-api.loadbalancer.server.port: 5234
# WebSocket router (port 5234) - handles /api/ws paths
traefik.http.routers.mcpgateway-ws.rule: Host(`mcpgateway.my.internal.domain`) && PathPrefix(`/api/ws`)
traefik.http.routers.mcpgateway-ws.priority: 4
traefik.http.routers.mcpgateway-ws.entrypoints: websecure
traefik.http.routers.mcpgateway-ws.tls.certresolver: le
traefik.http.routers.mcpgateway-ws.service: mcpgateway-ws
traefik.http.routers.mcpgateway-ws.middlewares: websocket-headers
traefik.http.services.mcpgateway-ws.loadbalancer.server.port: 5234
# MCP router (port 5235) - strips /mcp prefix
traefik.http.routers.mcpgateway-mcp.rule: Host(`mcpgateway.my.internal.domain`) && PathPrefix(`/mcp`)
traefik.http.routers.mcpgateway-mcp.priority: 2
traefik.http.routers.mcpgateway-mcp.entrypoints: websecure
traefik.http.routers.mcpgateway-mcp.tls.certresolver: le
traefik.http.routers.mcpgateway-mcp.service: mcpgateway-mcp
traefik.http.routers.mcpgateway-mcp.middlewares: mcp-stripprefix
traefik.http.services.mcpgateway-mcp.loadbalancer.server.port: 5235
# Middlewares
traefik.http.middlewares.mcp-stripprefix.stripprefix.prefixes: /mcp
traefik.http.middlewares.websocket-headers.headers.customrequestheaders.Connection: upgrade
traefik.http.middlewares.websocket-headers.headers.customrequestheaders.Upgrade: websocket
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've been trying to get MCP Gateway running behind my Traefik v3 reverse proxy and am a bit stuck - when the client (Cline) tries to connect it sits there for a long time then eventually thinks the server timed out or closed the connection.
On the server side it see the connection and thinks its fine, then errors
I think I've tried just about every traefik label under the sun to make it work but no success:
Config:
Beta Was this translation helpful? Give feedback.
All reactions