SERVER

PostgreSQL

Rank #1,944

glama/modelcontextprotocol/postgresql

A Model Context Protocol server that provides read-only access to PostgreSQL databases. This server enables LLMs to inspect database schemas and execute read-only queries.

Versions unknown
91,270 GitHub stars
by modelcontextprotocol (87 servers)View repository ↗
First listed
Dec 11, 2024
Last publish date
—
PURPOSE

What you can do with PostgreSQL

The original reference PostgreSQL server from the Model Context Protocol project: a single read-only query tool plus per-table schema resources. It now lives in the servers-archived repository and is no longer maintained.

Suitable tasks
  • Run read-only SQL queries against one database
  • Inspect column names and types per table
  • Try a minimal Postgres MCP setup for learning
CAPABILITIES AND LIMITATIONS

What PostgreSQL can and cannot do

Capabilities

One tool, query, runs SQL inside a READ ONLY transaction; table schemas are exposed as postgres://<host>/<table>/schema resources discovered from database metadata.

Documented tools
  • query
Limitations
  • Archived: the project README says these servers are no longer maintained and no security updates or bug fixes will be provided
  • Read-only only; no write or DDL path is documented
  • Connection URL (with credentials) is passed as a command-line argument
  • No timeouts, row limits or schema scoping are documented
  • The upstream advises using the actively maintained servers repository for production
REQUIREMENTS

What you need before using PostgreSQL

DeclaredNo credentialsNo credentials declared

The registry listing declares no required environment variables or authentication. This is declared metadata, not a verified install — the repository README is the authority.

Declared by Glama, last synced Oct 16, 2026. Not independently verified by MCP Toplist.

Runtime
Node.js via npx @modelcontextprotocol/server-postgres, or the mcp/postgres Docker image
Credentials
PostgreSQL connection URL as a command argument, e.g. postgresql://user:password@host:5432/db
Also needed
With Docker on macOS use host.docker.internal instead of localhost
INSTALLATION AND FIRST TASK

Connect PostgreSQL and confirm it works

  1. Add a server entry running npx -y @modelcontextprotocol/server-postgres postgresql://localhost/mydb (or docker run -i --rm mcp/postgres <url>)
  2. Replace the URL with your database name and credentials
  3. Restart the client; the server lists table schema resources automatically

Install configuration unavailable. No registry publishes a machine-readable install config for this server — follow the repository README.

First successful task

Ask the agent to "count the rows in my largest table" so it calls query.

Expected: A SELECT result returned from a READ ONLY transaction; any write attempt fails.

ALTERNATIVES

When to choose another server

  • MCP PostgreSQL Server#46,916

    You want the same read-only-by-default simplicity in a maintained server with timeouts and SSL options.

  • Postgres MCP#724

    You need a maintained server with restricted mode plus health and index tooling.

  • DBHub#63

    You want a maintained read-only gateway that also covers other databases.

Compared side by side in PostgreSQL MCP servers.

Other servers by modelcontextprotocol
View all modelcontextprotocol servers →
MAINTENANCE AND EVIDENCE

What changed, and when this was checked

First listed
Dec 11, 2024
Version history
Unavailable — no registry exposes versions and no release tags were found
Requirements evidence
Declared by Glama, last synced Oct 16, 2026. Not independently verified by MCP Toplist.
Profile checked
Oct 9, 2026 against README (archived), Archive notice
Ranking data as of
Oct 16, 2026
Registry sightings
  • Glama ↗listed since Apr 27, 2026 · still listed

Do you maintain PostgreSQL? to correct or enrich this profile.

VERSIONS

Version information unavailable

The registry that lists this server does not expose version metadata, and no release tags were found on the linked repository. MCP Toplist cannot say how, or whether, this server is versioned.

STANDING
#1,944of 144,396 active serversTop 5%

Ranks ahead of 142,452 of 144,396 servers on MCP Toplist.

Recent momentum
+6,340GitHub stars since Apr 27 (+7%)
BADGE

Show your rank

Maintain this server? Add the live rank badge to your README — it updates automatically as the leaderboard changes.

MCP Toplist: Top 5% of 144,396
Markdown
[![MCP Toplist](https://mcptoplist.com/badge/glama%2Fmodelcontextprotocol%2Fpostgresql.svg)](https://mcptoplist.com/server/glama%2Fmodelcontextprotocol%2Fpostgresql)
HTML
<a href="https://mcptoplist.com/server/glama%2Fmodelcontextprotocol%2Fpostgresql"><img src="https://mcptoplist.com/badge/glama%2Fmodelcontextprotocol%2Fpostgresql.svg" alt="MCP Toplist: Top 5% of 144,396" /></a>

Variants: append ?metric=score or ?metric=stars to the image URL.

FAQ

Frequently asked questions

Who maintains PostgreSQL?
PostgreSQL is maintained by modelcontextprotocol, which publishes 87 MCP servers (77 total versions) tracked on MCP Toplist.
Is PostgreSQL listed on the Official MCP Registry?
PostgreSQL is not on the Official MCP Registry. It is listed on Glama.
How many versions does PostgreSQL have?
Version information is unavailable for PostgreSQL: no registry that lists it exposes version metadata, and no release tags were found on its repository.
Where can I find the source code for PostgreSQL?
The source code for PostgreSQL is hosted at github.com/modelcontextprotocol/servers.
Used in projects

Do you run this server?

Community projects list the MCP servers behind real agents and apps. Publish yours and this page will link to it.

EXPLORE