Skip to content

Experiments with possibility to run mcp server inside docker container #41

@Kanaduchi

Description

@Kanaduchi

Hello!

I tried to run reportportal-mcp-server on the same instance as Report Portal and was not able to reach it over HTTP.

# docker-compose.yml (initial attempt)
reportportal-mcp:
  image: reportportal/mcp-server:latest
  container_name: reportportal-mcp
  logging:
    <<: *logging
  environment:
    RP_HOST: https://reportportal.domain.com/
    RP_API_TOKEN: token
    MCP_PORT: 4389
    MCP_TRANSPORT: sse
  ports:
    - "4389:4389"
  restart: always
  networks:
    - reportportal
  profiles:
    - ''

It looks like this MCP server doesn’t support the SSE transport.

To work around that, I wrapped it with mcp-proxy:

mcp-proxy.Dockerfile

# mcp-proxy.Dockerfile
FROM ghcr.io/sparfenyuk/mcp-proxy:latest

RUN apk add --no-cache docker-cli bash

ENTRYPOINT ["mcp-proxy"]

docker-compose.yml

reportportal-mcp-proxy:
  build:
    context: .
    dockerfile: mcp-proxy.Dockerfile
  container_name: reportportal-mcp-proxy
  restart: unless-stopped
  ports:
    - "4389:4389"
  environment:
    RP_HOST: https://reportportal.domain.com/
    RP_API_TOKEN: token
  volumes:
    - /var/run/docker.sock:/var/run/docker.sock:ro
  command: >
    --host 0.0.0.0
    --port 4389
    --allow-origin "*"
    --pass-environment --
    docker run -i --rm
      -e RP_HOST
      -e RP_API_TOKEN
      -e RP_PROJECT
      reportportal/mcp-server

With the proxy in place, HTTP works. I can connect from Cursor or any MCP inspector using:

{
  "mcpServers": {
    "reportportal": {
      "url": "https://reportportal.domain.com:4389/sse"
    }
  }
}

Suggestion: It might be helpful to add native SSE transport support directly in reportportal-mcp-server, so it can be deployed alongside Report Portal docker-compose file without requiring an external proxy.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions