AI and MCP
Last updated
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.
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
β
PostgreSQLMCP Overview β architecture, adapter vs server, security
Install pREST MCP Adapter β Homebrew, Go, Docker, MCP Registry
Pick a client:
Other AI tools (Cline, Continue, Windsurf, OpenClaw, generic stdio)
Read-only PostgreSQL for AI β least-privilege role for agent access
Optional agent plugins: pREST for Cursor Β· pREST for OpenClaw
End-to-end walkthrough: PostgreSQL to AI agent.
Deep tools, auth, ACL, and JSON-RPC details stay in MCP over HTTP. This AI section focuses on install and client setup.
Install the adapter: Install pREST MCP Adapter or Homebrew tutorial
Run pREST locally: Get pREST Β· Distribution channels
Confirm discovery: curl -s http://localhost:3000/_mcp
Last updated