Skip to content

[BUG] Unable to get remote mcp server running using streamable-http protocol #108

@sachinmalanki

Description

@sachinmalanki

Describe the bug
Unable to connect to remote mcp server using streamable-http transport protocol when running this as a docker image in k8s.

To Reproduce
Steps to reproduce the behavior:
Running as deployment -

  - apiVersion: apps/v1  
    kind: Deployment
    metadata:
      name: atlan-mcp-server
      namespace: ai
      labels:
        app: atlan-mcp-server
    spec:
      replicas: 1
      selector:   
        matchLabels:
          app: atlan-mcp-server
      template:  
        metadata:
          labels:
            app: atlan-mcp-server
        spec:
          containers:
          - name: atlan-mcp-server
            image: ghcr.io/atlanhq/atlan-mcp-server:latest
            imagePullPolicy: IfNotPresent
            # Add command and args based on server.py
            command: ["python"]
            args: 
            - "server.py"
            - "--host=0.0.0.0"
            - "--port=8080"  
            - "--path=/atlan"
            - "--transport=streamable-http"
            ports:
            - containerPort: 8080  
              name: http
              protocol: TCP
            env:
            # Required environment variables based on server.py
            - name: ATLAN_BASE_URL
              value: "https://xxx.atlan.com"
            - name: ATLAN_API_KEY
              valueFrom:
                secretKeyRef:
                  name: mcp-token
                  key: atlan_token
            # Transport configuration
            # - name: MCP_TRANSPORT
            #   value: "sse"
            # - name: MCP_HOST
            #   value: "0.0.0.0"
            # - name: MCP_PORT
            #   value: "8080"
            # - name: MCP_PATH
            #   value: "/atlan"
            # Logging configuration
            - name: LOG_LEVEL
              value: "DEBUG"  
            - name: FASTMCP_LOG_LEVEL
              value: "DEBUG"
            resources:
              requests:
                memory: "128Mi"
                cpu: "100m"
              limits:
                memory: "512Mi"
                cpu: "500m"
            securityContext:
              allowPrivilegeEscalation: false
              runAsNonRoot: true
              runAsUser: 1000
              # Remove readOnlyRootFilesystem as Python may need to write temp files
              # readOnlyRootFilesystem: true
              capabilities:
                drop:
                - ALL
          restartPolicy: Always
          securityContext:
            fsGroup: 1000

  - apiVersion: v1
    kind: Service
    metadata:
      name: atlan-mcp-server-service
      namespace: ai
      labels:
        app: atlan-mcp-server
    spec:
      selector:
        app: atlan-mcp-server
      ports:
      - name: http
        port: 8080
        targetPort: 8080
        protocol: TCP
      type: ClusterIP

Environment Information

  • OS: Linux
  • Package versions: [e.g. python-dotenv==1.0.0, pydantic==2.0.0]

Error Message

│                                                                                    Autoscroll:On      FullScreen:Off     Timestamps:Off     Wrap:Off                                                                                    │
│ /appuser/.venv/lib/python3.12/site-packages/pydantic/_internal/_config.py:295: PydanticDeprecatedSince20: Support for class-based `config` is deprecated, use ConfigDict instead. Deprecated in Pydantic V2.0 to be removed in V3.0. Se │
│   warnings.warn(DEPRECATION_MESSAGE, DeprecationWarning)                                                                                                                                                                                │
│ [07/30/25 09:18:21] INFO     Starting MCP server 'Atlan MCP       server.py:1219                                                                                                                                                        │
│                              Server' with transport                                                                                                                                                                                     │
│                              'streamable-http' on                                                                                                                                                                                       │
│                              http://0.0.0.0:8080/atlan                                                                                                                                                                                  │
│ INFO:     Started server process [1]                                                                                                                                                                                                    │
│ INFO:     Waiting for application startup.                                                                                                                                                                                              │
│ INFO:     Application startup complete.                                                                                                                                                                                                 │
│ INFO:     Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)                                                                                                                                                                 │
│ INFO:     10.160.193.80:25864 - "GET / HTTP/1.1" 404 Not Found                                                                                                                                                                          │
│ INFO:     10.160.196.26:12972 - "GET / HTTP/1.1" 404 Not Found                                                                                                                                                                          │
│ INFO:     10.160.193.80:53270 - "GET / HTTP/1.1" 404 Not Found                                                                                                                                                                          │
│ INFO:     10.160.196.26:37374 - "GET / HTTP/1.1" 404 Not Found                                                                                                                                                                          │
│ INFO:     10.160.193.80:12414 - "GET / HTTP/1.1" 404 Not Found                                                                                                                                                                          │
│ INFO:     10.160.196.26:6902 - "GET / HTTP/1.1" 404 Not Found  

Also getting this in the UI when port-forward -

{"jsonrpc":"2.0","id":"server-error","error":{"code":-32600,"message":"Not Acceptable: Client must accept text/event-stream"}}

Expected behavior
Expect to connect to localhost:8080/atlan endpoint when port-forward. I can confirm I can connect to it when I run it locally on stdio transport protocol

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions