For the complete documentation index, see llms.txt. This page is also available as Markdown.

AI and MCP

Connect AI agents and IDEs to PostgreSQL through pREST’s read-only Model Context Protocol (MCP) endpoint. Use the same server that already exposes a REST API from PostgreSQL β€” no separate query service required.

pREST v2.1.0+ ships HTTP MCP at /_mcp. Clients that only speak stdio (Cursor, VS Code / Copilot, Claude Desktop, and many others) use the official pREST MCP Adapter (prest-mcp) as a transport bridge.


What you get

Piece
Role

pREST /_mcp

Read-only MCP tools: list databases/schemas/tables, describe columns, select rows (max 100)

prest-mcp adapter

Stdio ↔ HTTP bridge only β€” does not introspect schemas, generate SQL, or implement tools

pREST for Cursor

Optional Cursor plugin (rules and skills) β€” separate from the MCP binary

pREST for OpenClaw

Optional OpenClaw plugin (skills and examples) β€” separate from the MCP binary

Cursor / VS Code / Claude / OpenClaw / Cline / Continue
        ↓ stdio
   prest-mcp
        ↓ HTTP POST
   prestd /_mcp
        ↓
   PostgreSQL

Start here

  1. MCP Overview β€” architecture, adapter vs server, security

  2. Install pREST MCP Adapter β€” Homebrew, Go, Docker, MCP Registry

  3. Pick a client:

  4. Read-only PostgreSQL for AI β€” least-privilege role for agent access

  5. Optional agent plugins: pREST for Cursor Β· pREST for OpenClaw

End-to-end walkthrough: PostgreSQL to AI agent.


Protocol reference

Deep tools, auth, ACL, and JSON-RPC details stay in MCP over HTTP. This AI section focuses on install and client setup.


Next steps

Last updated