Sqlite Ro
FreeNot checkedEnables read-only access to SQLite databases via MCP, with tools for browsing tables, schemas, and executing SELECT queries securely.
About
Enables read-only access to SQLite databases via MCP, with tools for browsing tables, schemas, and executing SELECT queries securely.
README
A read-only SQLite MCP server in one auditable Python file.
Most "read-only" SQLite MCP servers are write-capable servers with a switch: an env var, or even a tool argument the model itself can flip. This server takes a different position: the write path does not exist.
Defense in depth
- No mutating tool is defined. There is nothing to toggle.
- Every statement is validated - head whitelist (
SELECT/WITH/EXPLAIN) plus a write-keyword scan on comment- and literal-stripped SQL, soWITH cte AS (...) INSERT ...and keyword-in-string tricks are caught. - Connections are opened
mode=ro. Even if a validation bug slipped through, SQLite itself refuses the write.
Layer 3 matters: SQLite accepts statements like WITH ... INSERT, which a
naive first-word check happily approves. Validation bugs are a when, not an
if - the connection flag is the guarantee, the validator is just the first
line. The test suite proves this directly: one test bypasses the validator
entirely (calls the connection layer straight) and confirms SQLite itself
still refuses the write.
The whole server is a single file of a few hundred lines with one dependency
(the official mcp SDK). You can audit the entire attack surface in a few
minutes.
Install
pipx install sqlite-ro-mcp # or: pip install sqlite-ro-mcp
Or run from a checkout: pip install -e .
Use with Claude Code
claude mcp add sqlite-ro -- sqlite-ro-mcp --db sales=path/to/sales.db --db logs=path/to/logs.db
Multiple databases are exposed by named alias allowlist - only the files you name are reachable (no directory scanning).
Tools
| tool | description |
|---|---|
list_databases |
aliases and file paths this server exposes |
list_tables(db) |
tables and views |
describe_table(db, table) |
columns, types, nullability, primary key |
read_query(db, sql, params?) |
single SELECT / WITH / EXPLAIN, ? binding, 500-row cap, 30s timeout |
Options
usage: sqlite-ro-mcp [-h] --db [NAME=]PATH [--timeout TIMEOUT] [--instructions INSTRUCTIONS]
Read-only SQLite MCP server
options:
-h, --help show this help message and exit
--db [NAME=]PATH SQLite file to expose; repeatable
--timeout TIMEOUT per-query timeout in seconds (default 30)
--instructions INSTRUCTIONS
override the instructions text advertised to clients
Non-goals
Writes of any kind, remote databases, authentication. If you need a write-capable server, use one that is honest about being one.
Authorship
Built with Claude Code. Requirements, the no-write-path design constraint,
and review are by the author; implementation is AI-assisted and covered by
the test suite in tests/.
License
MIT
Installing Sqlite Ro
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/Pinggu17/sqlite-ro-mcpFAQ
Is Sqlite Ro MCP free?
Yes, Sqlite Ro MCP is free — one-click install via Unyly at no cost.
Does Sqlite Ro need an API key?
No, Sqlite Ro runs without API keys or environment variables.
Is Sqlite Ro hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Sqlite Ro in Claude Desktop, Claude Code or Cursor?
Open Sqlite Ro on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
Postgres
Query your database in natural language
by Anthropicwenb1n-dev/SmartDB_MCP
Connect to multiple databases at once (MySQL, PostgreSQL, SQL Server, MariaDB, Dameng, Oracle) for operations, health analysis and SQL optimization.
by wenb1n-devPostgres Server
This server enables interaction with PostgreSQL databases through the Model Context Protocol, optimized for the AWS Bedrock AgentCore Runtime. It provides tools
by madhurprashPostgreSQL
Read-only database access with schema inspection.
by modelcontextprotocolRedis
Interact with Redis key-value stores.
by modelcontextprotocolSQLite
Database interaction and business intelligence capabilities.
by modelcontextprotocolmxcp
Open-source framework for building enterprise-grade MCP servers using just YAML, SQL, and Python, with built-in auth, monitoring, ETL and policy enforcement.
by raw-labsjulien040/anyquery
Query apps with SQL from a single local-first binary; also connects to PostgreSQL, MySQL and SQLite-compatible databases.
by julien040drakonkat/wizzy-mcp-tmdb
Search and retrieve movie, TV show and person information from The Movie Database (TMDB) API.
by drakonkatlongevity-genie/opengenes-mcp
Query the OpenGenes database for aging and longevity research.
by longevity-genieCompare Sqlite Ro with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All data MCPs
