Railway
One-click deploy
Skip local setup entirely. Provision the full stack, including Postgres, Redis, and volumes, on Railway in a few minutes.
- No local Docker required
- Managed Postgres, Redis, and volumes
- Add or remove connectors anytime
100% Free· Open source · Self-host or hosted
Example of the Claude chat app using the Automata PostgreSQL MCP server. The user asks Claude how monthly recurring revenue changed by plan over the last six months. Claude checks the database, lists the three tables in scope, is refused when it tries to query user_profiles because that table is outside the token's scope, then queries subscriptions and reports that Team revenue grew 76 percent while Starter has slipped since July.
The basics
A PostgreSQL MCP server connects your database to AI assistants through the Model Context Protocol. It gives tools like Claude and ChatGPT a small set of actions, such as listing tables, reading a schema, and running queries, so they can answer analytics questions from live data instead of you exporting CSVs and pasting results.
Automata is a free, open-source Postgres MCP server that adds the missing piece: a table allowlist and a query plan check before every tool call, so the AI only touches the tables you approve.
Why scope matters
Popular open-source servers run whatever SQL the model writes against every table the role can see. Automata enforces access table by table and checks each plan first.
| Capability | Typical PostgreSQL MCP | Automata |
|---|---|---|
| What the AI can read | Every table the database user can reach | Only the tables on the token allowlist |
| Writing data | Raw SQL, or a single read-only switch | A separate run-statement tool, off by default and capped by row count |
| Query checks | The statement is passed straight to the database | Every statement is checked against its EXPLAIN plan before it runs |
| Revoking access | Change the database password for every client | Revoke one token; other clients keep working |
| Remote clients (Claude.ai, ChatGPT) | Usually local stdio, with the connection string on your laptop | Streamable HTTP endpoint with bearer tokens; credentials stay on the server |
Comparing named servers? See the best PostgreSQL MCP servers in 2026, compared: Postgres MCP Pro, DBHub, pgEdge, MCP Toolbox, Supabase, Neon and more. If your database already lives on Supabase or Neon, that platform's own MCP server is often the better start; see Supabase MCP vs Automata and Neon MCP vs Automata. The original reference server, @modelcontextprotocol/server-postgres, is archived and unmaintained, so don't use it.
Token scope
analytics_ro@prod · table allowlist
public.subscriptions
Billing · 48k rows
public.invoices
Billing · 212k rows
public.events
Product analytics · 9.4M rows
public.user_profiles
Contains personal data
private.payroll
Finance
Out-of-scope query refused
public.user_profiles · table_outside_token_scope
Run it your way
The control layer protecting your messages and data should not be a black box. Read the code, verify the checks, and deploy Automata wherever your security model requires.
One-click deploy
Skip local setup entirely. Provision the full stack, including Postgres, Redis, and volumes, on Railway in a few minutes.
Free, forever
Run the Nuxt control plane and Postgres on your machine, VPS, or homelab. Add the WhatsApp or Telegram services only when you need those connectors.
Free tier available
Use the same connector and permission model without operating the services yourself. Free for one connection; Pro is $19/month after a 7-day trial.
Comparing Automata with other tools? Read Automata vs Neon, Automata vs Supabase, Muse vs Grok Bot, Best WhatsApp MCPs, Best Postgres MCPs, or see all comparisons.
Reference
Every tool is limited to the tables on the token. Disabled tools are never registered, so the AI cannot even try them.
get-database-inforeadReturns the server version, database name, connecting role, and the token table scope.
list-tablesreadLists only the tables in scope, with schema and name filters.
describe-tablereadReturns columns, keys, constraints, indexes, and comments for one in-scope table.
run-queryreadRuns one SELECT, WITH, VALUES, or TABLE statement in a read-only transaction, with paged results and a timeout, or returns its plan without running it.
run-statementwriteRuns one INSERT, UPDATE, DELETE, or MERGE. Disabled by default; oversized changes roll back in full.
Full parameters are in the MCP tools reference.
Setup
Add a database role that can only SELECT from the schemas and tables you want the AI to analyze. The role is the real security boundary.
Deploy Automata on Railway or your own server, paste the connection string, then create a connector token with a table allowlist. Write access stays off unless you add it.
Paste the endpoint into Claude, ChatGPT, Cursor, or any MCP client. Start with get-database-info to confirm it works.
claude mcp add --transport http automata \
https://mcp.getautomata.app/mcp/<connection-id> \
--header "Authorization: Bearer <connector-token>"In Claude.ai or Claude Desktop, open Settings → Customize → Connectors → Add → Add custom connector, paste the connection's own /mcp/<connection-id> URL from the token dialog, and add the token as an Authorization: Bearer request header. If your client can't set headers, use /mcp/<connector-token> instead. See all clients.
Clients
Every client follows the same pattern: a least-privilege database role, a connector token with a table allowlist, and the MCP URL over Streamable HTTP. Whichever client is asking, run-statement stays off unless you add it, and every query is checked against its EXPLAIN plan before it runs.
In Claude.ai or Claude Desktop, add a custom connector with the connection's /mcp/<connection-id> URL and the token as an Authorization: Bearer header. In Claude Code, it is the one command shown above. The guide starts with the read-only role.
Give Claude read-only Postgres accessChatGPT on the web adds Automata under Plugins as a custom MCP server, on plans that support them. It cannot send an Authorization header, so use the /mcp/<connector-token> URL. A self-hosted instance needs a public HTTPS URL.
Connect ChatGPT to PostgreSQLCursor supports remote MCP servers with custom headers, so add the connection's URL to mcp.json with the token in the Authorization header. Keep the token in an environment variable, not in a project file you commit.
MCP clients docsGrok Bot adds Automata as a custom connector with a bearer key. In Meta Muse, you ask Muse in a chat to create a custom connector; Meta does not review custom connectors, so keep the role read-only.
See the Grok Bot and Muse guidesGuides
Use cases
FAQ
A PostgreSQL MCP server, often just called a postgres MCP server, exposes a database to AI assistants through the Model Context Protocol, so tools like Claude or ChatGPT can inspect the schema and run queries instead of you exporting CSVs and pasting results. Automata adds a per-table allowlist and an EXPLAIN plan check before every query.
Yes. Automata is MIT licensed and free to self-host, including a one-click Railway template. The hosted version at mcp.getautomata.app is free for one connection, with telemetry always on; Pro is $19/month after a 7-day trial.
Only if you allow it. New PostgreSQL tokens start with read tools enabled and run-statement disabled. When you do enable it, it accepts only INSERT, UPDATE, DELETE, or MERGE, rolls back changes over the row limit, and refuses whole-table updates or deletes unless explicitly allowed.
Each statement is limited to one statement and checked with EXPLAIN before it executes. DDL, TRUNCATE, COPY, and unsafe functions are refused, and every table in the plan must be on the token allowlist.
No. Plan checks cannot see everything triggers or user-defined functions might do, so connect with a least-privilege role rather than a superuser or owner. The role is the boundary; the token scope guards against model mistakes.
Results come back in pages of up to 1,000 rows, with long cell values clipped, and a page over 8 MiB is refused rather than sent. Read queries time out after 10 seconds by default and can be raised to 120, and are cancelled on the database if the client disconnects.
Yes. In Claude.ai and Claude Desktop you add Automata as a custom connector, and in Claude Code with one command. ChatGPT adds it as a custom MCP server using the path-token URL, because it cannot send an Authorization header. Cursor works too. Whichever client you use, it reaches only the tables on its connector token, through the database role you connected with. Set up each client in the MCP clients docs.
Any client that supports remote MCP servers over HTTP, including Claude (web, desktop, and Claude Code), ChatGPT connectors, Cursor, and custom agents.
Self-host if your database should only ever be reached from infrastructure you control. Choose hosted if you want the same table-level permissions without operating the services yourself.