Connect OpenClaw to PostgreSQL
What happens next
Set up in minutes
Choose where it runs
On your computer through your own OpenClaw, or hosted in the cloud. The rest of setup adapts to your choice:
Pick what it can do in PostgreSQL
A preset of real PostgreSQL operations. Each one becomes a tool the agent can call, and it can't touch anything outside the list.
Connect PostgreSQL
One sign-in. The agent acts through your account, scoped to the operations you picked.
Add your personal MCP link
The last step mints a private MCP URL for this agent and walks you through exactly this, with your real link filled in. The page flips to Connected the moment your OpenClaw first calls in. OpenClaw probes the server while adding it, so this lights up during openclaw mcp add.
Run this in your terminal
<your-link> is your personal server URL — setup mints it for you.
Exact capabilities
Tools OpenClaw gets
PostgreSQL
40 toolsExecute a SELECT query and return results as JSON
Execute an INSERT, UPDATE, DELETE, or other non-SELECT statement
Execute a statement with multiple parameter sets (batch operations)
Execute query with cursor for large result sets
Bulk import data to a table using COPY
Bulk export data from a table using COPY
List all tables in a schema
Get column metadata for a table
Get detailed information about a table including constraints and indexes
Create a new table
Drop a table
Truncate a table (remove all rows)
List all schemas in the database
Create a new schema
Drop a schema
List all databases in the PostgreSQL server
List all indexes in a schema
Create an index on a table
Drop an index
List all views in a schema
Create a view
Drop a view
List all sequences in a schema
Get the next value from a sequence (nextval)
Get the current value from a sequence (currval)
Set the current value of a sequence (setval)
List all functions in a schema
Call a PostgreSQL function
List all constraints for a table
List all triggers in a schema
List all installed extensions
Create/install an extension
List all database users
List all database roles
Explain a query's execution plan
Vacuum a table to reclaim storage and update statistics
Analyze a table to update statistics
Begin a new transaction
Commit the current transaction
Rollback the current transaction
Starting points
What you can build
Meet the runner
About OpenClaw
Good to know
Frequently asked questions
Keep exploring
More ways to connect
More tools for OpenClaw
Popular OpenClaw pairs
Use PostgreSQL with other agents
Make it yours
Open your OpenClaw agent in one click.
NoClick runs OpenClaw for you with PostgreSQL wired in as tools. Connect your account and run.