@microsoft/postgres-mcp
Microsoft's MCP server that connects a coding agent to any PostgreSQL database, whether local, on-premises or hosted on Azure, AWS or Google Cloud.
What it does
Microsoft's MCP server that connects a coding agent to any PostgreSQL database, whether local, on-premises or hosted on Azure, AWS or Google Cloud. Connection profiles are saved once from the command line, with passwords kept in the operating system keyring rather than in client configuration, and Microsoft Entra ID is used for Azure databases. The agent can run read-only queries, run statements that change data or schema, fetch create scripts for tables and other objects, load a CSV file with COPY, and collect performance metrics. Profiles allow writes unless set to read-only. It runs locally over stdio through npx, needs Node.js 22 and is marked as a preview.
Capabilities
- Save PostgreSQL connection profiles with keyring passwords
- Run read-only SQL queries
- Run DDL and DML statements when the profile allows writes
- Fetch create scripts for tables, indexes and functions
- Bulk-load a CSV file with COPY
- Collect server performance metrics
About
- Publisher
- Microsoft
- Tool
- PostgreSQL
Install
- Run this to add it to Any client:
npx -y @microsoft/postgres-mcp connection add local "postgresql://postgres@localhost:5432/postgres"
MCP servers and skills can run code on your computer and act on your data. Review the source before installing.
Details
| Fact | Value | Source |
|---|---|---|
| Type | MCP server | |
| Tool | PostgreSQL | |
| Publisher | Microsoft | source |
| Official status | Community (not published by the tool's vendor) | source |
| Status | Preview | source |
| Connection | Local (runs on your computer) | source |
| Can change data | Yes | source |
| Needs an API key or sign-in | Yes | source |
| Platforms | Linux, macOS, Windows | source |
| AI clients | Claude Code, Claude Desktop, Cursor, Visual Studio Code, Codex | source |
| Licence | Proprietary | source |
| Pricing | Not stated in its documentation | |
| Activity | Last commit Nov 5, 2026Version 0.3.081 GitHub starsDownload data not available (not on npm or PyPI) | source |
| Links | Repository Website npm: @microsoft/postgres-mcp |
Sources
- README (README.md)github.com/microsoft/postgres-mcp · Backs: AI clients, Can change data, Connection, Licence, Needs an API key or sign-in, Platforms, StatusNov 12, 2026
- GitHub repositorygithub.com/microsoft/postgres-mcp · Backs: Official status, Publisher, Activity, LicenceNov 10, 2026
- npm package recordnpmjs.com/package/@microsoft/postgres-mcpNov 14, 2026