Skip to content

[Bug]: Gateway unable to register gateway or call tools on MacOS #625

@madhav165

Description

@madhav165

🐞 Bug Summary

Gateway unable to register servers or call tools on MacOS

🧩 Affected Component

Select the area of the project impacted:

  • mcpgateway - API
  • mcpgateway - UI (admin panel)
  • mcpgateway.wrapper - stdio wrapper
  • Federation or Transports
  • CLI, Makefiles, or shell scripts
  • Container setup (Docker/Podman/Compose)
  • Other (explain below)

🔁 Steps to Reproduce

  1. Run gateway with docker (non-ssl) on MacOS
docker run -d --name mcpgateway \
  --network=host \
  -e MCPGATEWAY_UI_ENABLED=true \
  -e MCPGATEWAY_ADMIN_API_ENABLED=true \
  -e JWT_SECRET_KEY=my-test-key \
  -e BASIC_AUTH_USER=admin \
  -e BASIC_AUTH_PASSWORD=changeme \
  -e AUTH_REQUIRED=true \
  -e DATABASE_URL=sqlite:///./mcp.db \
  ghcr.io/ibm/mcp-context-forge:0.4.0
  1. Start server
python3 -m mcpgateway.translate   --stdio "docker run --rm -i  -p 8888:8080 -e HOST=0.0.0.0 [ghcr.io/ibm/fast-time-server:latest](http://ghcr.io/ibm/fast-time-server:latest) -transport=stdio"   --port 8003
  1. Export token
export MCPGATEWAY_BEARER_TOKEN=$(python3 -m mcpgateway.utils.create_jwt_token \
    --username admin --exp 10080 --secret my-test-key)
  1. Register on gateway
curl --request POST \
  --url http://localhost:4444/gateways/ \
  --header "Authorization: Bearer $MCPGATEWAY_BEARER_TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "fast-time-server",
  "url": "http://localhost:8003/sse"
}'
  1. Call tool
curl --request POST \
  --url http://localhost:4444/rpc \
  --header "Authorization: Bearer $MCPGATEWAY_BEARER_TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "fast-time-server-get-system-time",
  "params": {
    "timezone": "UTC"
  }
}'

🤔 Expected Behavior

  1. Gateway should register
  2. Tool call should happen

📓 Logs / Error Output

ERROR [mcpgateway.services.gateway_service] GatewayConnectionError in group: (GatewayConnectionError('Failed to initialize gateway at http://localhost:8003/sse: unhandled errors in a TaskGroup (1 sub-exception)'),)
ERROR [mcpgateway] RPC error: Tool invocation failed: 'NoneType' object has no attribute 'auth_value'

🧠 Environment Info

You can retrieve most of this from the /version endpoint.

Key Value
Version or commit v0.4.0
Runtime Python 3.12
Platform / OS macOS
Container Docker

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageIssues / Features awaiting triage

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions