Rowbit

io.github.Ermag由 GitHub 账号 Ermag 发布v0.2.2更新于 Nov 7, 2026

Preview, approve and undo AI agents' writes to MariaDB and MySQL

概览

AI 生成的概览

Rowbit 位于 AI 代理与 MariaDB/MySQL 之间,预览每次写入、将高风险写入交由人工审批,并可撤销单次变更。

可以做什么
  • 通过 MCP 读取并向 MariaDB/MySQL 表提出写入,代理无需持有数据库凭据
  • 在临时副本上重放写入,精确预览将被修改的行及其修改前后内容
  • 按 YAML 规则放行、挂起或拒绝写入,挂起的变更只能由人工批准
  • 撤销单次变更,恢复该变更涉及的行
  • 通过作用域限制每个代理可读写的表与不可见列,并可用影子模式先试规则
  • 在本地网页界面中审阅变更,支持登录、通知和哈希链审计日志
适用场景
适合需要让编码代理修复 MariaDB 或 MySQL 中的数据、又希望每次高风险写入都先预览并由人工批准的场合,并可按单次变更撤销。它面向一次性数据修复,而非表结构变更;README 认为结构变更应交给迁移工具。
运行要求
需在 macOS 或 Linux 本地安装(Windows 通过 WSL),用安装脚本安装并通过 setup 命令配置。需要 MariaDB 或 MySQL 数据库 URL、具备 TRIGGER 和 PROCESS 权限的数据库用户,以及每个代理各自的令牌,通过 Authorization Bearer 头发送。试用时可选择基于 Docker 的示例数据库。
安装前请注意
代理会获得对真实表的写入能力,是否拦截取决于规则配置,规则写错可能放行写入。数据库凭据应只由 Rowbit 持有;未设置作用域的代理会继承 Rowbit 的权限。变更状态、预览内容和审计日志存放在本地 SQLite 文件中,应按数据库副本的级别保护。能读取该文件并拿到数据库 URL 的人可以任意名义批准变更。撤销只恢复行数据,无法撤回已发出的邮件或已支付的退款。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Rowbit,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Rowbit

A safety net for AI agents that write to your database. Preview every write, approve the risky ones, undo any single change. MariaDB and MySQL, over MCP.

[Release] [CI] [License: AGPL-3.0]

[Rowbit: a safety net for AI agents that write to your database. Preview, approve, undo.]

Get started

sh
curl -fsSL https://ermag.github.io/rowbit/install.sh | shrowbit setup

macOS and Linux (Windows through WSL). If ~/.local/bin isn't on your PATH, the installer says so: run ~/.local/bin/rowbit setup instead. Setup finds your database's URL, checks Rowbit's privileges and prints the GRANT statements to fix them, writes rules that hold every write for review, connects the agent clients you pick, and prints the review page's password. See the quickstart.

No database to try it on? Choose the sample when setup asks: it runs a shop database in Docker with Rowbit in front of it (the tour). Then ask the agent:

The pending orders are stuck. Cancel them.

Works with Claude Code, Cursor, VS Code, Claude Desktop, Codex, Gemini CLI, Windsurf and any MCP client.

DatabaseStatus
MariaDB, MySQLSupported, over TLS too (MariaDB 11.4 and MySQL 8.4 tested on every change)
PostgreSQLPlanned, next
MongoDB, RedisExploring

Docs · Quickstart · Interactive demo · Tell us what you think

What it does

You ask a coding agent to fix the orders stuck in pending, and it writes UPDATE shop.orders SET status = 'cancelled' WHERE status = 'pending'. That also matches every order placed in the last hour. Rowbit catches it before it touches a row, shows a person exactly which 1,284 rows would change, and waits. If something bad does get through, you undo that one change without restoring a backup.

Status: early and open source; see the changelog for each release. What we build next depends on what you tell us in the feedback discussion.

How it works

Rowbit sits between your agents and your database. Agents talk to Rowbit over MCP, never to the database directly: they read and propose writes through it, without the database's credentials.

  • Exact preview. Rowbit reads the rows a write would change and replays it on a private temporary copy, so you see each row before and after, exactly as the table would store it. Your tables are only read.
  • Rules, then people. A small YAML file lets safe writes through, holds risky ones for a person, and refuses the rest. Only people approve, and approval applies exactly what was previewed, or nothing. See rules.
  • Undo one change. Rowbit keeps every row a change touched, so you can take back one bad write and keep everything else.
  • Scopes and shadow mode. Per agent, which tables it may read or write and which columns it may never see, enforced by the database with a user of the agent's own. Shadow mode shows what the rules would hold before you enforce them.
  • Review where you are. A web UI in the binary, sign-in through your identity provider, Slack or webhook notifications, and an audit log in a hash chain. See how a change moves.
yaml
# rowbit.ymlversion: 0agents:  coding-agent:    default: hold    rules:      - name: small-order-fixes        when: { statement: update, table: shop.orders, columns: status, rows: { max: 20 } }        then: allow      - name: no-deletes        when: { statement: delete }        then: block        reason: Data fixes don't delete rows.

Here the agent can change the status of up to 20 orders on its own. An update that writes any other column, or more rows, waits for a person, and deletes are refused.

See examples/rowbit.yml and the rowbit.yml spec for the full schema.

Connect your agent

rowbit setup connects the clients you pick. rowbit connect <client> sets up one more, with a token of the agent's own. See Connect your agent.

Claude Code
sh
rowbit connect claude-code

Adds Rowbit with claude mcp add, for this directory (--scope user for everywhere). Add the skill that teaches the agent to use Rowbit well:

/plugin marketplace add Ermag/rowbit/plugin install rowbit@rowbit
Cursor
sh
rowbit connect cursor

Adds Rowbit to ~/.cursor/mcp.json. Restart Cursor.

VS Code
sh
rowbit connect vscode

Or, with rowbit demo or rowbit serve running, add it to VS Code and paste the token from rowbit connect vscode --print --new-token when VS Code asks (an agent has one token, so this signs out a client the demo connected).

Claude Desktop, Codex, Gemini CLI, Windsurf
sh
rowbit connect claude-desktop   # macOS; starts rowbit mcp itselfrowbit connect codexrowbit connect geminirowbit connect windsurf
Any other MCP client
sh
rowbit connect --print

prints the address (http://127.0.0.1:8080/mcp) and a token to send as Authorization: Bearer <token>.

Why not just migrations?

Having an agent write a migration file that goes through code review and CI is the right answer for a coding agent changing your schema, and Rowbit doesn't compete there: it holds every schema change for a person and leaves the real workflow to your migration tool. It works badly for fixing data:

  • A reviewed diff shows SQL, not rows. UPDATE orders SET status = 'cancelled' WHERE status = 'pending' looks fine in review. What it touches depends on the data when it runs. Rowbit shows the exact rows when the decision is made, and refuses to apply if they changed since.
  • A one-off fix can't wait for a pull request. Repairing a few broken rows during an incident needs an answer in minutes, and nobody writes and reviews a migration for every one.
  • Not every write needs a person. Rules let small, safe writes straight through and hold only the risky ones, so reviewers aren't trained to rubber-stamp.
  • Undo is per change. Down-migrations for data are usually missing or lossy. Rowbit keeps the before image of every row a change touched.

The well-known incidents of coding agents wiping production databases are a credentials problem as much as anything: take the credentials away and have the agent write migrations. Rowbit is for the agents that need to write. And if an agent does the same thing over and over, like issuing refunds, give it a tool that does just that instead of SQL.

Good to know

  • Only Rowbit holds the database credentials. If an agent also has its own connection string, it can write around Rowbit. Give agents Rowbit's endpoint and nothing else (over HTTP, a token of their own), and Rowbit a database user of its own.
  • An agent without scopes reads and writes with Rowbit's privileges. Its rules still decide every write, but nothing stops it reading whatever Rowbit's user can. Give production agents scopes.
  • Undo restores rows, not the world. It puts the data back, but it can't take back an email that was sent or a refund that was paid because of it.
  • Preview never writes to your tables. It reads the affected rows without taking locks and replays the write on a temporary copy that only Rowbit's connection can see. Tables with triggers or cascading foreign keys are refused, because their side effects wouldn't show in the preview or be undone. So are tables Rowbit's database user can't fully inspect: it needs the TRIGGER and PROCESS privileges. See database privileges for the exact grants.
  • Where data lives. Change state, previews (including before and after copies of affected rows) and the audit log are stored in a local SQLite file next to Rowbit. Protect it like a replica of the database (how).
  • The CLI trusts whoever runs it. Anyone who can read rowbit.db and has the database URL can run rowbit approve, under any --as name. Keep both from agents, and run Rowbit as a user they can't act as; see Before you use it for real.
  • Fail closed. Anything Rowbit can't evaluate, it refuses. See the change lifecycle and SECURITY.md.

Contributing

Ideas and opinions are welcome in Discussions. For code, see CONTRIBUTING.md. Commits need a DCO sign-off (git commit -s). Report security issues as described in SECURITY.md.

License

The server is AGPL-3.0-only. The rowbit.yml policy schema (crates/rowbit-policy) and future client SDKs are Apache-2.0.

来源:README.md,提交 fccc449

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.2.2最新Nov 7, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分