Rowbase
Rowbase is a read-only-by-default MCP server that lets AI assistants explore schemas and run SQL against MySQL/MariaDB, PostgreSQL and SQLite databases.
guide— read-once knowledge base: workflow, safety rules, TOON output format, SQL dialect notesconnections— list saved connections with effective read/write mode, database andprodflagdatabases— list databases on a server and see which one is currenttables— browse all tables/views with approximate row counts, optionally name-filtereddescribe— inspect one table: columns, types, nullability, keys, defaults, foreign keys, indexes and referencing tablessearch_schema— find tables/columns by keyword across the whole schema (capped at 500 rows)sample— peek at a few real rows, with optionalwhere, limit and formatcount— exact row count, optionally filteredquery— run exactly one SQL statement (SELECT/JOIN/GROUP BY/sorting); auto-LIMIT, read-only enforcement, multiple statements refusedexplain— show or analyze a query plan to diagnose slow queries and index usagefind_ref— resolve UUID values in FK-less schemas (1C-style references)Formats — TOON (default, ~40% fewer tokens), CSV, JSON, Markdown
Safety — read-only by default, one statement per call, failures return
error: <reason>
Connects to MariaDB databases as a supported engine alongside MySQL, providing the same schema exploration and query tools: list databases/tables, describe and search the schema, sample rows, count, execute SQL and EXPLAIN, with optional opt-in writes.
Connects to MySQL databases to browse tables and run queries. Exposes tools for listing databases and tables, describing schemas, searching the schema, sampling and counting rows, running SQL queries, and explaining query plans — plus inline row editing (apply_changes) with SQL preview when writes are explicitly allowed. Connections are read-only by default and can be tunnelled over SSH.
Connects to PostgreSQL databases to explore schemas and query data. Provides tools for listing databases and tables, describing columns and keys, schema search, sampling and counting rows, running SQL queries, and explaining plans; read-only by default with opt-in editing and SSH tunnel support.
Connects to SQLite database files, exposing the same read-only-by-default toolset: browse tables, describe and search the schema, sample and count rows, run SQL queries, view query plans, and optionally apply changes when writes are enabled.
Why Rowbase?
Safe by default. Every connection is read-only until you say otherwise — enforced at four independent layers (driver-level single statement, SQL guard,
READ ONLYtransaction, timeouts). Production connections get a red accent.Made for AI assistants too. A built-in MCP server lets Claude, Cursor, Codex & co. explore your schema and query data — read-only unless you allow writes, with a token-efficient output format (TOON) and a built-in guide so the assistant knows how to use it. One copy-paste prompt sets everything up.
One file, no installer. Download a single binary for macOS, Linux or Windows and run it — no admin rights, no Python, no drivers to install. Or use the native macOS app.
No SQL required. Filter any column from its header like in DataGrip — pick values from a list with counts, or use contains / starts with / between / LIKE / regex / NULL — and build whole queries visually (joins, counts and sums, conditions, sorting) in the query builder, with the generated SQL shown live.
Nice to use. Foreign-key navigation (also for UUID references without FKs, e.g. 1C-style schemas), "referenced by", transpose, column picker, schema-aware autocomplete, EXPLAIN highlighting, query cancel, inline editing with SQL preview, export to CSV/JSON/Markdown/SQL, SSH tunnels.
Open source under Apache-2.0. Passwords live in your OS keychain, never in config files.
SQL editor: autocomplete, ⌘↩ runs the statement under the caret, EXPLAIN, cancel | Edit rows safely: pending changes, SQL preview, one atomic save |
Related MCP server: Universal Database MCP Server
Download
Grab the latest from Releases:
Platform | File | How to run |
macOS (native app) |
| open, drag to Applications |
macOS (one file) |
|
|
Ubuntu / Debian |
| double-click → Install (or |
Linux, no root | one command |
|
Linux x64 / arm64 (one file) |
|
|
Windows 10 / 11 |
| double-click |
Started without arguments (or from the apps menu), Rowbase opens the web UI in your browser; starting it again just
reopens the page. A downloaded Linux one-file binary has no "executable" flag, so a double-click does nothing — use the
.deb or the install command above, or chmod +x it. Builds are not code-signed yet:
macOS → System Settings → Privacy & Security → Open Anyway; Windows → More info → Run anyway.
Updates. The Mac app: Rowbase → Check for Updates… (from 0.3.0). One-file binaries: rowbase update, or the
Update button in the web UI. PyPI installs: pipx upgrade rowbase-db. The only request is an anonymous check of
GitHub Releases, at most once a day — no telemetry; turn it off with ROWBASE_NO_UPDATE_CHECK=1.
Connect your AI assistant (MCP)
Open AI / MCP in the app, click Copy prompt, paste it into your assistant — it registers the server, reads the built-in guide and creates a reusable skill. Or register manually:
claude mcp add rowbase -- /path/to/rowbase mcp # one-file binary or app
claude mcp add rowbase -- uvx --from rowbase-db rowbase mcp # straight from PyPI, nothing to downloadListed in the official MCP Registry as io.github.djstreet11/rowbase.
Results come back as compact TOON tables (~40% fewer tokens than JSON):
rows[2]{id,customer,total}:
1,"Smith, Bob",9.50
2,ann,null
truncated: falseTools: guide, connections, databases, tables, describe, search_schema, sample, count, query, explain, find_ref
(+ apply_changes only when you allow writes). Details: docs/MCP.md.
CLI
Install from PyPI (pipx install rowbase-db / uv tool install rowbase-db) or use a one-file download.
rowbase add shop 'postgres://me@db.example.com/shop?ssh=deploy@bastion' # read-only unless --rw
rowbase tables -c shop
rowbase q "SELECT * FROM orders WHERE status = 'new'" -c shop --format json
rowbase ui # web UI on http://127.0.0.1:8765
rowbase mcp # MCP server (stdio)
rowbase doctor # environment report
rowbase update # update a one-file binary in place (--check: only check)Build from source
Python track:
python3 -m venv .venv && .venv/bin/pip install -e . && .venv/bin/rowbase uiOne-file binaries: docs/BUILDING.md · Native macOS app:
cd native && swift build· releases: docs/RELEASING.mdArchitecture & roadmap: SPEC.md
Contributing
Issues, ideas and pull requests are welcome — see CONTRIBUTING.md and the Code of Conduct. If Rowbase is useful to you, a ⭐ helps others find it.
License
Apache-2.0 — see NOTICE and THIRD_PARTY_LICENSES.md.
Available Tools
11 toolsconnectionsList connectionsARead-onlyIdempotent
List the user's saved database connections exposed to MCP. Call this first to get the exact connection names every other tool requires. Returns a table connections[N]{name,driver,env,mode,database,tunnel} — mode is the EFFECTIVE read-only/read-write mode for MCP; env 'prod' means be extra careful — plus writes_enabled_in_mcp. No pagination: all exposed connections are returned.
Inputs: no named parameters.
countCount rowsARead-onlyIdempotent
Return the exact number of rows in a table, optionally filtered — use it to size a result before fetching it or to answer 'how many' questions. Use query instead for grouped counts (GROUP BY) or counts over joins. Returns a single line: count: N. May be slow on very large unindexed filters (timeout from settings). On failure returns isError with 'error: ' (e.g. refused statement, unknown table, SQL error).
Inputs: table (required), connection (required), where, database.
databasesList databasesARead-onlyIdempotent
List the databases on a connection's server and which one is current. Use it when a connection has no database selected, or to work in another database (pass database to later calls); to list tables inside a database use tables instead. Returns current, databases[N] (user databases first) and system[N]. SQLite returns an empty list (one file = one database). On failure returns isError with 'error: ' (e.g. refused statement, unknown table, SQL error).
Inputs: connection (required).
describeDescribe tableARead-onlyIdempotent
Show the structure of one known table: columns with type, nullability, key, default, foreign-key target (fk = table.column — use it to write JOINs) and comment, plus indexes and the tables that reference it. Use it before writing SQL against a table; use search_schema if you don't know the table name yet. Returns table, sql_name (properly quoted name for SQL), columns[N]{name,type,nullable,key,default,fk,comment}, indexes[N]{name,unique,columns} and referenced_by[N]{table,column,ref_column}. On failure returns isError with 'error: ' (e.g. refused statement, unknown table, SQL error).
Inputs: table (required), connection (required), database.
explainExplain query planARead-onlyIdempotent
Show how the database will execute a SELECT (its query plan) to diagnose slow queries or check index use — use it instead of query when the question is about performance, not data. With analyze=true the statement is actually executed to report real timings (can be slow on big tables). Returns the plan as rows plus a hint: MySQL type=ALL or PostgreSQL 'Seq Scan' means a full table scan (consider an index or a narrower WHERE). SQLite uses EXPLAIN QUERY PLAN. On failure returns isError with 'error: ' (e.g. refused statement, unknown table, SQL error).
Inputs: sql (required), connection (required), analyze, database.
find_refFind referenced objectARead-onlyIdempotent
Find which table holds a UUID value as its primary key — for schemas that store references as UUIDs without foreign keys (1C-style Ref keys, columns like SenderAddress or Owner_Ref). Use it when describe shows no fk for a column whose values are UUIDs; use describe fk + query instead when real foreign keys exist. Searches tables whose single-column primary key can hold a UUID: the hint table first, then tables named like the column (SenderAddress → …Addresses), then all of them. Returns matches[N]{table,pk,label} (label = Description/Name/Number/Code of the row) and found_by, or searched_tables when nothing matched. On failure returns isError with 'error: ' (e.g. refused statement, unknown table, SQL error).
Inputs: value (required), connection (required), hint, table, +2 more.
guideGuideARead-onlyIdempotent
Read this first, once per session: the Rowbase knowledge base — recommended workflow, safety rules (read-only model, one statement per call), the TOON output format and SQL dialect notes. Use it before any other tool; it needs no connection. Returns a markdown document.
Inputs: no named parameters.
queryRun SQLARead-onlyIdempotent
Run exactly ONE SQL statement — the general tool for answering questions: specific columns, JOINs (follow fk from describe), filters, sorting, GROUP BY. Read-only connections accept only SELECT/SHOW/DESCRIBE/EXPLAIN/WITH/VALUES/TABLE (+PRAGMA on SQLite); multiple statements are refused. Prefer sample/count for simple peeks and totals, explain for performance. A LIMIT is added automatically when missing. Returns rows[N]{columns} plus rows, truncated (true = more rows exist — narrow with WHERE or raise limit) and ms; write statements (only if writes are enabled) return affected instead. On failure returns isError with 'error: ' (e.g. refused statement, unknown table, SQL error).
Inputs: sql (required), connection (required), limit, format, +1 more.
sampleSample rowsARead-onlyIdempotent
Peek at a few real rows of one table (SELECT * … LIMIT n, in storage order, no sorting) to see what the data looks like before writing a query. Use query instead for specific columns, joins, sorting or aggregates, and count when you only need a number. Returns rows[N]{all columns} plus rows, truncated (true = more rows exist) and ms. Default 20 rows, capped by the server's max rows setting. On failure returns isError with 'error: ' (e.g. refused statement, unknown table, SQL error).
Inputs: table (required), connection (required), limit, where, +2 more.
search_schemaSearch schemaARead-onlyIdempotent
Find tables and columns whose name contains a keyword (case-insensitive substring; on MySQL also column comments). Use it when you know WHAT you are looking for but not WHERE it is stored; use tables instead to browse everything and describe for one known table. Returns matches[N]{table,column,type}, one row per matching column (a table-name match lists all its columns), capped at 500 rows (truncated: true when cut). On failure returns isError with 'error: ' (e.g. refused statement, unknown table, SQL error).
Inputs: text (required), connection (required), database.
tablesList tablesARead-onlyIdempotent
List all tables and views of a connection/database with approximate row counts — the entry point for browsing. Use search_schema instead when you look for a concept (e.g. 'invoice') across table AND column names, and describe once you know the table. Returns tables[N]{name,kind,approx_rows} (kind = table|view; approx_rows is an estimate, may be null; use count for exact numbers). Returns every match, no pagination. On failure returns isError with 'error: ' (e.g. refused statement, unknown table, SQL error).
Inputs: connection (required), filter, database.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Each tool targets a distinct step or resource in the database exploration workflow: guide, connections, databases, tables, search_schema, describe, find_ref, sample, count, query, and explain. Descriptions explicitly cross-reference alternatives (e.g., use search_schema when you don't know the table, use query instead of sample for joins), leaving no meaningful overlap.
All names are lowercase snake_case with no casing or separator inconsistencies. However, the set mixes noun-style list tools (connections, databases, tables) with verb-style action tools (describe, sample, query), so it is not a strict verb_noun pattern throughout.
Eleven tools is well within the ideal range and each tool earns its place: discovery, schema inspection, sampling, counting, querying, performance analysis, and reference resolution. No tool feels redundant or excessive for a read-only database assistant.
The surface covers the full read-only lifecycle from connection discovery through schema browsing, targeted search, structure inspection, sampling, exact counts, general SQL, query plans, and UUID reference resolution. There are no obvious dead ends for the stated purpose, and write operations are intentionally limited by the read-only model.
Maintenance
Related MCP Connectors
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
PostgreSQL, MySQL, and SQL Server in one session. 26 read-only MCP tools for AI agents.
Query Postgres, MySQL, SQL Server, Oracle, BigQuery, ClickHouse and Redshift from your AI client.
Deterministic safety, correctness & cost gate that vets Postgres SQL before your AI agent runs it.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceConnect AI agents to SQL databases (SQLite, PostgreSQL, MySQL) with a unified interface for querying data, exploring schemas, inserting rows, and exporting results to CSV. Includes safety features like dangerous query blocking and write guards.6 npm47 PyPIMIT
- AlicenseAqualityDmaintenanceEnables AI agents to securely query databases (PostgreSQL, SQLite, MySQL, DuckDB) with read-only defaults and multi-layer SQL injection prevention.81MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to safely explore and query databases across SQLite, PostgreSQL, MySQL, and MSSQL, with schema introspection, natural language queries, and data profiling.MIT
- AlicenseAqualityBmaintenanceEnables LLMs to safely explore, query, diagnose, and modify relational databases through a unified set of schema introspection, SQL execution, and administration tools. Supports multiple database backends with AST-level read-only guards, automatic LIMIT injection, and explicit opt-in write permissions for DML and DDL.6295 PyPIApache 2.0