🗄️

PostgreSQL MCP Server

Updated June 2026✓ Official

The PostgreSQL MCP server, built by Anthropic, provides the PostgreSQL MCP server is an official Model Context Protocol server maintained by Anthropic that gives AI assistants read-only access to PostgreSQL databases. It is officially maintained and best for Database.

by Anthropic

About

The PostgreSQL MCP server is an official Model Context Protocol server maintained by Anthropic that gives AI assistants read-only access to PostgreSQL databases. By connecting Claude Desktop, Cursor, or VS Code to a running Postgres instance, developers can ask natural-language questions about their data schema, run exploratory SQL queries, inspect table structures, list available schemas, and analyze query results — all without leaving their AI chat interface. The server operates in read-only mode by design, preventing any accidental data mutations, making it safe to connect against production databases for reporting, debugging, and data exploration workflows. Core tools include executing SELECT queries, listing tables and schemas, describing column types and constraints, and inspecting indexes. Setup requires a running PostgreSQL instance and a standard connection string in postgres:// format. Install via npx using the @modelcontextprotocol/server-postgres package, passing your database URI as an argument. Teams use it to power data analysis conversations, generate schema documentation automatically, debug production data anomalies by asking Claude to inspect table contents, and build ad-hoc reports through natural-language SQL generation. Works with any PostgreSQL 12+ instance including Amazon RDS, Supabase, Neon, and self-hosted deployments.

Installation

npm / npx
npx @modelcontextprotocol/server-postgres postgres://localhost/mydb

Categories

Frequently Asked Questions

What is PostgreSQL MCP Server?
PostgreSQL is an MCP server built by Anthropic. The PostgreSQL MCP server is an official Model Context Protocol server maintained by Anthropic that gives AI assistants read-only access to PostgreSQL databases. By connecting Claude Desktop, Cursor, or VS Code to a running Postgres instance, developers can ask natural-language questions about their data schema, run exploratory SQL queries, inspect table structures, list available schemas, and analyze query results — all without leaving their AI chat interface. The server operates in read-only mode by design, preventing any accidental data mutations, making it safe to connect against production databases for reporting, debugging, and data exploration workflows. Core tools include executing SELECT queries, listing tables and schemas, describing column types and constraints, and inspecting indexes. Setup requires a running PostgreSQL instance and a standard connection string in postgres:// format. Install via npx using the @modelcontextprotocol/server-postgres package, passing your database URI as an argument. Teams use it to power data analysis conversations, generate schema documentation automatically, debug production data anomalies by asking Claude to inspect table contents, and build ad-hoc reports through natural-language SQL generation. Works with any PostgreSQL 12+ instance including Amazon RDS, Supabase, Neon, and self-hosted deployments.
Who built PostgreSQL MCP Server?
PostgreSQL MCP Server was built by Anthropic.
Is PostgreSQL MCP Server free?
Yes, PostgreSQL MCP Server has a free option. Free and open-source MCP server. PostgreSQL is free and open-source. Hosting costs depend on your infrastructure choice.
How do I install PostgreSQL MCP Server?
Install PostgreSQL MCP Server with npm: npx @modelcontextprotocol/server-postgres postgres://localhost/mydb
What does PostgreSQL MCP Server integrate with?
PostgreSQL MCP Server integrates with Claude Desktop, Cursor, VS Code, Windsurf, Cline.

Related Guides

How to Set Up MCP Servers with Claude Desktop: Complete Guide 2026

9 min readTutorials

What is Model Context Protocol (MCP)? The Complete Guide for 2026

9 min readExplainers

Best Database MCP Servers 2026: PostgreSQL, MySQL, SQLite & More

7 min readGuides

Top 10 Most Popular MCP Servers in 2026 (By Use & GitHub Stars)

6 min readLists

Best MCP Servers for React Developers in 2026

7 min readGuides

Best MCP Servers for Machine Learning Engineers in 2026

8 min readGuides

Best MCP Servers for Startup Founders in 2026

7 min readGuides

Best Free MCP Servers 2026: Open-Source Tools With No API Key Required

7 min readGuides

Best MCP Servers for Supabase Developers in 2026

8 min readGuides

Best MCP Servers for Python Developers in 2026

9 min readGuides

Best MCP Servers for Windsurf IDE in 2026

8 min readGuides

Best MCP Servers for TypeScript Developers in 2026

7 min readGuides

Best MCP Servers for Machine Learning Engineers in 2026

8 min readGuides

Best MCP Servers for API Development in 2026

7 min readGuides

Best MCP Servers for Go Developers in 2026

7 min readGuides

Best MCP Servers for Data Analysts in 2026

7 min readGuides

Best MCP Servers for Backend Development in 2026

10 min readGuides

Best MCP Servers for Finance Teams in 2026

6 min readGuides

Best MCP Servers for IoT Developers in 2026: Sensors, Devices & Home Automation

7 min readGuides

Best MCP Servers for WordPress Developers in 2026

6 min readGuides

Best MCP Servers for Business Analysts in 2026

8 min readGuides

Best MCP Servers for Ecommerce Teams in 2026

8 min readGuides

Best MCP Servers for Legal Teams in 2026

7 min readGuides

Best MCP Servers for Backend Developers in 2026

9 min readGuides

Best MCP Servers for Machine Learning Engineers in 2026

8 min readGuides

Most Popular MCP Servers in 2026: Top Tools Ranked by Usage

10 min readGuides

Best MCP Servers for Operations Teams in 2026

8 min readGuides

Best MCP Servers for Consulting Firms in 2026

8 min readGuides

Best MCP Servers for Customer Success Teams in 2026

8 min readGuides

Best MCP Servers for Ruby Developers in 2026

7 min readGuides

Best MCP Servers for Java Developers in 2026

8 min readGuides

Best MCP Servers for LLM App Developers in 2026

8 min readGuides

Best MCP Servers for API Testing and QA Engineers in 2026

7 min readGuides

Best MCP Servers for Data Scientists in 2026

8 min readGuides

Best MCP Servers for Blockchain and Web3 Developers in 2026

7 min readGuides

Best MCP Servers for E-Commerce Teams in 2026

8 min readGuides

Best MCP Servers for Healthcare Teams in 2026

7 min readGuides

Best MCP Servers for Sales Teams in 2026

8 min readGuides

Best MCP Servers for Product Managers in 2026

8 min readGuides

Best MCP Servers for SaaS Developers in 2026

8 min readGuides

Best MCP Servers for Email Marketing in 2026

8 min readGuides

Best MCP Servers for Rust Developers in 2026

8 min readGuides

Best MCP Servers for Go Developers in 2026

8 min readGuides

Best MCP Servers for Python Developers in 2026: Jupyter, Testing & More

9 min readGuides

Best MCP Servers for Web Scraping in 2026: Firecrawl, Bright Data & More

8 min readGuides

Best MCP Servers for Swift Developers in 2026: iOS, macOS & visionOS

8 min readGuides

Best MCP Servers for Prompt Engineers in 2026: Testing, Evaluation & Iteration

9 min readGuides

Best MCP Servers for Nonprofits in 2026: Grant Research, Donor Management & Impact Reporting

9 min readGuides

Best MCP Servers for Claude 4 in 2026 (Sonnet 4.6 & Opus 4.7)

9 min readGuides

Best MCP Servers for n8n Workflow Automation in 2026

8 min readGuides

MCP Servers for OpenAI Agents SDK: Complete Setup Guide 2026

9 min readGuides

Best MCP Servers for Zapier Users in 2026

8 min readGuides

Best MCP Servers for Android Developers in 2026

9 min readGuides

Best MCP Servers for PHP Developers in 2026

8 min readGuides

Best MCP Servers for Vue.js Developers in 2026: Complete Guide

9 min readGuides

Best MCP Servers for Healthcare Professionals in 2026

8 min readGuides

Best MCP Servers for TypeScript Developers in 2026

9 min readGuides

Best MCP Servers for GitHub Copilot: Supercharge VS Code Agent Mode

8 min readGuides

Best MCP Servers for Debugging: Fix Bugs Faster with AI Context

7 min readGuides

Best MCP Servers for Replit: Extend Your AI Agent with Real Tools

6 min readGuides

Best MCP Servers for SQL Developers in 2026

7 min readGuides

Best MCP Servers for Data Pipelines in 2026

8 min readGuides

Best MCP Servers for Blockchain Developers in 2026

8 min readGuides

Best MCP Servers for Django Developers in 2026

7 min readGuides

Best MCP Servers for Java Developers in 2026

7 min readGuides

Best MCP Servers for Data Analysts in 2026

7 min readGuides

Best MCP Servers for Next.js Developers in 2026

7 min readGuides

Best MCP Servers for Go Developers in 2026

7 min readGuides

Best MCP Servers for ML Engineers in 2026

8 min readGuides

Best MCP Servers for Stripe Developers in 2026

7 min readGuides

Best MCP Servers for GraphQL Developers in 2026

7 min readGuides

Best MCP Servers for Redis Developers in 2026

6 min readGuides

Best MCP Servers for .NET Developers in 2026

7 min readGuides

Best MCP Servers for Python Developers in 2026

7 min readGuides

Best MCP Servers for Node.js Developers in 2026

7 min readGuides

Best MCP Servers for Jupyter Notebook Users in 2026

7 min readGuides

Best MCP Servers for Zed in 2026: Supercharge the AI-Native Editor

6 min readGuides

Best MCP Servers for Deno Developers in 2026

6 min readGuides

Best MCP Servers for Bun Developers in 2026

6 min readGuides

Best MCP Servers for Warp Terminal in 2026

6 min readGuides

Best MCP Servers for Rust Developers in 2026

6 min readGuides

Best MCP Servers for Supabase Developers in 2026

6 min readGuides

Best MCP Servers for Neovim Users in 2026

6 min readGuides

Best MCP Servers for JetBrains IDEs in 2026

6 min readGuides

Best MCP Servers for OpenAI Platform Developers in 2026

6 min readGuides

Best MCP Servers for Svelte and SvelteKit Developers in 2026

6 min readGuides

Best MCP Servers for LangChain and LangGraph Developers in 2026

7 min readGuides

Best MCP Servers for Terraform Developers and DevOps Engineers in 2026

7 min readGuides

Best MCP Servers for Python Developers in 2026

8 min readGuides

Best MCP Servers for React Developers in 2026

7 min readGuides

Best MCP Servers for Windsurf in 2026

6 min readTools

Best MCP Servers for Kotlin Developers in 2026

7 min readGuides

Best MCP Servers for Elixir Developers in 2026

7 min readGuides

Best MCP Servers for Scala Developers in 2026

7 min readGuides

Best MCP Servers for FastAPI Developers in 2026

7 min readGuides

Best MCP Servers for Spring Boot Developers in 2026

7 min readGuides

Best MCP Servers for R Developers in 2026

7 min readGuides

Best MCP Servers for Ruby on Rails Developers in 2026

7 min readGuides

Best MCP Servers for Nuxt Developers in 2026

7 min readGuides

Best MCP Servers for Laravel Developers in 2026

7 min readGuides

Best MCP Servers for NestJS Developers in 2026

7 min readGuides

Best MCP Servers for Flask Developers in 2026

7 min readGuides

Best MCP Servers for Remix Developers in 2026

7 min readGuides

Best MCP Servers to Use with LM Studio in 2026

8 min readGuides

Best MCP Servers for Fintech Developers in 2026

9 min readGuides

Best MCP Servers for Manufacturing and ERP in 2026

8 min readGuides

Best MCP Servers to Use with Make.com in 2026: Supercharge Your Automations

8 min readGuides

Deploying MCP Servers to AWS Lambda: A Complete Guide for 2026

10 min readDeployment

MCP Server Secrets Management: How to Secure API Keys and Credentials

9 min readSecurity

Best MCP Servers for Government Agencies and Public Sector Teams

8 min readUse Cases

Deploying MCP Servers to Supabase: Edge Functions, Postgres & Realtime

11 min readDeployment

MCP Servers for Data Pipelines: Orchestrate ETL and Data Flows with AI

10 min readUse Cases

MCP Servers for Customer Support: AI-Powered Ticket Triage and Resolution

10 min readUse Cases

MCP Servers for Healthcare: AI Workflows for Clinical and Admin Teams

11 min readIndustries

MCP Integration Guide: Claude Desktop

9 min readIntegrations

MCP Servers for Insurance: Automate Claims, Underwriting & Policy Workflows in 2026

10 min readIndustries

MCP Servers for Procurement: Automate Purchase Orders, Vendor Management & Approvals

9 min readUse Cases

MCP Integration Guide: JetBrains IDEs (IntelliJ, PyCharm, WebStorm) in 2026

8 min readIntegration Guides

Repo Health

Local install

Local/stdio install — runs on your machine, so there is no remote endpoint to verify live. Trust signal below is from the source repo.

Repo recency not yet available for this server.

Quick Info

Install Type
npm
Author
Anthropic
Categories
1
Integrations
5

Related Servers

🗄️

MongoDB MCP Server

The MongoDB MCP server is the official Model Context Protocol integration from MongoDB, giving AI assistants conversational access to both MongoDB Community Server and MongoDB Atlas cloud databases. With this MCP server, developers can ask Claude, Cursor, or Windsurf to query collections with natural-language filters that translate to MongoDB query syntax, run aggregation pipelines for analytics, insert and update documents, inspect collection schemas and index definitions, list databases and collections, and even manage Atlas clusters — all without leaving the AI interface. Common workflows include debugging slow queries by asking the AI to explain query plans, generating sample data for development environments, building dynamic dashboards by asking Claude to aggregate and summarize collection data, and automating routine maintenance like dropping orphaned indexes or counting documents matching conditions. The server works with MongoDB Atlas (via Atlas connection string) and self-hosted MongoDB 4.4+ instances. Authentication uses a standard MongoDB URI. Install with: `npx mongodb-mcp-server`. Compatible with Claude Desktop, Cursor, VS Code, Windsurf, and all MCP-compliant clients. With official backing from the MongoDB team and strong community adoption, this is the definitive MCP server for MongoDB AI integration.

Local
🗄️

SQLite MCP Server

The SQLite MCP server is an official Anthropic reference implementation that gives AI assistants direct, conversational access to SQLite databases — the world's most widely deployed database engine. Through natural language, you can ask Claude or Cursor to run SELECT queries, insert and update rows, inspect table schemas, create new tables, and generate business intelligence reports without writing a single SQL statement manually. Common use cases include exploring local data files, prototyping application schemas, auditing CSV imports, running ad-hoc analytics on app databases, and letting AI agents manage lightweight structured storage during agentic workflows. The server exposes tools for query execution, schema introspection, and memo-style business insights that synthesize query results into readable summaries. It requires a path to an existing .db file as a startup argument. Install with: npx @modelcontextprotocol/server-sqlite /path/to/your-database.db. Works with Claude Desktop, Cursor, VS Code, and all MCP-compatible clients. For developers who want AI to reason directly over structured data stored locally, the SQLite MCP server is the fastest path from question to answer without leaving your AI chat interface.

Local
🗄️

Redis MCP Server

The Redis MCP server is an official Anthropic reference implementation that lets AI assistants interact with Redis key-value stores for caching, session management, pub/sub messaging, and real-time data operations. Redis is the most popular in-memory data store, widely used for rate limiting, leaderboards, job queues, and ephemeral session state — and this MCP server brings all of that within reach of natural-language AI prompts. With it, you can ask Claude or Cursor to get and set string/hash/list/set/sorted-set values, inspect TTLs, flush specific keys, publish messages to channels, and scan keyspaces for debugging — all without opening redis-cli. Developers use it during backend debugging sessions, to inspect live cache state, to manage feature flags stored in Redis, and to wire AI agents into event-driven architectures via pub/sub. The server connects to a Redis instance via a connection URL (defaults to redis://localhost:6379). Install with: npx @modelcontextprotocol/server-redis. Works with Claude Desktop, Cursor, VS Code, and any MCP-compatible client. It is the reference implementation for Redis + AI integration in the MCP ecosystem.

Local
🗄️

Supabase MCP Server

The Supabase MCP server brings the power of your Supabase backend directly into your AI assistant, enabling conversational access to database, authentication, storage, and edge function features. With this server, developers can ask Claude or Cursor to query Postgres tables, inspect database schemas, manage user auth flows, upload or read files from Supabase Storage buckets, and test Edge Functions without ever leaving their IDE or chat window. This dramatically accelerates backend development and debugging by letting AI agents both read live state and perform safe, constrained operations against your project. Common use cases include asking the AI to "generate a SQL migration for a new profiles table and apply it", "check why the last auth webhook failed in the logs", or "list all users who signed up today and export their emails". It requires a Supabase Management API token and your project reference ID to authenticate. Perfect for full-stack developers building Next.js apps with Supabase, it effectively turns your AI into an expert database administrator and backend co-pilot that inherently understands your project's specific schema and row-level security policies.

Auth required
🗄️

Neon MCP Server

The Neon MCP Server (neondatabase/mcp-server-neon) is Neon's official, open-source bridge between natural language and the Neon serverless Postgres platform. It translates conversational requests into Neon API and SQL calls, letting Claude, Cursor, VS Code, and other MCP clients create projects and branches, run queries, inspect schemas, and perform database migrations without hand-writing SQL or hitting the API directly. A standout capability is migration support built on Neon's branching: the server can spin up a branch, apply and test a schema change there, and only then merge it — so an assistant can safely run "add a created_at column to the users table" against an isolated copy first. The easiest setup is the remote hosted server at https://mcp.neon.tech/mcp, which supports both OAuth (no API key to manage) and API-key auth via the Authorization header; run `npx neon@latest init` for one-command configuration of Cursor, VS Code (Copilot), and Claude Code, or `npx add-mcp https://mcp.neon.tech/mcp` to register it across all detected editors. Requires Node.js 18+ and a free Neon account; if IP Allow is enabled, whitelist the mcp.neon.tech static IPs. Neon explicitly scopes this server to local development and IDE workflows — its README warns against production use since natural-language commands can execute powerful, irreversible database operations, so always review actions before authorizing them.

Auth required

Sponsored

Better Stack

Free Plan

Get alerted when your APIs, browser tests, payment pipelines, or MCP server dependencies go down. Used by 100K+ developers.

Start monitoring free →