Skip to content

Category: MCP

Supergateway: Makes Self-Hosting MCP Servers Much Easier

I recently came across Supergateway and it solved a problem I was running into with MCP servers.

I was looking for a cleaner way to work with multiple MCP servers without having to install a ton of separate services, keep random background processes running, or execute npx commands all over the server every time I wanted to expose a tool. Supergateway acts as a bridge between stdio-based MCP servers and transports like SSE, WebSockets, and Streamable HTTP, which made things much easier to centralize and manage.

What I found especially useful was being able to take existing MCP servers that normally only run locally over stdio and expose them in a more flexible way for remote access, containers, or shared environments. It simplified the overall setup and made my MCP environment feel a lot more organized instead of having dozens of individually managed processes everywhere.

It also seems to be becoming a pretty common approach in the MCP ecosystem for bridging transports and simplifying deployments, especially in Docker and self-hosted environments.

https://github.com/supercorp-ai/supergateway

Example

 mcp-openweathermap:
    image: supercorp/supergateway:latest
    container_name: mcp-openweathermap
    command: >
        --stdio "npx -y @tristau/openweathermap-mcp --apikey myKey"
        --port 8000
        --outputTransport sse
    ports:
      - 8000:8000        
    restart: unless-stopped
1 Comment

playwright/mcp localhost error

I kept running into a playwright/mcp localhost access issue when trying to connect to the container from outside Docker. By default, the service only allowed connections to localhost:8931, which prevented external access from the host machine or other containers.

After a lot of troubleshooting, this Docker Compose configuration resolved the issue and allowed external connections successfully.

Notes

  • This example uses Chromium in headless mode.
  • Port 8931 is exposed to the host machine.
  • PLAYWRIGHT_MCP_NO_SANDBOX=true can help in certain containerized environments.
  • For production deployments, consider restricting --allowed-hosts instead of using "*".
  mcp-playwright:
    image: mcr.microsoft.com/playwright/mcp
    container_name: mcp-playwright
    entrypoint: ["node", "/app/cli.js"]
    command: 
      - "--host"
      - "0.0.0.0"
      - "--port"
      - "8931"
      - "--allowed-hosts"
      - "*"  # Allows connections from your host machine
      - "--browser"
      - "chromium"
      - "--headless"
    environment:
      - PLAYWRIGHT_MCP_NO_SANDBOX=true
    ports:
      - "8931:8931"
    restart: unless-stopped
Leave a Comment