- LIVE
- SYNCED
- ACTION
- HUMAN
Short answer
How do I keep my AI updated with live Postgres changes?
ElectricSQL streams changes from your Postgres database directly to your AI agent. This keeps your agent's context perfectly aligned with your live data without manual refreshes. You'll see how the sync engine handles the heavy lifting below.
Where the data goes.
Real-time data outcomes.
Once the sync is active, your agent gains immediate awareness of your database state.
LIVE
Instant context updates
The AI sees new rows or updated values immediately. It can respond to data changes without you asking it to re-scan the table.
SYNCED
Consistent state
Your agent's knowledge stays in lockstep with your Postgres instance. It prevents the hallucinations that happen when an AI works with old data.
ACTION
Triggered responses
Because the data is live, your agent can react to specific database events. It knows when a status changes or a new record arrives.
HUMAN
Manual oversight
The AI observes the data but doesn't change your database structure. You remain in control of the actual Postgres schema and write operations.
The workflow
What your AI does when data changes.
The sync engine handles the data movement so your agent can focus on the logic.
Capture changes
The engine watches your Postgres WAL to catch every insert, update, and delete. It turns these database events into a stream.
get_shapeMap the schema
The agent uses the current database structure to understand how to interpret the incoming stream. It learns the table shapes automatically.
get_shapeUpdate context
The new data is fed into the agent's active window. This ensures the next prompt you send uses the most recent information.
get_shapeNotify user
If the data change requires a decision, the agent flags the update. It presents the new information for your review.
get_shape
Try it
Copy these to start.
Use these prompts once you've connected ElectricSQL.
Starting points
These are starting points. Swap out the table names for your actual Postgres tables.
ElectricSQL Connector
You're all set. Choose your MCP client and follow the setup instructions.
https://edge.vinkius.com/vk_preview_oHJ3qu09kCH5uxqL3iEMeyWmY3KKUyxH9z2Dq8V7/mcpClaude Desktop
Follow the steps below to connect in seconds.
- 1In Claude Desktop, open Settings → Connectors.
- 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
- 3Click Add and start a new chat — ElectricSQL capabilities are ready to use.
{
"mcpServers": {
"electricsql-sync-engine-mcp": {
"url": "https://edge.vinkius.com/vk_preview_oHJ3qu09kCH5uxqL3iEMeyWmY3KKUyxH9z2Dq8V7/mcp"
}
}
}What are the most recent changes in the orders table?
Summarize the new users that just signed up in the last hour.
Check the inventory table and tell me if any stock levels dropped below 10.
Based on the latest updates in the support_tickets table, what is the most urgent issue?
Claude
ChatGPT
Cursor
VS Code
Windsurf
Claude Code
JetBrains
Cline
Start here
Connect ElectricSQL once, then ask.
Just provide your connection details. Your credentials stay encrypted, and you can find the full technical setup on the Connector page.
Connect ElectricSQL to your AIFAQ
How the sync behaves.
- 01
Can the AI change my Postgres data?
No. This connector is for reading and syncing data to the AI. It does not have tools to write, delete, or modify your database.
- 02
Does this work with any Postgres database?
Yes, as long as your instance supports logical replication for the sync engine to capture changes.
- 03
Will the AI delete my tables?
No. The AI only has read access to the data stream provided by the sync engine.
- 04
How much data can it sync?
The sync engine handles the stream, but the amount of data your AI can actually 'remember' depends on your AI client's context window.
- 05
Is the data sync real-time?
Yes. It uses streaming to push changes to the agent as they occur in the database.
More questions about ElectricSQL? The Connector page answers them. See everything the ElectricSQL Connector can do
Connect ElectricSQL to Claude, Cursor, ChatGPT & more
