MCP server for coding agents

functional

Let Claude Code, Cursor, VS Code and Windsurf use your saved connections read-only over MCP, with no passwords shared.

SQLly can run as a local Model Context Protocol (MCP) server, so coding agents such as Claude Code, Cursor, VS Code, Windsurf and Claude Desktop can use the connections you already saved in SQLly. The agent can list connections, browse tables, read column definitions, get a schema summary, and run one SELECT at a time with capped rows. It never sees a password, and production connections are always refused.

  • Local and stdio-only. The agent starts sqlly-cli mcp on your machine and talks to it over standard input and output. Nothing listens on a network port.
  • Read-only by default. Writes are possible only if you choose to allow them, and even then each one opens in SQLly for you to confirm.
  • Passwords stay in your keychain. The server signs in to your databases itself; the agent only receives connection names, schema text and result rows.

Setting it up

  1. Open Settings › AI › MCP and find SQLLY as an MCP server.
  2. Choose the Global ceiling: Read-only (default), or Read/write with confirmation. Pick which saved connections to expose.
  3. Press the copy button for your agent: Copy for Claude Code, Copy for Cursor, Copy for VS Code, Copy for Windsurf or Copy for Claude Desktop, and paste the snippet where that agent keeps its MCP servers.
  4. Ask the agent to list your SQLly connections.

The snippets name the full path to sqlly-cli, the command-line tool that ships inside the app. SQLly looks for it next to the app first, then on your PATH; if it finds neither, the snippet says plain sqlly-cli. The shapes are:

# Claude Code
claude mcp add --transport stdio sqlly -- /path/to/sqlly-cli mcp

// Cursor, Windsurf and Claude Desktop
{ "mcpServers": { "sqlly": { "command": "/path/to/sqlly-cli", "args": ["mcp"] } } }

// VS Code (.vscode/mcp.json)
{ "servers": { "sqlly": { "type": "stdio", "command": "/path/to/sqlly-cli", "args": ["mcp"] } } }

The same pane also has a list of external MCP servers. That list is the other direction: servers SQLly connects to so its own AI assistant knows what tools they offer. You don't need it to let an agent use SQLly.

What the agent can do

ToolWhat it does
list_connectionsLists the exposed connections with their engine, server, database, environment, and whether each is production or read-only.
list_tablesLists the tables in a connection's database.
describe_tableColumns, types and nullability for one table.
get_schema_contextA schema summary sized to a token budget.
run_readonly_queryRuns one SELECT and returns up to the row limit. Anything else is refused without running.
open_in_appOpens a query tab in SQLly, optionally with SQL filled in. Nothing runs.
propose_writeProposes a data-changing statement for you to confirm in SQLly (only when writes are allowed).
get_proposal_statusWhether a proposal is pending, opened, executed, rejected or expired.

Read-only and read/write modes

The Global ceiling sets the most any connection allows. Each connection can then be set lower: Inherit global, Locked (not exposed at all), Read-only, or Read/write with confirm. A connection never gets more than the global ceiling.

Read-only is enforced by the database, not only by SQLly's statement check. On PostgreSQL, MySQL and MariaDB each query runs in a read-only transaction that is always rolled back; SQLite runs it as query-only; SQL Server, which has no read-only transaction, runs it inside a rolled-back transaction plus a statement screen. On ClickHouse only the SELECT-only screen applies, and Redis commands are checked against a read-only list.

With writes allowed, propose_write never runs anything itself. SQLly opens the statement in a new query tab, shows an estimated row count and a one-line plan summary where the engine supports it, and runs it only through the usual confirmation dialog once you approve.

Production is off-limits. A connection is production when its environment is Production, or you marked it so. The agent can see it in the list, and every other tool refuses it, reads included.

Limits

  • Rows and cells. At most 100 rows per query (the default and the ceiling), and long cell values are cut at 200 characters by default (up to 2000).
  • Rate limits. By default 60 queries, 5 writes and 2 schema changes per minute, adjustable up to 600, 60 and 20.
  • Idle timeout. The server stops after 15 minutes without a request by default (adjustable from 30 seconds to a day).

The activity log

SQLly records every tool call the agent makes, and every proposal's outcome, in a private log on your machine. Each entry has the time, tool, connection, database, duration, row count and result. The SQL is stored redacted, never with its literal values. Press Open MCP Activity in the MCP settings to browse it, filter by tool, outcome or connection, and export it as CSV or JSON.

Mac App Store edition

Apple's sandbox stops App Store apps from starting other programs, so the Mac App Store edition can't act as an MCP server for other apps, and it can't launch local (stdio) MCP servers either. MCP servers you reach over HTTP still work there. See macOS & the Mac App Store.