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

pREST for OpenClaw plugin

pREST for OpenClaw (prest/prest-openclaw) is an OpenClaw plugin on ClawHub (@prest/prest-openclaw). It provides skills, examples, and security guidance for building PostgreSQL-backed APIs with pREST. It is not the MCP binary and does not run pREST or PostgreSQL.

Component
What it is

prest-mcp

Stdio adapter that talks to /_mcp β€” see Install pREST MCP Adapter

prest-openclaw

OpenClaw plugin (skills + examples) that guides config, SQL routes, security review, and MCP setup

Use both together: install the adapter for live MCP tools, and the plugin for OpenClaw-native guidance.


What the plugin provides

Skill
Purpose

generate-config

Generate prest.toml, .env.example, optional Docker Compose

generate-sql-route

Parameterized SQL under /_QUERIES/

review-security

Audit configs, SQL, auth, and MCP exposure

setup-mcp

Wire prest-mcp and read-only Postgres for agents

explain-config

Plain-language prest.toml walkthrough

prest-core-guidance

Core pREST development rules

prest-security-guidance

Security defaults and warnings

prest-mcp-guidance

MCP and prest-mcp connection patterns

agent-prompts

Copy-paste prompts for common tasks

Examples include Docker Compose setups, SQL template routes, multi-database configs, and a read-only MCP workflow (examples/mcp-readonly/).

Repository: https://github.com/prest/prest-openclaw


Install from ClawHub

Enable the plugin in your OpenClaw config if needed, then restart the gateway:

Listing: clawhub.ai/prest/plugins/prest-openclaw


MCP setup

The plugin does not replace prest-mcp. After installing the plugin:

  1. Run pREST v2.1.0+ with /_mcp available

  2. Install the adapter: brew install prest/tap/prest-mcp β€” see Install pREST MCP Adapter

  3. Wire MCP in OpenClaw using prest-mcp and env vars

Example MCP config shape (from the plugin repo’s examples/mcp-readonly/openclaw-mcp.example.json):

Variable
Required
Description

PREST_MCP_URL

Yes

Full MCP URL, e.g. http://localhost:3000/_mcp

PREST_MCP_TOKEN

No

Bearer token when pREST auth is enabled

PREST_MCP_TIMEOUT_MS

No

HTTP timeout override (default 30000)

MCP Registry name: io.github.prest/prest


Plugin vs MCP checklist

Task
Use

Agent calls prest.list_databases / select tools

MCP via prest-mcp β†’ /_mcp

Agent follows pREST skills (config, SQL routes, security)

prest-openclaw plugin

Least-privilege DB access


Security

  • Never expose /_mcp, Postgres, or pREST publicly without authentication

  • Prefer a read-only PostgreSQL role for agent workflows

  • Use environment variables for secrets β€” never commit real credentials

  • Set access.restrict = true with explicit [[access.tables]] in production

  • Do not use write-capable database roles in MCP configs


Troubleshooting

Symptom
Fix

Skills not appearing

Confirm plugin is enabled; restart gateway; run openclaw plugins inspect prest

MCP connection fails

curl http://localhost:3000/_health; verify PREST_MCP_URL ends with /_mcp; set PREST_MCP_TOKEN if auth is on

prest-mcp not found

brew install prest/tap/prest-mcp or use absolute path

Publishing and validation issues: see the plugin README and OpenClaw ClawHub docs.


Next steps

Last updated