Skip to content

trobuleshoot ENOENT #65

Open
Open
@maketeamake

Description

@maketeamake

Hi guys, previously i used official mcp postgres but decided to us your solution with unrestricted access.

I installed to Ubutntu via SSH, I am using cursor

added server like this:


{
  "mcpServers": {
    "postgres": {
      "command": "uv",
      "args": [
        "run",
        "postgres-mcp",
        "--access-mode=unrestricted"
      ],
      "env": {
        "DATABASE_URI": "postgresql://AAA:BBB@localhost:5432/rag_system"
      }
    }
  }
}

yes it did not worked with error below.

2025-04-22 14:30:46.791 [info] gres: Handling CreateClient action
2025-04-22 14:30:46.791 [info] gres: Starting new stdio process with command: uv run postgres-mcp --access-mode=unrestricted
2025-04-22 14:30:46.807 [info] gres: Handling CreateClient action
2025-04-22 14:30:46.807 [info] gres: Starting new stdio process with command: uv run postgres-mcp --access-mode=unrestricted
2025-04-22 14:30:46.814 [error] gres: Client error for command spawn uv ENOENT
2025-04-22 14:30:46.814 [error] gres: Error in MCP: spawn uv ENOENT
2025-04-22 14:30:46.815 [info] gres: Client closed for command
2025-04-22 14:30:46.815 [error] gres: Error in MCP: Client closed
2025-04-22 14:30:46.824 [info] gres: Handling ListOfferings action
2025-04-22 14:30:46.824 [error] gres: No server info found
2025-04-22 14:30:46.832 [error] gres: Client error for command spawn uv ENOENT
2025-04-22 14:30:46.832 [error] gres: Error in MCP: spawn uv ENOENT
2025-04-22 14:30:46.832 [info] gres: Client closed for command
2025-04-22 14:30:46.832 [error] gres: Error in MCP: Client closed
2025-04-22 14:30:46.842 [info] gres: Handling ListOfferings action

##Troubleshooting:

  1. this is working fine for me:
root@Ubuntu-2404-noble-amd64-base ~/rag # uv run postgres-mcp postgresql://AAA:BBB@localhost:5432/rag_system
[04/22/25 13:26:47] INFO     Starting PostgreSQL MCP Server in UNRESTRICTED mode                      server.py:537
                    INFO     Successfully connected to database and initialized connection pool   
  1. I also tried non-uv version with almost same error

  2. GPT suggested to update absolute uv path
    "command": "/usr/local/bin/uv",

and also even create a wrapper

#!/bin/bash
source /path/to/your/virtualenv/bin/activate
exec uv "$@"

but both solutions did not worked

user and password and IP is working fine ( I tried localhost and real IP too)

cursor suggested to check extra debug from console, here is below

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions