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.

Functions

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"}'
    Sign in to run
    Responsereturns postgresqlDocPage
    interface 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 '{}'
    Sign in to run
    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":{}}'
    Sign in to run
    Responsereturns postgresqlSearchResults
    interface postgresqlSearchHit {
      title: string;
      url: string;
      score: number | null;
      snippet: string;
    }
    
    interface postgresqlSearchResults {
      query: string;
      version: string | null;
      page: number;
      total: number;
      hits: postgresqlSearchHit[];
    }