Approval gate for databases
io.hibira由 hibira.io 发布v0.4.0更新于 Nov 13, 2026
Wraps a database MCP server: reads pass, writes wait for a supervisor to approve them.
发布方自己的服务:Approval Studio
概览
套在数据库 MCP 服务器外面:读取直接通过,写入需由另一位主管在 Hibira 托管审批页或手机推送上核准后才执行。
- 可以做什么
- 代理数据库 MCP 服务器(DBHub、postgres-mcp、Supabase)或远程上游,只读调用直接放行
- 暂缓改数据、改结构的调用,等主管核准或拒绝后按原样执行一次
- 按 SQL 与工具判断读写,支持允许/拦截清单、Stripe、GitHub、Gmail、Shopify 预设,以及 writes、all、none 三种模式
- 调用仍在等待时,用 check_approval 工具查询审批结果
- 作为 Claude Code、Codex、Cursor、Hermes Agent 的钩子,让删除、强推、部署、terraform apply、发包等高风险 shell 命令先等审批
- 可通过 stdio 或 Streamable HTTP 提供,供网页客户端使用
- 适用场景
- 当助手对生产或团队数据有写权限,而你需要由对话者以外的人逐次签字确认时使用。也适合为编码代理的不可逆 shell 命令加一道审批。
- 运行要求
- 通过 npx(Node.js)在本机运行,或作为 HTTP 服务器放在 HTTPS 之后供网页客户端使用。需要一个 Hibira Approvals 工作区并邀请审批人;可用 login 命令登录连接,或首次写入时由管理员点「连接」。容器中可选用 HIBIRA_APPROVALS_TOKEN,非本地 HTTP 需要 GATE_TOKEN,使用应用密钥方式则需 HIBIRA_APP_ID、HIBIRA_KEY、HIBIRA_SECRET。被包裹的数据库服务器及其凭据在双横线之后配置。
安装
在 SourceWeft 中
- 打开 控制台中的 Approval gate for databases,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Approval gate for database MCP servers
@hibira-io/mcp-approval-gate sits in front of the MCP server that connects
your assistant to a database. Reads go straight through. Anything that changes
data or schema waits until another person approves it on a hosted approval
page, sent to their phone as a push notification. Then it runs once, exactly
as approved.
A real session: Claude Code asks to mark order 1042 as refunded through DBHub. The UPDATE waits and the assistant never gets the approval link. The request shows up in the store manager's Hibira Approvals inbox on her phone (it is also sent to her as a push notification); she opens it, checks the statement and approves, and the assistant finishes the change. (MP4 · the same request rejected)
It works with any MCP server, and is tested with:
- DBHub (Postgres, MySQL, MariaDB, SQL Server, SQLite)
- Postgres MCP Pro (
postgres-mcp) - Supabase MCP (local or
mcp.supabase.com)
and with Claude (Desktop, Code and claude.ai), Cursor, ChatGPT and any other MCP client.
Why
Most database MCP servers offer two choices: read-only, or let the assistant write anything. Client-side "allow this tool?" prompts are answered by the same person who asked. The gate adds the step a team usually wants for production data: a supervisor approval by someone else, with the exact statement in front of them.
- Bound to the exact call. The approval covers one tool call with one set of arguments (shown with its fingerprint). If the statement changes, it needs a new approval. An approved call runs once.
- Fails closed. SQL the gate cannot read, and tools it does not know to be read-only, wait for approval. If the approval service cannot be reached, nothing runs.
- Your database stays yours. The gate runs where your database MCP server runs. Hibira only sees the approval request (title, statement, tool name), never your connection string or query results.
- Clear for the reviewer. The page shows the database label, the kind of
change (
UPDATE,DROP TABLE, ...), warnings such as "DELETE without WHERE changes every row", and the full statement.
[The supervisor's approvals inbox on her phone: UPDATE on shop-production is waiting for her] [The request in the approvals inbox: database, kind of change, the full statement and its fingerprint, with Approve and Reject] [The same request after the supervisor approved it, with who answered and when]
Setup
- Create a Hibira Approvals workspace at hibira.io/portal/approvals and invite the people who approve (store managers, DBAs, ...). They get requests on their phones and decide in the approvals inbox.
- Put the gate in front of your database MCP server in your client's config
(below). Everything after
--is the database server's usual command. There are no keys to copy. - The first time the assistant tries to change something, it answers with a link and a short code. A workspace admin opens it, picks the workspace and presses Connect. From then on the gate is connected; reads work all along.
To connect ahead of time from a terminal instead, run
npx -y @hibira-io/mcp-approval-gate login. status and logout work the
same way. The connection is a token, kept in
~/.config/hibira/approval-gate.json, that can only ask for and read that
workspace's approvals. Admins see every connected gate in the workspace
settings and can revoke one at any time.
Claude Code
Claude Desktop, Cursor, Windsurf, VS Code
claude_desktop_config.json, .cursor/mcp.json and the others take the same
shape:
postgres-mcp:
--access-mode=unrestricted is fine here: the gate is what holds writes back.
Supabase (local server):
execute_sql with a SELECT runs right away; writes, apply_migration,
deploy_edge_function, branch merges and project pauses wait for approval.
Supabase (hosted server):
ChatGPT and claude.ai (remote)
Web clients need an HTTPS URL, so run the gate as a small server next to your database and put HTTPS in front of it (your reverse proxy, a tunnel, or a platform such as Fly.io or Railway):
The endpoint is https://your-host/mcp/<GATE_TOKEN>; clients that can send
headers may use https://your-host/mcp with Authorization: Bearer <GATE_TOKEN>.
- ChatGPT: Settings → Apps & Connectors → Advanced → Developer mode, then Create: paste the URL with the token, authentication "No authentication".
- claude.ai: Settings → Connectors → Add custom connector, paste the URL with the token.
The gate refuses to listen on a non-local address without GATE_TOKEN.
A Dockerfile is included. In a container, where there is no
terminal to sign in from, pass the workspace token as
HIBIRA_APPROVALS_TOKEN (copy it from ~/.config/hibira/approval-gate.json
after login on any machine), or watch the gate's log for the connect link
on first start.
Beyond databases: presets
The gate works in front of any MCP server. For a few common ones, --preset
knows which tools only read and which change something, and gives the
approval a plain title such as "Stripe: POST /v1/refunds" or "GitHub: merge
pull request acme/shop#42". --allow and --gate still win over a preset.
Stripe (hosted server, with an agent API key):
GitHub (official server in Docker):
For Gmail and Shopify, put --preset gmail or --preset shopify in front of
the server you already use. Tools a preset does not know follow the usual
rules below.
What the assistant sees
A write call waits up to 50 seconds (--wait) for the decision, sending
progress updates so the client does not give up early:
- Approved: the call runs and its normal result comes back, with a line saying it was approved.
- Rejected or expired: an error saying it did not run, with the supervisor's comment if they left one.
- Still waiting: a short answer saying a supervisor has to approve it,
with an
approval_id. The gate adds one tool,check_approval: when the person says it is decided, the assistant calls it with thatapproval_id, and the call runs if it was approved. Asking for the same call again reuses the same request.
The assistant does not get the approval link when the gate is connected
to an Approvals workspace (its members are notified and decide signed in), or
when the request reaches the supervisor another way (--push-interests,
--push-users or --channel), so the person chatting with it cannot approve their own change
from the chat. Without any of those, the link is the only way to reach a
supervisor, so the assistant shows it for you to forward. --show-link always
or never overrides this.
What waits for approval
With the default --mode writes:
- Tools listed in
--gatealways wait; tools in--allownever do (a trailing*matches a prefix). - Calls with SQL (an argument named
sql,query,statement,queries, ...) wait if any statement changes something:INSERT,UPDATE,DELETE,MERGE,CREATE,ALTER,DROP,TRUNCATE,GRANT,COPY,CALL,DO,SET,VACUUM, data-changingWITH,SELECT ... INTO,EXPLAIN ANALYZEof a write,SELECTof functions such assetvalorpg_terminate_backend, and anything it cannot parse. Comments, strings and dollar-quoted bodies are skipped, soSELECT 'DROP TABLE x'is a read. - Other tools pass if they are marked
readOnlyHintor named like a read (list_,get_,search_,describe_,explain_,analyze_, ...). Everything else waits.
--mode all sends every call for approval, reads included. --mode none turns
the gate off (useful while testing).
The gate is a second pair of eyes, not a permission system. Give the database user only the rights it needs too.
Coding agents: approval before risky shell commands
The same package is a hook for Claude Code, Codex, Cursor and Hermes Agent. Shell commands that are hard to take back wait until a second person in your Hibira Approvals workspace approves them; everything else runs as usual.
Commands are read the way a shell reads them (&&, pipes, $( ), heredocs),
and wrappers such as sudo, env, bash -c, ssh host '...', npx and
uv run are looked through. SQL is classified like the MCP gate: a
psql -c "select ..." runs, a DELETE waits. Check any command with
npx -y @hibira-io/mcp-approval-gate hook check -- terraform apply.
The request shows the full command, why it waits, the folder, repository and branch, and the computer. Approvers get it on their phones; the agent never gets the link, so it cannot approve itself. An approval lets that exact command run once in that folder. A rejection (with its comment) goes back to the agent with an instruction to stop; if nobody answers within 10 minutes the agent is told to wait and run the same command again later.
Commands are checked on your computer: only the ones that wait create a request (and count toward the workspace's monthly requests). When the month's requests are used up, risky commands stay blocked and the agent says why; nothing is let through unasked.
Install. Connect this computer to your workspace once:
Then add the hook. With the Hibira agent plugin
marketplace: claude plugin install hibira-approval-hooks@hibira (Codex and
Cursor install the same plugin). Or add it by hand:
-
Claude Code,
~/.claude/settings.json(or the project's.claude/settings.json): -
Codex,
~/.codex/hooks.json(then trust it with/hooks): -
Cursor,
~/.cursor/hooks.json: -
Hermes Agent,
~/.hermes/config.yaml(Hermes waits at most 300 seconds for a hook, so the hook stops waiting after 280 and tells the agent to retry once it is approved). The Hibira Hermes container comes with this set up:
For a faster start on every command, install it once with
npm install -g @hibira-io/mcp-approval-gate and use
mcp-approval-gate hook claude as the command.
Settings go in ~/.config/hibira/approval-hook.json or the environment:
GATE_HOOK=off turns it off for one shell. A project can add its own
always rules and approvers in .hibira/approval-hook.json (it cannot add
never rules, so an agent cannot switch its own checks off by editing the
repository). This is a safety net against honest mistakes, not a sandbox: a
determined agent can disguise a command, so keep production credentials out
of the agent's reach as well.
Options
Pending calls live in the gate's memory. If the gate restarts, a waiting call is forgotten (nothing runs) and the assistant simply asks again.
Development
License
MIT
中文摘要
@hibira-io/mcp-approval-gate 套在任何数据库 MCP server(DBHub、postgres-mcp、Supabase MCP 等)外面:读取直接通过;写入、改表、删除会先停下,等另一个人(主管)在 Hibira 托管的审批页或手机推播上核准,核准后只按原样执行一次。
- 审批绑定这一次调用的完整参数(附指纹),SQL 改了就要重新审批。
- 设定了推播或频道时,助手拿不到审批链接,只有收到推播的主管能核准。
- 看不懂的 SQL、不确定是否只读的工具一律要审批;审批服务连不上就不执行。
- Gate 跑在你自己的环境,Hibira 只经手审批内容,不碰数据库密码,也看不到查询结果。
- Claude(Desktop / Code / claude.ai)、Cursor、ChatGPT 都能用;网页端用
--http加GATE_TOKEN。 - 设定:在 hibira.io 建立 Approvals 工作区并邀请审批人;设定里只要在
--后面接原本的数据库 MCP 指令,不用复制任何 Key。第一次要写入时,助手会给一个连接链接和代码,由工作区管理员登入后按「连接」即可(也可先执行npx -y @hibira-io/mcp-approval-gate login)。 - 编码代理审批钩子(Claude Code / Codex / Cursor / Hermes Agent):同一个套件也是 agent 的 hook。删档(
rm -rf)、git push --force、部署(vercel --prod、fly deploy、wrangler deploy)、terraform apply、发包(npm publish)、数据库写入等不可逆的 shell 指令,会先送到 Approvals 工作区等另一个人核准,核准后只放行那一次;其他指令照常执行。先执行一次npx -y @hibira-io/mcp-approval-gate login --label "coding agent",再装 agent-plugin 里的hibira-approval-hooks插件(或照上面手动加 hook)。
来源:README.md,提交 7f0d3bf
工具
0版本历史
2- v0.4.0最新Nov 13, 2026
- v0.2.0Nov 12, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
其他 Approval 集成
Approval Studio
studio.approval官方发布者
Approval Studio 是面向创意团队的在线校样平台,其远程 MCP 端点让助手凭 bearer 令牌连接该平台。

Mcp Approval Queue
由 GitHub 账号 Opafex 发布
一个本地的人类审批闸门,让 AI 智能体在执行高风险操作前请求许可,并等待真人决定。

Approval Gate Mcp
由 GitHub 账号 itcustomsolution 发布
本地 MCP 服务器,为 AI 代理的重大操作登记人工审批请求,支持过期、一次性消费与审计日志。
Approval Rules
com.botrecipe
让助手在执行重要操作前按用户规则判断:小额操作自动放行,其余生成可点击的审批卡片交由用户决定。

Korea Medical Device Approval Lookup (MFDS 의료기기 품목허가)
由 GitHub 账号 kr-data-api 发布
查询韩国 MFDS 医疗器械许可记录,返回许可编号、器械分类、许可持有人、制造商和状态。