Install adapter with Homebrew
Last updated
Install prest-mcp from the official pREST Homebrew tap so Cursor, Claude Desktop, and other stdio MCP clients can reach PostgreSQL through pREST’s /_mcp endpoint.
This page focuses on the adapter. For the pREST server formula (prestd on homebrew-core), see Start with Homebrew.
macOS (or Linux with Homebrew)
pREST v2.1.0+ running with /_mcp available (local is fine)
Confirm MCP discovery:
curl -s http://localhost:3000/_mcp | headOne-shot:
brew install prest/tap/prest-mcpOr tap, then install:
brew tap prest/tap
brew install prest-mcpTap repository: prest/homebrew-tap.
The process waits on stdin for MCP JSON-RPC. Stop with Ctrl+C after a smoke test. Logs go to stderr only.
Minimal env for any stdio MCP client:
PREST_MCP_URL
yes
e.g. http://localhost:3000/_mcp
PREST_MCP_TOKEN
no
JWT when auth is enabled
PREST_MCP_TIMEOUT_MS
no
Default 30000
Example Cursor .cursor/mcp.json:
If the GUI app cannot find Homebrew’s PATH, use /opt/homebrew/bin/prest-mcp (Apple Silicon) or /usr/local/bin/prest-mcp (Intel).
Formula not found
brew update then brew install prest/tap/prest-mcp
Stale binary
brew upgrade prest-mcp or reinstall
Client spawn failed
Absolute path; restart the IDE
Connection refused
Start pREST; check PREST_MCP_URL
Full install options (Go, Docker, registry): Install pREST MCP Adapter
End-to-end: PostgreSQL to AI agent
Last updated
which prest-mcp
PREST_MCP_URL=http://localhost:3000/_mcp prest-mcp{
"mcpServers": {
"prest": {
"command": "prest-mcp",
"env": {
"PREST_MCP_URL": "http://localhost:3000/_mcp"
}
}
}
}