From 308b71c698123c5c6684b9c79de04b20dd9fb422 Mon Sep 17 00:00:00 2001 From: Jim Clark Date: Tue, 17 Dec 2024 17:49:04 -0800 Subject: [PATCH] Remove env from postgres server * interpolation of env into command args is not supported --- src/postgres/README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/postgres/README.md b/src/postgres/README.md index f5e7b3a1..f5ace34c 100644 --- a/src/postgres/README.md +++ b/src/postgres/README.md @@ -26,12 +26,20 @@ To use this server with the Claude Desktop app, add the following configuration ### Docker +* when running docker on macos, use host.docker.internal if the server is running on the host network (eg localhost) +* username/password can be added to the postgresql url with `postgresql://user:password@host:port/db-name` + ```json { "mcpServers": { "postgres": { "command": "docker", - "args": ["run", "-i", "--rm", "ai/mcp-postgres", "host.docker.internal:5432/mydb"] + "args": [ + "run", + "-i", + "--rm", + "ai/mcp-postgres", + "postgresql://host.docker.internal:5432/mydb"] } } } @@ -66,4 +74,4 @@ docker build -t ai/mcp-postgres -f src/postgres/Dockerfile . ## License -This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository. \ No newline at end of file +This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.