Skip to content

h0rv/mcp-psql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mcp-psql

Based off of the official TypeScript implementation server: https://github.com/modelcontextprotocol/servers/tree/main/src/postgres

Setup

Install deps

uv sync --frozen --all-groups

Add your Postgres database URI:

cp .env.example .env
$EDITOR .env

Running

Dev Mode (stdio)

poe mcp-dev

Stdio

Install to Claude Desktop:

poe install-claude-desktop

Add to other clients:

{
  "mcpServers": {
    "psql": {
      "command": "/opt/homebrew/bin/uv",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "--with-editable",
        "/Users/robby/projects/mcp-psql",
        "mcp",
        "run",
        "/Users/robby/projects/mcp-psql/server.py"
      ],
      "env": {
        "DATABASE_URI": "postgresql://username:password@localhost/my-db"
      }
    }
  }
}

SSE

Run:

uv run --env-file .env server.py --transport sse

Add to client config:

{
  "mcpServers": {
    "psql": {
      "url": "http://localhost:8000/sse",
    }
  }
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages