PostgreSQL API and MCP server for AI agents
Let Claude, ChatGPT or your own agent read PostgreSQL. No PostgreSQL API key needed.
Add to your agent
Paste this into Claude Code, Cursor, Codex or any agent. It adds the server itself.
Read https://bowmark.ai/sites/postgresql.md and add Bowmark's PostgreSQL MCP server to my agent.Run this in a terminal, then sign in when the browser opens. Claude Code keeps its own sign-in (a claude.ai sign-in does not carry over), so add only this one server. Adding the Bowmark plugin as well lists every tool twice.
claude mcp add --transport http bowmark-postgresql https://api.bowmark.ai/mcp/site/postgresqlPress the button, or add this to ~/.cursor/mcp.json.
{
"mcpServers": {
"bowmark-postgresql": {
"url": "https://api.bowmark.ai/mcp/site/postgresql"
}
}
}Press the button, or run this in a terminal.
code --add-mcp '{"name":"bowmark-postgresql","type":"http","url":"https://api.bowmark.ai/mcp/site/postgresql"}'Run this in a terminal.
codex mcp add bowmark-postgresql --url https://api.bowmark.ai/mcp/site/postgresqlIn Claude, open Plugins → Add → Add custom connector, paste this URL, and pick Sign in now.
https://api.bowmark.ai/mcp/site/postgresqlIn ChatGPT, open Plugins, press +, choose Add custom MCP server and paste this URL.
https://api.bowmark.ai/mcp/site/postgresqlAny MCP client that takes a remote (streamable HTTP) server: give it this URL.
https://api.bowmark.ai/mcp/site/postgresqlFunctions
Open a function to see its parameters and run it with your own API key.
getDocPageReads one page of the official PostgreSQL manual by url, path or page name and returns its title, chapter, sections, prev/next links and prose as…POST /v1/sites/postgresql/getDocPage
Parameters
curl -X POST https://api.bowmark.ai/v1/sites/postgresql/getDocPage \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"page":"sql-select"}'import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.postgresql.getDocPage("sql-select");import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.postgresql.getDocPage("sql-select"))Responsereturns postgresqlDocPageinterface postgresqlDocSection { id: string; title: string; } interface postgresqlDocPage { url: string; version: string | null; title: string; chapter: string | null; text: string; sections: postgresqlDocSection[]; prevUrl: string | null; nextUrl: string | null; }listVersionsLists every PostgreSQL major version with its latest minor release, current/supported flags and release and end-of-life dates.POST /v1/sites/postgresql/listVersions
Parameters
No parameters.
curl -X POST https://api.bowmark.ai/v1/sites/postgresql/listVersions \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{}'import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.postgresql.listVersions();import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.postgresql.listVersions())Responsereturns postgresqlVersion[]interface postgresqlVersion { major: string; latestRelease: string; current: boolean; supported: boolean; firstReleaseDate: string; latestReleaseDate: string; eolDate: string; }searchDocsSearches the PostgreSQL manual (a chosen version, or the whole site) and returns ranked hits with url, score and snippet.POST /v1/sites/postgresql/searchDocs
Parameters
curl -X POST https://api.bowmark.ai/v1/sites/postgresql/searchDocs \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"query":"vacuum","options":{}}'import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.postgresql.searchDocs("vacuum", {});import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.postgresql.searchDocs("vacuum", {}))Responsereturns postgresqlSearchResultsinterface postgresqlSearchHit { title: string; url: string; score: number | null; snippet: string; } interface postgresqlSearchResults { query: string; version: string | null; page: number; total: number; hits: postgresqlSearchHit[]; }