Guide · Doing
Connect an AI agent to Seqora
Read this when the agent in your editor keeps guessing at your schema, or asks you to paste
table definitions into the chat. Seqora has an MCP server built in. Once an agent is connected
it can read commerce.orders for itself, run a read-only query and ask whether an index is
worth building. It never gets a password and it can't write. Seqora has no model of its own:
the agent you already use brings the AI.
Install it into your agent
- Press ⌘, or Ctrl, and open
Agents, under System. TheClientslist has one row per client:Claude Code,Cursor,Codex,Claude Desktop,VS CodeandOther, each with its maker's mark. - Click
Installon your client's row. The dialog names the file Seqora will write, or for Claude Code the command it will run. ClickInstallagain to confirm. - In the agent, ask it to list your connections. Back in Seqora the row reads
Connected, with the time the client was last seen. Before its first call it readsInstalled.
After an install the row's state changes. Connected means the client called within the last
10 minutes. Old token means its config holds a token Seqora no longer accepts: click Install
again.
What Install changes, per client:
| Client | What Install writes |
|---|---|
| Claude Code | Runs claude mcp add --scope user seqora when claude is installed, otherwise writes mcpServers in ~/.claude.json |
| Cursor | mcpServers in ~/.cursor/mcp.json |
| Codex | The [mcp_servers.seqora] table in ~/.codex/config.toml, or under $CODEX_HOME |
| Claude Desktop | mcpServers in claude_desktop_config.json in Claude's config folder, or the Microsoft Store build's own folder on Windows |
| VS Code | servers in the user mcp.json beside settings.json, or VS Code Insiders' when only Insiders is installed |
Every entry is named seqora. It runs Seqora's own executable with the argument mcp, and
carries a client token in SEQORA_MCP_CLIENT. JSON files are edited in place, so comments,
other servers and indentation survive, and the old file is copied to
<name>.seqora-backup-<seconds> first.
Add it to another client by hand
- Click
Copy configon theOtherrow. Seqora makes a token, puts the entry on the clipboard and shows it under the row. - Paste it into your client's MCP config. For
Otherit has this shape:
{
"mcpServers": {
"seqora": {
"command": "<path to Seqora>",
"args": ["mcp"],
"env": { "SEQORA_MCP_CLIENT": "<token>" }
}
}
}
Copy config works on every row: Codex gets the TOML table, and Claude Code gets the
claude mcp add line when claude is installed. Install and Copy config both make a new
token, and the client's previous token stops working. Remove revokes the token. The entry
stays in the client's file and is refused from then on.
The client starts seqora mcp, which relays the client's messages to the running app over a
named pipe that only your Windows user can open, or a Unix socket with mode 0600 on macOS and
Linux.
Choose what each connection shares
Under Connections, each connection has Off, Read and Propose. Every connection starts
Off, and an agent that names it is told it is not shared with agents. Read opens the read
tools. Propose adds the proposal tools. Setting Propose on a connection whose environment is
production asks you to type the connection's name.
The EXPLAIN ANALYZE switch beside it is off by default. In 0.6.1 the agent sees the setting in
list_connections, and run_query still refuses EXPLAIN ANALYZE whatever it says.
What the agent can call
| Reads | Tools | Plan |
|---|---|---|
| Connections and schema | list_connections, get_schema, describe_object, database_brief |
Free |
| Data | run_query |
Free |
| Schema history | schema_history |
Free for the last 7 days, Pro before that |
| Indexes | check_index |
Free |
| Indexes, ranked | advise_indexes |
Pro |
| Proposals | propose_change, revise_proposal, get_proposal |
Pro |
run_query takes exactly one statement that Seqora classifies as read-only: SELECT, WITH,
VALUES, SHOW, or EXPLAIN without ANALYZE. It returns 100 rows by default and 500 at
most, cut at 256 KB, with a 15-second timeout. database_brief is the
brief, built from the catalog and statistics, never table
data. check_index takes up to 5 CREATE INDEX statements and tests each as a hypothetical
index against the statements in pg_stat_statements. It answers build, skip, exists,
replace or not_testable and creates nothing. advise_indexes is the ranking the
index advisor draws.
On Free the agent still sees every tool, and the paid ones start their description with
[Pro]. Propose can be set on Free as well. A propose_change there is saved in Seqora,
locked, and the agent is told it will open when you start the trial. revise_proposal,
get_proposal and advise_indexes are refused.
What the agent can't do
No tool writes to a database. Each run_query opens its own connection in the database's
read-only mode, default_transaction_read_only on PostgreSQL, runs the one statement and closes
it. That connection is separate from yours, so unlocking the connection in Seqora's window gives
an agent nothing more. Writes, DDL and scripts are refused before anything runs.
The proposal tools write only to Seqora's own store. A change an agent proposes reaches the database when you apply it in Seqora: see Review an agent's proposal.
See what it asked for
Activity, at the bottom of the page, lists every call: the time, the client with its mark, the
tool, the connection and a short summary, then a mark for Done, Refused or Failed. Switch between Today and 7 days. A run_query is logged as its row
count and its time in milliseconds, never its rows. Calls older than 30 days are deleted when
Seqora starts.
Caveats
- What an agent reads goes to the agent, and the agent sends it to the model it runs on. That
includes up to 500 rows of any
run_query, the DDL and comments of tables it describes, row estimates, schema history, and the statement textscheck_indexreads frompg_stat_statements. Seqora's server is a local pipe and sends none of it anywhere else. Seqora's anonymous usage count records only that the feature was used, andCount feature useunder Privacy turns it off. - Values, comments and object names come back inside
<untrusted-data>blocks, and the server tells the agent to treat them as data, never as instructions. That is a request to the model, not a guarantee. - Database passwords never appear in a result or in a client's config. The token names the
client for
Activityand is not a database credential. - When Seqora isn't running,
seqora mcpstarts it without a window and waits up to 20 seconds for it. The window stays hidden until you open Seqora. - The read tools work on PostgreSQL, MySQL, MariaDB, SQLite and SQL Server.
check_indexis PostgreSQL only.advise_indexestests adds on PostgreSQL only: on MySQL, MariaDB and SQL Server it lists top statements and drops. Proposals take PostgreSQL and SQL Server.