Postgres MCP server: a database your agent can use
A Postgres MCP server lets Claude or ChatGPT create tables, write rows and run SQL in a Postgres database through tools. Most are a program you start next to a database you already run, pointed at its connection string. superagnt is a marketing plugin for Claude and ChatGPT that helps businesses find customers through outbound, SEO and ads, and its one install includes a hosted Postgres database per workspace, next to the data tools that fill it, so a lead list or a weekly snapshot lands in a real table with no setup.
By the superagnt team // updated
Connect superagnt
Copy the setup prompt.
Your agent does the rest.
Install superagnt for me. It's the superagnt plugin from the github.com/superagnt/plugins marketplace, plus the superagnt MCP server (on Claude it's a connector I add in my browser; elsewhere I sign in through my browser). The setup guide for each kind of agent is at https://www.superagnt.com/install» the base connection serves the database tools, and the database is created on the first call. Nothing to switch on.
From Claude: a lookup saved to a table, then queried
“Get the search volume for postgres mcp and four related keywords, save them to a new table with today's date, and show me the table sorted by volume.”
- 01Check what the database is681 ms wall timenot charged→ call
agnt_db_sql{ "action": "execute_sql", "query": "select version();", "read_only": true }← result{ "rows": [ { "version": "PostgreSQL 18.7 (a21afb5) on aarch64-unknown-linux-gnu, compiled by gcc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0, 64-bit" } ] } - 02Look up the keywords829 ms wall time2.268 credits, $0.0227→ call
data_seo_keywords{ "action": "overview", "keywords": ["postgres mcp", "postgres mcp server", "supabase mcp", "mysql mcp", "sqlite mcp"], "response_format": "json" }← result{"items":[{"keyword":"mysql mcp","search_volume":390,"cpc":16.8,"competition":"LOW","competition_index":0.26,"difficulty":null,"intent":"navigational","volume_trend_yearly":-19,"top_of_page_bid_low":6.19,"top_of_page_bid_high":17.25,"core_keyword":null},{"keyword":"postgres mcp","search_volume":1300,"cpc":12.75,"competition":"LOW","competition_index":0.22,"difficulty":9,"intent":"informational","volume_trend_yearly":-28,"top_of_page_bid_low":3.36,"top_of_page_bid_high":14.16,"core_keyword":null,"avg_referring_domains":66.2},{"keyword":"postgres mcp server","search_volume":590,"cpc":12.13,"competition":"LOW","competition_index":0.29,"difficulty":18,"intent":"informational","volume_trend_yearly":-74,"top_of_page_bid_low":3.69,"top_of_page_bid_high":18.48,"core_keyword":null,"avg_referring_domains":61.3},{"keyword":"sqlite mcp","search_volume":140,"cpc":null,"competition":"LOW","competition_index":0.01,"difficulty":8,"intent":"informational","volume_trend_yearly":-57,"top_of_page_bid_low":null,"top_of_page_bid_high":null,"core_keyword":null,"avg_referring_domains":19},{"keyword":"supabase mcp","search_volume":2900,"cpc":14.29,"competition":"LOW","competition_index":0.02,"difficulty":15,"intent":"informational","volume_trend_yearly":-56,"top_of_page_bid_low":4.41,"top_of_page_bid_high":18.87,"core_keyword":null,"avg_referring_domains":44.3}]} - 03Make a table for the snapshot472 ms wall timenot charged→ call
agnt_db_sql{ "action": "apply_migration", "name": "create_keyword_snapshots", "query": "create table if not exists public.keyword_snapshots (\n id bigint generated always as identity primary key,\n keyword text not null,\n monthly_searches integer,\n cpc_usd numeric,\n difficulty integer,\n checked_on date not null default current_date\n);" }← result{ "success": true } - 04Save the lookup as rows331 ms wall timenot charged→ call
agnt_db_write{ "action": "insert", "table": "keyword_snapshots", "rows": [ { "keyword": "mysql mcp", "monthly_searches": 390, "cpc_usd": 16.8, "difficulty": null }, { "keyword": "postgres mcp", "monthly_searches": 1300, "cpc_usd": 12.75, "difficulty": 9 }, { "keyword": "postgres mcp server", "monthly_searches": 590, "cpc_usd": 12.13, "difficulty": 18 }, { "keyword": "sqlite mcp", "monthly_searches": 140, "cpc_usd": null, "difficulty": 8 }, { "keyword": "supabase mcp", "monthly_searches": 2900, "cpc_usd": 14.29, "difficulty": 15 } ] }← result{ "success": true, "affected_row_count": 5, "note": "Rows omitted to keep the response small. Pass `return_rows: true` if you need the inserted/updated row data." } - 05Query them back321 ms wall timenot charged→ call
agnt_db_sql{ "action": "execute_sql", "query": "select keyword, monthly_searches, cpc_usd, difficulty, checked_on\nfrom keyword_snapshots\norder by monthly_searches desc;", "read_only": true }← result{ "rows": [ { "keyword": "supabase mcp", "monthly_searches": 2900, "cpc_usd": "14.29", "difficulty": 15, "checked_on": "2026-11-18" }, { "keyword": "postgres mcp", "monthly_searches": 1300, "cpc_usd": "12.75", "difficulty": 9, "checked_on": "2026-11-18" }, { "keyword": "postgres mcp server", "monthly_searches": 590, "cpc_usd": "12.13", "difficulty": 18, "checked_on": "2026-11-18" }, { "keyword": "mysql mcp", "monthly_searches": 390, "cpc_usd": "16.8", "difficulty": null, "checked_on": "2026-11-18" }, { "keyword": "sqlite mcp", "monthly_searches": 140, "cpc_usd": null, "difficulty": 8, "checked_on": "2026-11-18" } ] }
Five calls, 2.6 seconds, 2.268 credits, all of it the keyword lookup. The database is real Postgres (18.7 here), and the table is an ordinary one: the next run adds this week's rows beside last week's, and a query compares them. Run it weekly with a schedule.
Postgres MCP servers, compared
| Server | Where it runs | Which database | Writes | In claude.ai |
|---|---|---|---|---|
| superagnt | Hosted, one URL | A Postgres per workspace, included; your own Postgres too | Yes; destructive statements need an explicit confirm | Yes, as a custom connector |
| Official reference server | A local process you start | Yours, by connection string | No, read-only by design | No: archived, and local servers aren't available in claude.ai |
| Microsoft postgres-mcp | A local process (npx) | Yours, which must be reachable | Whatever the database user can do | No, local |
| Postgres MCP Pro | Local, or one shared SSE server you host (Docker or Python 3.12+) | Yours | Configurable, with a read-only mode | Not as its README sets it up (Claude Desktop, or SSE on localhost) |
| Supabase MCP | Hosted | Your Supabase projects, on your Supabase account | Yes | Yes |
| Neon MCP | Hosted | Your Neon projects, on your Neon account | Yes, or read-only on request | Yes |
The reference server's npm package now reads "Archived and unmaintained; no security guarantees" (npm), and it was still downloaded 148,590 times in the week of Nov 11 to 17, 2026. Local servers also stay out of Claude on the web: Claude's help says servers configured in Claude Desktop aren't available in claude.ai, and a custom connector must be reachable from Anthropic's cloud (Anthropic).
Letting an agent write to Postgres without losing data
The vendors are blunt about it. Supabase calls prompt injection the attack vector unique to LLMs and says its own guard isn't foolproof (Supabase); Neon recommends its MCP server for development and testing only and says never to connect agents to production databases (Neon); Microsoft's README says anything the database user can do, the AI can do (Microsoft).
- Give the agent a database of its own: the workspace database holds what the agent finds, apart from your production data.
- superagnt refuses DROP, TRUNCATE and ALTER ... DROP unless the call says confirm_destructive: true, and a statement marked read-only fails if it would write.
- A hosted agent can be held to read-only, or to a list of tables, and new agents can't change the schema until you allow it.
- For your own Postgres, the role you create is the limit: grant SELECT for read-only, or pick the tables. See databases you connect.
Bring your own Postgres
Any reachable Postgres works: Supabase, RDS or a server you run. You create a role from a preset (read-only, read and write, or tables you pick), run it against your database, and paste the connection string; superagnt holds no admin credential, and the role's grants are exactly what an agent can do (databases you connect). The hosted workspace database is described on the workspace database docs.
Connect it to your app
Claude
- 01Open the prefilled Add custom connector dialog on claude.ai. One connector covers Claude on the web, Claude Desktop and Cowork.
- 02Click Add, then approve on the superagnt consent screen. It creates your superagnt account if you don't have one.
- 03Ask: “Make a table of the companies we talked about today and save them to it.”
Free plans can add one custom connector. On Team and Enterprise plans, an owner adds it under Organization settings, Connectors (Anthropic).
Claude Code
- 01In Claude Code, run
/plugin marketplace add superagnt/plugins, then/plugin install superagnt@superagntfor the superagnt skills. - 02Add superagnt to Claude as a connector with the prefilled dialog and click Add. Claude Code signed in with your Claude account picks it up.
- 03Start a new session.
- 04Ask: “Make a table of the companies we talked about today and save them to it.”
ChatGPT
- 01In ChatGPT on the web, go to Plugins, select the plus button, then Add custom MCP server.
- 02Name it superagnt, enter the server URL under Connection, and set Authentication to OAuth. The server URL is
https://mcp.superagnt.com/mcp. - 03Tick "I understand and want to continue", then select Create as a plugin. Sign in to superagnt when asked. No token needed.
- 04Install the plugin, then start a new chat, type @ and select superagnt.
- 05Ask: “Make a table of the companies we talked about today and save them to it.”
Codex
- 01In a terminal, run
codex mcp add superagnt --url https://mcp.superagnt.com/mcp, thencodex mcp login superagnt. The login opens a browser to approve. - 02Start a new Codex session.
- 03Ask: “Make a table of the companies we talked about today and save them to it.”
New to MCP? Start with What is an MCP server?, and see MCP vs API for the same database over REST. To load a spreadsheet, see Can Claude load a CSV into a database?, and for what Claude remembers between chats, Can Claude save data between chats?.
Common questions
01What is a Postgres MCP server?
An MCP server whose tools let Claude, ChatGPT or another AI app create tables, write rows and run SQL in a Postgres database. Most are a local program pointed at a database you run; superagnt's comes with a hosted database per workspace.
02Is the official Postgres MCP server still maintained?
No. The MCP project lists it among its archived reference servers, and its npm package reads "Archived and unmaintained; no security guarantees." It was read-only by design.
03Do I need to run a server to use Postgres with Claude?
For most Postgres MCP servers, yes: you start a local process with npx or Docker and a connection string, and such local servers aren't available in claude.ai. Hosted options are Supabase's and Neon's for their own platforms, and superagnt, whose install includes a hosted database.
04Is it safe to give an AI agent write access to Postgres?
Only to data you can afford to lose to a bad call. Keep production out of reach, give the agent its own database or a role scoped to the tables it needs, and use a server that refuses destructive statements unless you confirm them.
05Can superagnt use my own Postgres database?
Yes. Create a role from one of the presets, run it on your database, and paste the connection string. The role's grants decide exactly what an agent can do.
06What does the database cost?
Every superagnt plan includes the workspace database, with plan limits on tables, rows and storage; plans start at $49 a month, and the no-card trial includes $3 of data credits. Database calls aren't charged per call; data lookups are.
Give Claude a Postgres database and the data to fill it, in one install.
Every plan includes a workspace database next to the data tools. Plans from $49 a month; the no-card trial includes $3 of data credits.