Open
Description
I'm getting an error when attempting to redirect to a different port similar error, but it may not be related:
gres: Error in MCP: SSE error: TypeError: fetch failed: connect ECONNREFUSED 127.0.0.1:8000, connect ECONNREFUSED ::1:8000
I'm using Cursor. Here's the relevant part in mcp.json:
"postgres": {
"type": "sse",
"url": "http://localhost:9080/sse"
}
I'm running this in Docker Compose. Here's that config:
postgres-mcp:
image: crystaldba/postgres-mcp:latest
hostname: postgres-mcp
ports:
- "9080:8000"
command: --access-mode=unrestricted --transport=sse
environment:
- DATABASE_URI=postgresql://postgres:postgres@localhost:5432/db_name
extra_hosts:
- "host.docker.internal:host-gateway"
If I change the ports to 8000:8000
everything works. I'm guessing that the port is hard-coded somewhere. Can this be changed to an environment variable or arg?
Also, it'd be nice if the access mode and transport could be environment variables too.
Metadata
Metadata
Assignees
Labels
No labels