Command Palette

Search for a command to run...

UnylyUnyly
Весь каталог

Sqlite Ro

БесплатноНе проверен

Enables read-only access to SQLite databases via MCP, with tools for browsing tables, schemas, and executing SELECT queries securely.

GitHubEmbed

Описание

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

  1. No mutating tool is defined. There is nothing to toggle.
  2. Every statement is validated - head whitelist (SELECT / WITH / EXPLAIN) plus a write-keyword scan on comment- and literal-stripped SQL, so WITH cte AS (...) INSERT ... and keyword-in-string tricks are caught.
  3. 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

from github.com/Pinggu17/sqlite-ro-mcp

Установка Sqlite Ro

У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.

▸ github.com/Pinggu17/sqlite-ro-mcp

FAQ

Sqlite Ro MCP бесплатный?

Да, Sqlite Ro MCP бесплатный — установка в пару кликов через Unyly без оплаты.

Нужен ли API-ключ для Sqlite Ro?

Нет, Sqlite Ro работает без API-ключей и переменных окружения.

Sqlite Ro — hosted или self-hosted?

Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.

Как установить Sqlite Ro в Claude Desktop, Claude Code или Cursor?

Открой Sqlite Ro на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.

Похожие MCP

wenb1n-dev/SmartDB_MCP

A universal database MCP server supporting simultaneous connections to multiple databases. It provides tools for database operations, health analysis, SQL optim

wenb1n-devавтор: wenb1n-dev

Postgres Server

This server enables interaction with PostgreSQL databases through the Model Context Protocol, optimized for the AWS Bedrock AgentCore Runtime. It provides tools

madhurprashавтор: madhurprash

Postgres

Query your database in natural language

Anthropicавтор: Anthropic

PostgreSQL

Read-only database access with schema inspection.

modelcontextprotocolавтор: modelcontextprotocol

Redis

Interact with Redis key-value stores.

modelcontextprotocolавтор: modelcontextprotocol

SQLite

Database interaction and business intelligence capabilities.

modelcontextprotocolавтор: modelcontextprotocol

mxcp

Open-source framework for building enterprise-grade MCP servers using just YAML, SQL, and Python, with built-in auth, monitoring, ETL and policy enforcement.

raw-labsавтор: raw-labs

tadas-github/a2asearch-mcp

MCP server to search 4,800+ MCP servers, AI agents, CLI tools and agent skills. Install: npx -y a2asearch-mcp. Ask Claude: "Find MCP servers for database access

tadas-githubавтор: tadas-github

julien040/anyquery

Query more than 40 apps with one binary using SQL. It can also connect to your PostgreSQL, MySQL, or SQLite compatible database. Local-first and private by desi

julien040автор: julien040

drakonkat/wizzy-mcp-tmdb

A MCP server for The Movie Database API that enables AI assistants to search and retrieve movie, TV show, and person information.

drakonkatавтор: drakonkat

Compare Sqlite Ro with

Не уверен что выбрать?

Найди свой стек за 60 секунд

Автор?

Embed-бейдж для README

Похожее

Все в категории data