Weaviate MCP: queries hang, gRPC port 50051 not published in Docker
Fixes the Weaviate MCP server hanging or failing on queries while simple REST calls work. Weaviate uses gRPC on port 50051 for vector operations, and Docker setups often do not publish it. The fix is mapping port 50051 in the Docker run. Use when REST works but queries stall; not for 401s.
TL;DR: Weaviate does vectors over gRPC on port 50051, and your Docker run probably only published 8080. REST calls work, queries hang. Add -p 50051:50051 to the container and restart it.
Query hangs / gRPC connection timeout to weaviate:50051Fix it
- Check how Weaviate was started:
docker ps --format "{{.Names}} {{.Ports}}" | grep weaviate If you see only 8080->8080 and no 50051, that is the bug.
- Recreate the container with both ports:
docker run -d --name weaviate -p 8080:8080 -p 50051:50051 semitechnologies/weaviate:latest In Docker Compose, add "50051:50051" under ports.
- Restart the MCP client so it reconnects.
Expected: queries complete instead of hanging.
When to use this
- REST calls to Weaviate (schema, health) work but vector queries hang or time out.
- Weaviate runs in Docker with only 8080 published.
When NOT to use this
- Everything fails including REST. Then Weaviate is down or the URL is wrong.
- Weaviate Cloud. Cloud exposes gRPC itself; this is a self-hosted Docker issue.
Compatibility
- weaviate/mcp-server-weaviate against self-hosted Docker Weaviate.
Why it happens
Weaviate moved its hot paths to gRPC for performance, but quickstart Docker commands historically published only the REST port. The MCP server's simple calls succeed over REST, masking the problem until a real vector query needs gRPC and blocks.
Edge cases
- Firewalls between the MCP host and the Weaviate host must allow 50051 too, not just 8080.
- Some clients fall back to REST for queries. Slower, but a workaround if you cannot open the port.
- In Kubernetes, expose 50051 on the Service, not just 8080.
Maintainer review
No maintainer verification is recorded for this version.
This records the version a maintainer checked. It does not assert that the version is the latest upstream release.