MCP local server
In Kerry Studio, the local MCP server connects desktop AI assistants, Cursor, Claude Desktop, and others, to your saved connections. Without it, listing tables or running SQL from chat means pasting schema or results by hand. Kerry listens only on your computer, keeps passwords, SSH, and certificates in the app, and gives the assistant the project, environment, database type, database name, schema, and the results of the queries it runs. Kerry’s servers do not receive that. The AI client may send what MCP returned to its cloud model.
Before you begin
You need:
- An open workspace in Kerry Studio
- A desktop AI client that supports MCP
Open the panel
- Open a workspace.
- In the right sidebar, click the MCP Server icon.
- Or use the workspace footer (MCP enabled / MCP disabled), or the command palette (⌘K / CtrlK) and choose Open MCP Panel.
By default the server does not start again when you quit and reopen Kerry Studio. Startup preferences live in Settings → MCP (gear icon in the panel Configuration header, or command palette ⌘K / CtrlK → Settings: MCP):
- On app launch → Start with the server on: starts the MCP server when Kerry Studio opens (off by default).
- On app launch → Always start in read-only mode: on the next launch, returns to read-only even if the previous session was in full mode (on by default).
In the panel, the book icon next to the gear opens the documentation (Open documentation).
Set up the AI client
- In the panel, turn on Enable MCP server.
- Click Copy JSON.
- Paste the JSON into your client’s MCP settings (or merge it with the config you already have).
- Restart the client if it does not reload servers on its own.
The default address is http://127.0.0.1:18765/mcp. HTTP port in the panel changes that port. The field is locked while the server is on. Copy JSON uses the current port and the real token. Do not use the sample YOUR_TOKEN.
{
"mcpServers": {
"kerry-studio": {
"url": "http://127.0.0.1:18765/mcp",
"headers": {
"Authorization": "Bearer YOUR_TOKEN"
}
}
}
}Read-only and full mode
By default the server is read-only: the assistant can list connections, inspect schema, and run read queries: SELECT, SHOW, DESCRIBE, EXPLAIN (including ANALYZE of a SELECT). INSERT, UPDATE, DELETE, SELECT … FOR UPDATE, SELECT INTO, INTO OUTFILE, and WITH queries that change data are rejected.
Read-only already opens the database. Without that there is no schema or SELECT. Kerry is what opens the session, on your computer, with the credentials in the app. Tabs do not need to be connected.
Switching modes in the panel takes effect immediately, so you do not need to restart Kerry Studio.
In Settings → MCP → Read-only, Force read-only when starting the server (on by default) keeps the panel Read-only mode toggle checked and locked, and applies read-only whenever the server is turned on.
What the assistant can access
Passwords, SSH, and certificates stay in Kerry. Kerry is what opens the database session, on your computer. Connection errors do not return username, host, password, or file path. SQL results the assistant receives also omit file paths, hosts, connection URIs, and keys. The tab grid in Kerry stays as-is.
The connection list shows the project, environment, database type, and database name (for a local file, the file name, not the path).
With the server on, the assistant also receives:
- table and view names
- columns and table details
- up to 500 rows from each SQL result the assistant runs
Kerry does not send that to Kerry’s servers. The AI client receives it on your computer and, if the model is in the cloud, may send what it received to its provider.
How to ask in chat
Name the project and environment, not just the technical connection label (for example postgres).
Examples:
- “in project billing, environment Development, list the tables”
- “in Billing / Development, what columns does
public.productshave?”
The assistant uses the connections saved in Kerry. SQL without @alias runs in a separate session: it does not switch the tab or the Entities sidebar. SQL with @alias, for example @billing.orders, uses the active SQL tab, like Execute Query: @project.table follows the tab’s environment. The active tab must be SQL and linked to that project and environment. Only saved projects appear in Entities.
What the assistant can do
| Mode | The assistant can |
|---|---|
| Read-only | List connections, find a project and environment, inspect tables and columns, search the schema, run read SQL |
| Full | Everything above, plus write SQL |
See who is connected
The panel’s Observability section lists apps talking to Kerry.
- The number at the top is how many apps are connected.
- Each card is one app. The number on the card is how many database sessions that app opened.
- A notice appears when an app connects, disconnects, or starts querying a database, even if the panel is closed.
To drop an app: click the trash icon on the card (Drop connection) and confirm. That ends that app’s connection. If another app still uses the same database, it stays. If it was the last one, Kerry closes the MCP connections for that database.
Troubleshooting
- The AI client cannot reach Kerry: make sure the URL uses
127.0.0.1, notlocalhost, and that the port matches HTTP port. After you change the port, use Copy JSON again. - The client does not connect after you paste the JSON: turn the server off and on in the panel, or restart the AI client.
- The query was rejected: the server is in read-only mode. Turn on full mode if the write is intentional.
SHOWandEXPLAINof aSELECTare reads;FOR UPDATEandSELECT INTOare not. - It could not find the database: ask by project and environment (name or
@alias), not the connection label. - SQL with
@aliasfailed: focus a SQL tab linked to that project and environment, as with Execute Query.
If you regenerate the token in the panel, paste the JSON into the client again.