Last updated: November 2026
Meta Muse has no built-in Postgres connector. To connect Meta Muse to PostgreSQL, you add a remote PostgreSQL MCP server to Muse as a custom connector, and that server connects as a read-only Postgres role limited to the tables you choose. Setup takes about 15 to 20 minutes, most of it creating the role.
This guide uses Automata, a free, MIT-licensed, open-source PostgreSQL MCP server that you can use hosted (no Docker, nothing to deploy) or self-host. The role and safety advice apply to any server, and the comparison below covers where other options fit better.
What you need
| You need | Details |
|---|---|
| Muse access | The Muse app or muse.ai, signed in. Meta has announced Muse in the US, Japan, Singapore and Australia, and its partner news points to Canada too. Check Meta's newsroom for the current list. |
| A PostgreSQL database | Neon, Supabase, Amazon RDS, Railway or self-hosted. It must be reachable from Automata: hosted Automata connects over the internet, so allow it through your firewall. A read replica is better than your primary. |
| Automata | A hosted account at mcp.getautomata.app, or a self-hosted instance with a public HTTPS URL. |
| About 15 to 20 minutes | Most of it is step 1. |
How to connect Meta Muse to PostgreSQL
Muse never opens a database connection itself. It runs on a virtual machine in Meta's cloud and calls tools on the MCP server, and the server runs SQL as the role you gave it:
Muse
MCP client
- Calls run-query over HTTPS
- Writes the SQL
Stops: Sensitive actions you did not approve
Automata
MCP server
- Bearer token header
- Table allowlist, from the plan
- One read-only statement
Stops: Unshared tables, DDL, custom functions
Read-only role
Postgres grants
- SELECT on named tables
- Masked copies
Stops: Writes, ungranted tables
PostgreSQL
Read replica
- Hot standby
- Statement timeout
Stops: Any write, at the server
SELECT … FROM ordersAllowed: Passes every layer and returns a page of rowsSELECT … FROM paymentsRefused: Refused by Automata before a row is readEach layer can refuse on its own. The role decides what is possible at all. Automata decides which tables this token may reach and refuses anything else before a row is read. Because Muse runs in Meta's cloud, give it a public HTTPS URL. localhost would point at Muse's own machine, not yours, and a private-network address isn't reachable from the internet.
Step 1: Create a read-only Postgres role
Create a dedicated role for Muse. Never connect as a superuser or the table owner: a superuser bypasses permission checks and row-level security.
-- A dedicated login with no special powers
CREATE ROLE muse_reader LOGIN PASSWORD '<strong-password>'
NOSUPERUSER NOCREATEDB NOCREATEROLE NOREPLICATION NOBYPASSRLS
CONNECTION LIMIT 5;
-- Let it reach the database and one schema
GRANT CONNECT ON DATABASE app TO muse_reader;
GRANT USAGE ON SCHEMA public TO muse_reader;
-- Grant specific tables, never the whole schema
GRANT SELECT ON public.orders, public.order_items, public.signups TO muse_reader;
-- Read-only by default, and a time limit on every query
ALTER ROLE muse_reader SET default_transaction_read_only = on;
ALTER ROLE muse_reader SET statement_timeout = '15s';Set a statement_timeout. Muse writes its own SQL, and sooner or later one query will scan more than you expected. Fifteen seconds suits most reporting; raise it if a real report needs more.
Be careful with ALTER DEFAULT PRIVILEGES. It grants access to tables created in the future. That saves you re-granting after every migration, but on public it also means next month's payments table becomes readable without anyone deciding it should. Use it only on a schema built for sharing:
GRANT USAGE ON SCHEMA reporting TO muse_reader;
GRANT SELECT ON ALL TABLES IN SCHEMA reporting TO muse_reader;
-- Future tables that app_owner creates in reporting are readable too
ALTER DEFAULT PRIVILEGES FOR ROLE app_owner IN SCHEMA reporting
GRANT SELECT ON TABLES TO muse_reader;Share sensitive tables as a copy without the sensitive columns: a materialized view you refresh on a schedule, or a copy table. Column grants and plain views don't work with a table-scoped Automata token: it lists and allows only tables the role can read in full, and it checks the base tables a plain view reads, so a column-granted customers or a view over it is refused.
For production, use a read replica. default_transaction_read_only is a default that a session can change; a hot standby refuses writes at the server and keeps reports off your primary. The Claude read-only guide covers masked copies, row-level security and verifying the role.
Step 2: Add the database to Automata
Hosted: sign up at mcp.getautomata.app/signup. The free plan's one connection is enough, and there is no Docker or server to run. Self-hosted: deploy from the GitHub repo behind a public HTTPS URL.
Create a PostgreSQL database connection and paste the role's connection string, ideally pointing at the replica:
postgresql://muse_reader:<password>@replica.example.com:5432/app?sslmode=requireAutomata tests the connection before saving. Percent-encode @ or # in the password (%40, %23). On Supabase, use the Session pooler string, not the IPv6-only db.<ref>.supabase.co host. On Neon, use the connection string from the dashboard with sslmode=require. On RDS, allow Automata in the security group. On Railway, use the public URL unless Automata runs in the same project.
Step 3: Mint a scoped token
Muse authenticates to Automata with an API key, the same way as in our Muse WhatsApp guide. Automata doesn't use OAuth sign-in for connector tokens. Create one for Muse (New connector token):
- Name: such as
muse, so you recognize it when revoking. - Expires: 30 or 90 days.
- Actions: leave the defaults. PostgreSQL tokens start read-only:
get-database-info,list-tables,describe-tableandrun-query. Writes need the separaterun-statementtool, which has a row cap and is off unless you enable it. Leave it off. - Tables: choose Only selected tables and pick the tables you granted in step 1. Names are case-sensitive.
Click Create token and copy it. Automata shows it once and stores only a SHA-256 hash.
Anyone with it can query the tables it allows. Never type it into your conversation with Muse, a screenshot or a shared doc. If it leaks, revoke that one token in Automata; your database password doesn't change.
Step 4: Add Automata to Muse and test it
Meta's Connectors help page says that for a service "not yet available in the Connector list, you can ask Muse to create a Custom Connector," and that Muse keeps the credentials in its Secure Credentials Store. It also warns: "Meta doesn't review custom connectors or how they use your information." Add only servers you trust.
Ask Muse in chat. This is the route Meta documents. Meta doesn't publish a format for the request, so give every detail in one message, the same way as in our Muse WhatsApp guide:
Create a Custom Connector for a new remote MCP server, then connect to it:
Name: Automata Orders DB
Transport: remote streamable HTTP
URL: https://mcp.getautomata.app/mcp
Auth: API key sent as Authorization: BearerUse your own URL ending in /mcp if you self-host. When Muse asks for the key, enter your connector token in its secure credentials prompt, not as a normal chat message. Anything you type into the conversation can end up in your chat history, while the secure prompt stores the key with the connector. If Muse offers only an OAuth sign-in and no API key option, say so and ask it to use an API key sent as a bearer token.
In Settings. Go to Settings → Connectors. That screen lists Muse's catalog connectors, each with a Connect button, and it's where you disconnect a connector later. Meta doesn't document an option there to add a custom server, so use the chat route to create it, then manage it from this screen.
Test it with a harmless read. Muse lists the tools it found; a read-only token shows four. If run-statement appears, the token can write, so go back to step 3. Then ask:
Use Automata Orders DB to list the tables you can see.
Now ask for a table you didn't share, such as payments. Automata refuses before any row is read and names the table, and because the check reads the query plan, a view or CTE that reaches payments is refused too.
Things to ask Muse
These are starting points, not promises. Each works only for tables on the token's allowlist, and Muse may write the wrong SQL, so ask it to show the query until you trust the numbers.
- From WhatsApp on your phone. Meta lets you message Muse in WhatsApp. It doesn't say whether connectors run when you ask from there, so try a simple question first: "How many signups did we get yesterday, compared with the same day last week?" If it doesn't query the database, ask in the Muse app.
- Weekly revenue summary. "Every Monday at 9am, use Automata Orders DB to summarise last week's orders, revenue and average order value, and flag anything more than 20% off the week before." Muse can run recurring tasks, which continue until you cancel them.
- Quick lookup. "What's the status of order 48213, and when was it placed?"
- Funnel check. "Of the people who signed up in the last 30 days, how many placed a first order within 7 days? Show the SQL."
- Database plus WhatsApp chats. With the Muse WhatsApp connector added too: "Find the order numbers customers mentioned in the Support WhatsApp group today and look up their status." Both connectors come from Automata, each with its own token.
- Small-business check-in. "Which products sold most this month, and which haven't sold at all?"
Safety: what read-only access does and doesn't stop
Read-only Postgres access for AI is reasonably safe when the limits live outside the model. Here is what each layer covers, and what none of them do:
| Risk | Database role | Plan allowlist | Token scope |
|---|---|---|---|
| Writes and DDL (DROP, DELETE, UPDATE) | Stops it | Stops it | Stops it |
| Reading a table you did not allow | Partly | Stops it | Stops it |
| A runaway query (cross join, huge scan) | Partly | Partly | No |
| Sensitive columns sent to an AI provider | Partly | No | Partly |
| Prompt injection inside allowed rows | No | No | No |
| A leaked password or token | No | No | Partly |
Muse's own safeguards. Meta says Muse keeps connector credentials in its Secure Credentials Store and, by default, won't take important actions without your approval. You can set approvals per connector under Settings → Permissions. Choose Connectors, then Ask for some actions for Automata, which asks before every write action and important read actions. Keep that on, especially if you ever enable run-statement or add a WhatsApp token that can send.
What read-only plus allowlists protect against:
- Writes and schema changes. The role can't write,
run-queryruns read-only, and the token has no write tool. No prompt gets past all three. - Tables you didn't choose. Unlisted tables are left out of
list-tablesand their rows are refused, even through views and CTEs. Their names and columns stay visible in the system catalogs. - A leaked token. It reaches a few tables and can be revoked alone.
What they don't protect against:
- Sensitive columns in allowed tables. If
customersis allowed, Muse can read itsemailcolumn. Share a masked copy of the table instead. - Data leaving your infrastructure. Read-only stops changes, not disclosure. Every row Muse reads goes to Meta's service, so leave regulated data out.
- Large result sets. Automata returns one page at a time, but a heavy query still loads your database until
statement_timeoutstops it. Use a replica. - Prompt injection from your own rows. Stored notes or reviews can contain instructions aimed at the AI. Review what Muse proposes before you approve it.
- Wrong answers. Read-only SQL can still join the wrong column. Ask for the SQL before acting on a number.
Ways to connect Meta Muse to Postgres, compared
| Option | Works with Muse (remote HTTPS) | Read-only by default | Table scoping | Setup effort | Cost |
|---|---|---|---|---|---|
| Automata (hosted) | Yes, API key sent as a bearer token | Yes | Yes, per token | Low: no Docker or server | Free plan with one connection; Pro $19/month with a 7-day trial |
| Automata (self-hosted) | Yes, once deployed at a public HTTPS URL | Yes | Yes, per token | Medium: deploy and maintain it | Free (MIT), plus hosting |
| AnythingMCP | Yes, through its cloud or a public self-hosted instance; Muse signs in with OAuth 2.0, no API key | Yes; writes are a settings switch on the same query tool | Denylist (deniedTables) plus your database grants; no allowlist | Low on its cloud; Docker Compose to self-host | Cloud: Starter €19/month, Team €49/month, 7-day trial. Self-host free for up to 3 active users (AGPL-3.0) |
| Other Postgres MCP servers (Postgres MCP Pro, DBHub) | Only if you host them publicly over HTTP; both default to local stdio | No: Postgres MCP Pro defaults to unrestricted; DBHub can write unless you set readonly | No | Medium to high | Free, open source, plus hosting |
| CSV exports | Not needed: you upload files | Yes, nothing is live | Yes: you pick what to export | Low per export, repeated every time | Free |
Muse runs in Meta's cloud, so it can't start a stdio server on your laptop. Postgres MCP Pro can serve over SSE or streamable HTTP, but its docs describe no built-in auth for those modes, so a public URL needs an authenticating proxy in front. DBHub has an optional --auth-token bearer token, which is off by default.
Where alternatives fit: AnythingMCP if you want Muse to sign in with OAuth, or EU cloud hosting (Frankfurt, with other EU regions listed on its pricing page); Postgres MCP Pro for index tuning in restricted mode; DBHub for several database engines; CSV exports for a one-off analysis. Postgres MCP Pro's tuning tools are still unmatched, but its last release is v0.3.0 from May 2025, the only commit since January 2026 is an August dependency pin, and its maker's site, crystaldba.ai, no longer resolves. Automata has no tuning tools and refuses queries that call user-defined functions. More in Best PostgreSQL MCP servers.
Troubleshooting
| Problem | Likely cause and fix |
|---|---|
| Muse can't reach the server | The URL isn't public or isn't HTTPS. Muse runs in Meta's cloud, so use https://mcp.getautomata.app/mcp or your deployed URL ending in /mcp, never localhost or a private IP. |
Muse reports a 401 error | The key is missing, invalid, expired, or revoked. Create a new connector token and save it again through the secure prompt. |
| Muse only offers OAuth | Ask it to create the connector with an API key sent as a bearer token. Automata does not support OAuth sign-in for connector tokens. |
| Muse won't create a custom connector | Custom connectors may not have reached your account yet. Name the transport and URL explicitly in your request, and try again later if Muse still declines. |
| No tools, or a table is missing | Not on the token's allowlist, or the case differs. permission denied means the role lacks SELECT. A plain view needs its base tables allowed, and the role needs SELECT on them. |
| Connection refused when saving in Automata | A firewall or security group blocks Automata. On Supabase, use the Session pooler host; add ?sslmode=require everywhere. |
| Query times out | statement_timeout stopped it. Ask Muse to run it again with explain: true, then narrow the query. |
| Tools you added later don't show | Meta doesn't document how Muse picks up new tools. Disconnect the connector in Settings → Connectors, then ask Muse to connect it again. |
More fixes are in the troubleshooting guide.
Frequently asked questions
Can Meta Muse connect to a database?
Not out of the box, since Muse has no built-in Postgres connector. To connect Meta Muse to PostgreSQL, add a remote PostgreSQL MCP server such as Automata as a custom connector, with a read-only role and a token scoped to the tables you choose.
Can Muse write to my database?
Not with this setup. Automata's PostgreSQL tokens start read-only; writes need a separate run-statement tool with a row cap, off unless you enable it. The read-only role blocks writes in Postgres too.
Is it safe?
Reasonably, with a read-only role on named tables, a token scoped to the same tables, and ideally a replica. It won't hide sensitive columns in allowed tables, and rows Muse reads go to Meta. Meta doesn't review custom connectors, so use servers you trust.
Does it work with Supabase or Neon?
Yes. Any PostgreSQL database Automata can reach works, including Supabase, Neon, RDS and Railway. On Supabase, use the Session pooler connection string. Use sslmode=require everywhere.
Can I query my database from WhatsApp through Muse?
Possibly. Meta lets you message Muse in WhatsApp, but it doesn't say whether connectors run when you ask from there. Try a simple question in WhatsApp. If Muse doesn't query the database, ask in the Muse app, where custom connectors are documented.
Is it free?
Automata is free and MIT-licensed to self-host, and the hosted service has a free plan with one connection. Pro is $19/month with a 7-day trial and includes 5 users, plus $10 per extra user. Muse has a free tier with paid plans for more usage.
Next steps
- Let Muse read your chats too with How to connect Meta Muse to WhatsApp.
- Choosing an agent? Read Meta Muse vs Grok Bot.
- Go deeper on the threat model in the Claude Postgres guide; the role and the risks are the same for Muse.
- See what each tool does on the PostgreSQL MCP server page.
Sources
- Meta: Muse Connectors, Muse privacy and security, Muse approvals, Muse scheduled tasks, Muse plans, Introducing Muse, checked November 21, 2026.
- AnythingMCP: Muse guide, Postgres guide, database connector docs, pricing, FAQ, checked November 21, 2026.
- Postgres MCP Pro README, DBHub read-only mode, checked November 21, 2026.
Comments
Questions, corrections, or your own setup? Join in below. Pick any name to post.