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 醫療器材許可紀錄,回傳許可編號、器材分類、許可持有人、製造商與狀態。