In Kerry Studio, the local MCP server connects your saved connections to a desktop AI client, such as Claude Desktop, ChatGPT, Gemini, Conductor, Cursor, OpenCode, and others. Without it, listing tables, inspecting columns, or running SQL from chat means pasting schema or results by hand.
The server listens only on your computer. Passwords, SSH, and certificates stay protected in the app. MCP does not expose them. The assistant receives the project, environment, database type, database name, schema, and the results of the queries it runs. Kerry does not send that to Sireeus’s servers. What reaches the assistant is configurable: which projects and environments the server may use, and which values to hide in mcp.log and in the reply. The AI client can still send what MCP returned to its cloud model. Use it only with agents you trust.
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.
If the client registers MCP as a local binary, such as OpenCode, do not paste the JSON. Use the command in How to use it in OpenCode.
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"
}
}
}
}How to use it in OpenCode
Some desktop AI clients, such as OpenCode, register an MCP server as a local binary by default. Kerry is not that kind of server. It listens over HTTP on your computer. In those apps, add Kerry by URL, not as a command.
The mcpServers JSON is for clients that paste a config. In OpenCode, with the server on in the panel, run:
opencode mcp add kerry-studio --global --url http://127.0.0.1:18765/mcp --header 'Authorization=Bearer YOUR_TOKEN'Replace YOUR_TOKEN with the token that Copy JSON puts in the JSON. If you changed HTTP port, use that port in the URL. --global makes Kerry available in every OpenCode project. If the command rejects that flag, your version does not have it. Run the same command without --global.
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 in the assistant’s session. Without that there is no schema or SELECT. Kerry SQL 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.
Permissions
In Kerry Studio, Permissions restrict which saved projects and environments the local MCP server can use. Without that restriction, every saved connection is available to the assistant. The default is all projects and environments.
Read-only and read and write keep their own lists. You can leave read-only on the whole catalog and, in full mode, unlock only a few projects.
Open Permissions from Configure on the MCP panel, from Settings → MCP, or from the command palette (⌘K / CtrlK) under MCP Permissions.
In MCP server permissions, the top switches between Read-only and Read and write. In use shows which of those lists the panel is applying right now: if Read-only mode is on, the mark sits on Read-only; if it is off, it sits on Read and write. Changing one list does not change the other.
On the Read and write list, Default writes sets Insert, Update, and Delete for the list, with all three on by default. Each project or connection can differ from that default. The change takes effect on the next assistant request.
If Allow all projects and environments is on, the server uses the whole catalog on that list. Turn it off when you want to pick projects one by one.
With the switch off, each project and each environment on the project gets its own control. Under Automatically include access to, you choose whether New projects and their current environments and New environments on projects join on their own. Search narrows what you see by project, SQL alias (@alias), or environment. Activate all and Deactivate all apply to what is visible. The arrow beside them does the same for one environment: Activate all in an environment or Deactivate all in an environment.
When you turn Read-only mode on or off in the panel, Kerry starts applying the matching list. The change takes effect on the next assistant request. If the project is not on that list, Kerry does not open the connection for the assistant. A query with @alias, for example @billing.orders, points to a saved connection and is also blocked if that connection is not accessible.
What the assistant can access
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
- control of the ER diagram tab in the open workspace
Control the ER diagram
In Kerry Studio, the assistant can use the ER diagram tab the way you would. It opens the tab for that project and environment if it is not there yet, or focuses the one already open. If that tab is not connected, using the diagram (sync, filter, fit) connects it and refreshes the schema. The assistant only controls ER diagram tabs. MCP permissions apply to open, sync, and environment switch. It also filters tables, changes the layout, focuses relationships, adjusts zoom, and exports the image. On export, Kerry saves the file to the folder in Settings → MCP. The default is the Desktop. If that fails, Kerry asks where to save. The assistant receives the full path. MCP cannot choose the folder.
SQL without @alias still runs in a separate session and does not switch the tab. SQL with @alias, for example @billing.orders, uses the active SQL tab.
While the assistant drives the diagram, the tab shows an MCP mark. The workspace footer shows controlling UI.
Examples:
- “Open the ER diagram for project billing in the Development environment.”
- “In the diagram, show only the tables that relate to
public.orders.” - “Fit the diagram and export it as PNG.”
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, open and control the ER diagram tab |
| Full | Everything above, plus the write SQL allowed in Permissions (Insert, Update, and Delete) |
See who is connected
The panel’s Observability section lists apps talking to Kerry.
- The number at the bottom 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.
Auditing the server
In Kerry Studio, the mcp.log file records each exchange with the assistant, with the app and the session. In the file, REQUEST is the request the assistant sent, including the SQL. RESPONSE is what Kerry returned. Open the file in the Observability header of the MCP panel or in Settings, MCP. If logs are off, the icon is disabled.
Kerry hides the value when the field name is the term on the list or contains it. It also hides the value if the SQL gives the column another name, uses it in an expression, or reads the field from JSON and returns it under another name. That applies on PostgreSQL, MySQL, Oracle, and SQLite.
By default, the following is hidden:
- In the file and in the reply to the assistant: password, token, authorization, and private-key values, when the field matches that destination’s default list.
- Only in mcp.log: values of fields whose name is or contains email, and email addresses that appear in the text, even when they are not a column named email.
- Only in the reply to the assistant: connection strings, keys, and error text that would expose a host, user, path, or password. That does not depend on the column name.
The SQL is in mcp.log because the audit keeps the request as it arrived. Use the file to check whether a column from your database still appears with the real value in the RESPONSE. That matters for fields Kerry cannot know, such as a full name or a document number. If it appears, in Redacted values in the MCP panel or in the command palette (⌘K / CtrlK), add the field, choose the destination (file, assistant, or both), and whether the match is exact or contains.
If you turn logs off, that choice stays. If the file already exists, Kerry asks for confirmation and removes it.
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.
- OpenCode does not connect: Kerry is not a binary MCP. Use
opencode mcp addwith--urland theAuthorizationheader. If the command rejects--global, omit the flag. - The query was rejected: the server is in read-only mode, or that operation type is off in Permissions. Turn on full mode if the write is intentional, and turn on Insert, Update, or Delete to match the SQL.
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. - The ER diagram did not open or the environment was denied: check Permissions and ask for a project and environment on that list. The MCP panel only exists when a workspace is open.
If you regenerate the token in the panel, paste the JSON into the client again.