PlugWiki
AWS Labs PostgreSQL MCP Server logo

AWS Labs PostgreSQL MCP Server: Setup for Claude, Cursor and Other Apps

OfficialLocal
GetPyPIawslabs.postgres-mcp-serverawslabs/mcp/tree/main/src/postgres-mcp-serverDocs

Lets Claude and Cursor query your Aurora PostgreSQL and RDS PostgreSQL databases in plain English, read-only unless you allow writes.

This is an AWS Labs server that turns questions into SQL and runs them on your Aurora PostgreSQL or RDS PostgreSQL database. It runs on your computer with your own AWS credentials. It connects through the RDS Data API or directly over the PostgreSQL protocol.

SQL is read-only unless you add the write flag. The read-only check is best effort, so connect with a database user that can only read.

Good for

  • Developers who want to ask questions of an Aurora or RDS database
  • Analysts who prefer plain English over SQL
  • Cloud engineers who want to spin up an Aurora cluster by prompt

Works in

12 should work

Tap an app to see how to set it up and any known problems.

Install AWS Labs PostgreSQL MCP

Claude Code

  1. 1

    Copy this prompt.

    Add the AWS Labs PostgreSQL MCP server to Claude Code. Run this command:
    
    claude mcp add aws-labs-postgresql -- uvx awslabs.postgres-mcp-server
    
    Then check that it loaded and tell me if I need to sign in or restart.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires uv (Python).

Built from the package data we hold. Not yet tested by us.

Tools

  • Connects to a database

    Connects to a database and keeps the connection for the session. You choose Aurora or RDS and the RDS Data API or a direct connection.

    Try: “Connect to the postgres database in my Aurora cluster my-cluster in us-west-2 with the RDS Data API.”

    Network · connect_to_database

  • Checks if a connection exists

    Reports whether a connection is already set up for a database.

    Try: “Am I connected to the orders database?”

    Read · is_database_connected

  • Lists saved connections

    Returns the connection details the server has saved this session.

    Try: “Which databases am I connected to?”

    Read · get_database_connection_info

  • Shows a table's columns

    Returns a table's columns and comments.

    Try: “Show the columns of the customers table.”

    Network · get_table_schema

  • Runs a SQL query

    Runs SQL against the connected database. Without the write flag the server accepts only read queries and checks them with PostgreSQL's own parser.

    Try: “How many orders were placed last month, by country?”

    Write · run_query

  • Creates an Aurora PostgreSQL cluster

    Creates a new Aurora PostgreSQL cluster in your AWS account, which costs money. It runs as a background job.

    Try: “Create an Aurora PostgreSQL cluster named mycluster in us-west-2.”

    Write · create_cluster

  • Checks a background job

    Returns the status of a background job such as a cluster being created.

    Try: “Is the mycluster creation finished?”

    Read · get_job_status

Read from the source code

Permissions

medium risk · 3 things to watch

Medium risk

With the write flag it can change or delete data, and it can create Aurora clusters that cost money. Connect as a database user with read-only rights and leave the write flag off.

What it can do

Watch out for

  • Write mode allows data changes

    Only with the --allow_write_query flag, run_query can run inserts, updates and deletes. Treat a server started with that flag as high risk and switch it on only for tasks that need it. raw.githubusercontent.com

  • Cluster creation can cost money

    The create tool starts a new Aurora cluster in your AWS account whether or not the write flag is set. Ask the assistant to confirm the name and region first. github.com

  • The read-only check is best effort

    The README says the guard is defense in depth, not a security boundary. Use a database role that can only connect and select. raw.githubusercontent.com

Security advisories

No published security advisories as of Nov 2, 2026.

Technical details
Turning on read-onlyRead-only SQL is the default; adding --allow_write_query turns SQL writes on. The flag does not gate create_cluster, which can always create an Aurora cluster.
Talks toYour AWS account and database
Sign-in and keysYour AWS profile or keys for RDS and Secrets Manager. Database logins are kept in AWS Secrets Manager.

Questions

Is the AWS PostgreSQL MCP server official?

Yes. It is published by AWS Labs in the awslabs/mcp repository.

Can it run read-only?

Yes, by default. Only read statements run unless you add the write flag. The README calls the check best effort, so also use a read-only database user.

What does it connect to?

Amazon Aurora PostgreSQL and RDS for PostgreSQL. Aurora can use the RDS Data API or a direct connection, and RDS PostgreSQL uses a direct connection.

What credentials does it need?

AWS credentials, set with an AWS profile and region in the config. The database login is stored in AWS Secrets Manager.

Can I run it on a remote machine?

No. The README says the server can only run locally on the same machine as your assistant.

Can it delete data?

Only in write mode. Then the assistant can run any SQL your database user is allowed to run, including deletes.

Information

updated Nov 2, 2026

Publisher
Official
Package
awslabs.postgres-mcp-server
Registry
PyPI
Transport
stdio
Auth
token in env
License
Apache-2.0
Last commit
Oct 30, 2026

DocsGitHubPyPI

Other PostgreSQL MCP servers

Sources

Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.

Show all 2
  1. raw.githubusercontent.com · raw.githubusercontent.com
  2. github.com · github.com

Facts from the official MCP registry, GitHub, npm, PyPI and the Docker catalog. Updated Nov 2, 2026.