PostgreSQL Docs MCP
Provides access to official, versioned PostgreSQL documentation, enabling listing available documentation versions, searching within a specific version, and reading documentation pages as Markdown with pagination.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PostgreSQL Docs MCPlook up CREATE PUBLICATION in the PostgreSQL 15 docs and cite the page"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
PostgreSQL Docs MCP
A public, open-source Model Context Protocol server for the official, versioned PostgreSQL documentation.
It defaults to the current stable release and can search or read every online version—including archived, beta, and development documentation.
Tools
list_versions— list every documentation version available onlinesearch_docs— search within a specific PostgreSQL versionget_doc_page— read a documentation page as Markdown, with pagination for long pages
Related MCP server: Documentary MCP Server
Access and security
This is a read-only documentation server. It:
fetches only public pages from
www.postgresql.orgnever connects to a PostgreSQL database
does not need credentials, API keys, or environment variables
cannot execute SQL or modify PostgreSQL projects
Use it in Cursor
Install uv if needed,
then add this server to ~/.cursor/mcp.json:
{
"mcpServers": {
"postgres-docs": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/sav-maya/postgres-docs-mcp",
"postgres-docs-mcp"
]
}
}
}Restart Cursor after saving the file. The first launch downloads the server and
its dependencies. In Cursor Settings → Tools & MCP, postgres-docs should
appear as enabled with three tools.
Then ask Cursor questions normally. It calls the tools when documentation is needed. For example:
Which PostgreSQL documentation versions are available?Using the PostgreSQL 18 docs, explain logical replication conflicts.Look up CREATE PUBLICATION in PostgreSQL 15 and cite the source page.What changed in the JSON functions between PostgreSQL 16 and 18?
The version defaults to current. Mention a version in your prompt when you
need behavior from a specific release.
Run locally
Requires Python 3.10+ and uv.
git clone https://github.com/sav-maya/postgres-docs-mcp.git
cd postgres-docs-mcp
uv sync
uv run postgres-docs-mcpTo make Cursor launch the local clone, use an absolute path:
{
"mcpServers": {
"postgres-docs": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/postgres-docs-mcp",
"run",
"postgres-docs-mcp"
]
}
}
}The server follows the official
Build an MCP server
guide: Python 3.10+, MCP Python SDK 2.x, typed @mcp.tool() functions,
httpx2, and stdio transport. It never writes logs to stdout; logs go to
stderr so they cannot corrupt MCP JSON-RPC messages.
Troubleshooting
Server does not appear: Restart Cursor, then check Cursor Settings → Tools & MCP for an error beside
postgres-docs.uvxis not found: Install uv, or replace"uvx"in the configuration with the absolute path printed bywhich uvxon macOS/Linux orwhere uvxon Windows.First launch fails: Confirm that GitHub and PyPI are reachable. The first launch downloads the repository and Python dependencies.
A version or page is unavailable: Call
list_versionsfirst. PostgreSQL publishes unsupported releases in its manual archive, while unreleased documentation usesdevel.Server code looks stale: Add
"--refresh"before"--from"in theuvxarguments, then restart Cursor.
Development
uv run pytestRelated project
This MCP server provides authoritative, version-specific PostgreSQL reference material. For curated practitioner guidance on schema design, indexing, query optimization, and common pitfalls, see Postgres Skills.
npx skills add neondatabase/postgres-skillsLicense
This is a community project. It is not affiliated with the PostgreSQL Global Development Group.
This server cannot be deployed
Maintenance
Related MCP Connectors
Comprehensive PostgreSQL documentation and best practices, including ecosystem tools
Search and read the official MariaDB documentation for every MariaDB product, plus release notes.
Versioned documentation registry and semantic search for AI tools and coding assistants.
Provides access to Google's public developer documentation.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients to access and read mdbook documentation, including structure, content, and search.12 npm3MIT
- FlicenseNot gradedqualityDmaintenanceEnables creating, listing, and searching project-based documentation with Markdown content, table of contents, full-text search, and multi-client support via Streamable HTTP transport.-
- AlicenseNot gradedqualityDmaintenanceEnables querying private documentation with tools for version resolution, stale reference checking, and receipt export.MIT
- FlicenseNot gradedqualityCmaintenanceIndexes public documentation sites into PostgreSQL and exposes retrieval-only MCP tools for listing sources, searching with citations, and fetching documents.2 npm-