Supabase
MCP server for interacting with the Supabase platform
作者提供的说明(英文原文)
Agent-safe MCP sidecar for one live SQLite database: read-only default, bounded writes.
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
选择你使用的 AI 应用,然后复制设置。
SQLITE_SIDECAR_DB, SQLITE_SIDECAR_TOKEN, SQLITE_SIDECAR_PERMISSIONS标为机密的值是你账户的钥匙。千万不要分享给别人,也不要粘贴到聊天里。
你需要
你用的是哪个应用?
在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。
打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json
{
"mcpServers": {
"sqlite-sidecar": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"SQLITE_SIDECAR_DB",
"-e",
"SQLITE_SIDECAR_TOKEN",
"-e",
"SQLITE_SIDECAR_PERMISSIONS",
"ghcr.io/xakpc/sqlite-mcp-sidecar:0.1.3"
],
"env": {
"SQLITE_SIDECAR_DB": "your-value",
"SQLITE_SIDECAR_TOKEN": "your-value",
"SQLITE_SIDECAR_PERMISSIONS": "your-value"
}
}
}
}在终端中运行这条命令
claude mcp add sqlite-sidecar --env SQLITE_SIDECAR_DB=your-value --env SQLITE_SIDECAR_TOKEN=your-value --env SQLITE_SIDECAR_PERMISSIONS=your-value -- docker run -i --rm -e SQLITE_SIDECAR_DB -e SQLITE_SIDECAR_TOKEN -e SQLITE_SIDECAR_PERMISSIONS ghcr.io/xakpc/sqlite-mcp-sidecar:0.1.3运行前请先填写空着的值。
粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
"mcpServers": {
"sqlite-sidecar": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"SQLITE_SIDECAR_DB",
"-e",
"SQLITE_SIDECAR_TOKEN",
"-e",
"SQLITE_SIDECAR_PERMISSIONS",
"ghcr.io/xakpc/sqlite-mcp-sidecar:0.1.3"
],
"env": {
"SQLITE_SIDECAR_DB": "your-value",
"SQLITE_SIDECAR_TOKEN": "your-value",
"SQLITE_SIDECAR_PERMISSIONS": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
粘贴到项目中的 .vscode/mcp.json
{
"servers": {
"sqlite-sidecar": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"SQLITE_SIDECAR_DB",
"-e",
"SQLITE_SIDECAR_TOKEN",
"-e",
"SQLITE_SIDECAR_PERMISSIONS",
"ghcr.io/xakpc/sqlite-mcp-sidecar:0.1.3"
],
"env": {
"SQLITE_SIDECAR_DB": "your-value",
"SQLITE_SIDECAR_TOKEN": "your-value",
"SQLITE_SIDECAR_PERMISSIONS": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。
你的选择通过 Cookie 保存在这台设备上,无需账户。
SQLITE_SIDECAR_PERMISSIONS env这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月6日
注册名称已通过域名 xakpc.dev 验证(注册中心会核实域名所有权)
我们还没有从 GitHub 读取这个仓库
我们还没有从 GitHub 读取这个仓库
它在你的电脑上运行,没有互联网端点
在你的电脑上运行,改用本地设置
它在你的电脑上运行;我们只能读取互联网端点的工具列表
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
你需要填写:SQLITE_SIDECAR_DB, SQLITE_SIDECAR_TOKEN
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
GitHub 仓库最后更新于–,最新版本(0.1.3)于14天前进入注册中心。
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Docker。
同一分类中有:Supabase, MongoDB MCP Server, Elasticsearch MCP Server
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
MCP server for interacting with the Supabase platform
MongoDB Model Context Protocol Server
MCP server for interacting with Elasticsearch
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
An agent-safe MCP sidecar for one live SQLite database.
It gives an AI agent controlled access to a database that another application already owns, and it limits the damage that an authorized but mistaken agent can cause.
[][ci-url] [][license-url] [][ghcr-url] [][dotnet-url]
Contents
An application owns a SQLite file. You want an agent to read it, and perhaps to change a few rows. Handing the agent a SQL connection gives it the whole file and one DELETE with a wrong predicate is unrecoverable. sqlite-sidecar-mcp sits next to that application as one more SQLite client and speaks MCP over HTTP. The owning application does not change.
It runs in production next to the MCP Canary API, where it gives the operator's coding agent read-only access to the live database.
flowchart TD
agent[AI / MCP client] -->|HTTPS| proxy[Reverse proxy] proxy -->|private HTTP| sidecar[sqlite-sidecar-mcp] sidecar -->|SQLite client| db[(app.db)] app[Owning application] -->|SQLite client| db
The product defends against two callers. One is an unauthorized client, which the token and the request budget stop. The other is an authorized client that makes a mistake, and that one is the unusual part: an agent with permission to write can still write the wrong thing. Structured writes, a mandatory predicate, a row limit that counts cascades, and a per-minute write budget exist for it.
[!IMPORTANT]
One sidecar process serves one database. The request budget, the write budget and the
idempotency cache live in process memory. A second replica gives you two independent budgets and
two independent caches, and nothing reports it. Do not scale this service. Run a second sidecar
only for a *different* database or a *different* trust boundary.
Microsoft.Data.Sqlite with the bundled native SQLite( back to top )
docker run -d --name sqlite-sidecar \
-p 127.0.0.1:8080:8080 \ -v /srv/myapp/data:/data \ -e SQLITE_SIDECAR_DB=/data/app.db \ -e SQLITE_SIDECAR_TOKEN=' ' \ -e SQLITE_SIDECAR_PERMISSIONS=schema,read \ --read-only --tmpfs /tmp \ --cap-drop=ALL --security-opt=no-new-privileges \ ghcr.io/xakpc/sqlite-mcp-sidecar:latest
The mount must be writable, also for the read-only permission set above. SQLite opens the -shm file read-write for a read-only connection to a WAL database, and a read-only mount fails in a way that reads like a permission fault rather than a configuration mistake.
The endpoint is /db/mcp and the token goes in an Authorization header:
{
"mcpServers": { "app-database": { "url": "https://example.com/db/mcp", "headers": { "Authorization": "Bearer " } } } }
There is no OAuth. A client that insists on OAuth discovery finds no resource metadata on a 401 and stops; the expected consumer is one agent that an operator configured with a static header.
dotnet run scripts/token.cs
It asks for the deployment shape, mints a token from a cryptographic random source, repairs a permission set that would fail startup, and prints the block as .env, shell or compose.
( back to top )
Which tools exist is decided by the permission set. A tool the deployment does not cover is absent from tools/list — it does not appear and then fail.
| Tool | Needs | What it does |
|---|---|---|
schema | schema | Returns the DDL of the user tables, views and indexes. No row data, no internal sqlite_% objects, no file path. |
query | read | Runs one caller-written read statement and returns rows as TOON, inside a row limit, a byte limit and a timeout. |
insert | write | Inserts one row from a table name and a value map. The caller sends no SQL. |
update | write | Updates rows matched by a structured filter. Needs a filter and a maxRows. |
delete | write | Deletes rows matched by a structured filter. Needs a filter and a maxRows. |
backup | backup | Copies the live database while the owning application keeps writing. Answers with a task; the client polls for the outcome. |
diagnostics | diagnostics | Reports a fixed set of health values, including the journal mode and a quick_check. |
execute_write_sql | danger-raw-write | Runs one caller-written INSERT, UPDATE or DELETE. See Security before you enable it. |
A query answers in TOON, which is a compact tabular text:
rows[2]{id,status}:
54,done 41,failed
truncated: false
truncated: true means a limit stopped the read, not that the query failed.
update and delete take a flat filter, never SQL. Every condition joins with AND; there is no or and no nesting. A disjunction is one call per branch, and that is the tighter bound: each call is pre-counted and limited on its own, while one or call would pool the blast radius of every branch into a single maxRows.
maxRows counts every row the write changes — rows removed by ON DELETE CASCADE and rows a trigger writes included. A delete with maxRows: 1 cannot quietly destroy a cascade subtree and report one row. A filter that matches too many rows is rejected *before* the write starts, and a write that turns out to exceed the limit is rolled back.
Every write tool takes a mandatory requestId. The same requestId returns the stored response of a committed write instead of applying it twice. Failures are not cached, so a retry after a failure is a real retry.
( back to top )
One deployment has one token and one permission set. A permission is a property of the deployment, not of a user — there are no users, roles or ACLs. Separate trust levels use separate deployments, which keeps the boundary visible in the deployment configuration.
SQLITE_SIDECAR_PERMISSIONS=schema,read # the default
| Permission | Risk | What it grants |
|---|---|---|
schema | Low | Metadata only. |
read | Sensitive | It can read all data in the database. |
write | Higher | Constrained data modification in all tables. |
backup | Sensitive | It can make database copies. |
diagnostics | Low to moderate | Metadata and health values. |
danger-raw-write | High | Arbitrary INSERT, UPDATE and DELETE SQL in all tables. |
The name danger-raw-write is deliberately alarming. A neutral name would hide the cost.
[!WARNING]
A permission applies to every table in the database. There is no table allowlist and no column
allowlist.
writedoes not protect one table from an agent that haswrite. If a table must stay
untouched, it belongs in a different database with a different sidecar.
Two rules the sidecar enforces at startup, so a mistake is a failed start and not a surprise later:
write and danger-raw-write are only valid together with schema and read. A structured write validates names against the live schema, so an agent that cannot call schema would be guessing. The missing permissions are never added silently, because that would make SQLITE_SIDECAR_PERMISSIONS an untrue record of the deployment.SQLITE_SIDECAR_PERMISSIONS=reed fails startup instead of quietly granting less than the operator believes.No permission grants another. read does not imply write, and danger-raw-write is independent of write.
( back to top )
Every value is an environment variable with the SQLITE_SIDECAR_ prefix. Startup fails when a value is absent or invalid, and it reports every problem at once. The sidecar does not start in a degraded state.
Required:
| Variable | Meaning |
|---|---|
SQLITE_SIDECAR_DB | Path of the SQLite file. It must exist. |
SQLITE_SIDECAR_TOKEN | The deployment bearer token. Supply it as a secret. |
Optional, with defaults
| Variable | Default | Meaning |
|---|---|---|
SQLITE_SIDECAR_PERMISSIONS | schema,read | The permission set. |
SQLITE_SIDECAR_BACKUP_DIR | none | Destination directory. Required, and must be writable, when backup is on. |
SQLITE_SIDECAR_MAX_ROWS | 1000 | Row limit of one query result. |
SQLITE_SIDECAR_MAX_RESULT_BYTES | 4194304 | Byte limit of one query result. |
SQLITE_SIDECAR_MAX_SQL_BYTES | 32768 | Longest accepted statement. |
SQLITE_SIDECAR_QUERY_TIMEOUT_SECONDS | 10 | A longer query is interrupted inside SQLite. |
SQLITE_SIDECAR_BUSY_TIMEOUT_SECONDS | 3 | How long to wait for another writer's lock. |
SQLITE_SIDECAR_MAX_CONCURRENCY | 4 | Concurrent database operations. |
SQLITE_SIDECAR_MAX_REQUESTS_PER_MINUTE | 120 | The request budget, one window for the process. |
SQLITE_SIDECAR_MAX_WRITE_ROWS | 100 | Server-side cap on changed rows per write. |
SQLITE_SIDECAR_MAX_WRITE_ROWS_PER_MINUTE | 500 | The write budget, one window for the process. |
ASP.NET Core settings that matter: ASPNETCORE_URLS (the image sets http://0.0.0.0:8080) and ASPNETCORE_ENVIRONMENT. Outside Development the sidecar logs JSON, which is what a container log pipeline wants.
The effective write limit is min(the caller's maxRows, SQLITE_SIDECAR_MAX_WRITE_ROWS), so an agent can ask for less but never for more.
| Path | Token | Rate limited |
|---|---|---|
/db/mcp | required | yes |
/health | no | no |
/health reports that the process is alive and nothing else. It never touches the database: a probe runs every few seconds, and an expensive probe would become a denial-of-service vector against the owning application. The checks that do need the file run once, at startup.
( back to top )
[!CAUTION]
The proxy must not strip the `/db` prefix.
/db/mcpis the whole public path: the sidecar
routes the same URL the agent calls. Both Kamal and Coolify strip a matched prefix *by default*,
and a stripped prefix produces a
404that reads like a broken server. Every recipe below turns
stripping off.
Common to all of them: one replica, /data writable even for schema,read, and the container port never published to the internet — the reverse proxy is the only way in, and it is also what matches the Host header. The sidecar does no host filtering of its own.
Docker Compose
services:
app: image: my-app volumes:
sqlite-sidecar: image: ghcr.io/xakpc/sqlite-mcp-sidecar:latest deploy: replicas: 1 e
只显示了开头部分;其余内容请在仓库中阅读