经 AI Skill Hub 精选评估,门槛 获评「强烈推荐」。这款MCP工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 8.0 分,适合有一定技术背景的用户使用。
门槛 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
门槛 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/GaaraZhu/gate
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"--": {
"command": "npx",
"args": ["-y", "gate"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 门槛 执行以下任务... Claude: [自动调用 门槛 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"__": {
"command": "npx",
"args": ["-y", "gate"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
<p align="center"> <img src="assets/banner.png" alt="gate" width="600"> </p>
<p align="center"> <strong>A deterministic privacy boundary between your data and AI.<br>Intercepts query results before the model sees them — rule-driven, reproducible, and audit-ready.</strong> </p>
<p align="center"> <a href="https://github.com/GaaraZhu/gate/actions"><img src="https://github.com/GaaraZhu/gate/workflows/CI/badge.svg" alt="CI"></a> <a href="https://github.com/GaaraZhu/gate/releases"><img src="https://img.shields.io/github/v/release/GaaraZhu/gate" alt="Release"></a> <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a> <a href="https://github.com/GaaraZhu/homebrew-gate"><img src="https://img.shields.io/badge/homebrew-tap-orange?logo=homebrew" alt="Homebrew"></a> </p>
<p align="center"> <strong>English</strong> | <a href="README.zh-CN.md">简体中文</a> </p>
---
AI agents increasingly access internal databases and APIs through CLI tools, scripts, and MCP servers. Without safeguards, sensitive data such as emails, phone numbers, tax identifiers, and payment details can be unintentionally exposed to LLM context windows.
gate intercepts query results before they reach the model and automatically redacts detected PII fields without requiring changes to existing agent workflows or prompts. It covers both access paths agents use: Bash commands (via a harness hook) and MCP server calls (via a wrap-style stdio proxy), adding < 10 ms of overhead per query.
gate uninstall
brew uninstall gate
gate uninstall removes gate hooks from all harnesses, the config directory at ~/.config/gate/, and any gate-generated plugin files. It shows what will be deleted and asks for confirmation.
# Homebrew — macOS and Linux (recommended)
brew tap GaaraZhu/gate && brew install gate
# cargo binstall — downloads a prebuilt binary
cargo binstall gate
# Or grab a binary from the releases page
# https://github.com/GaaraZhu/gate/releases
~/.config/gate/config.yaml in your editor): gate config
# Claude Code (default)
gate init
# OpenCode
gate init --harness opencode
# Cursor
gate init --harness cursor
# GitHub Copilot CLI (project-scoped, run from repo root)
gate init --harness copilot-cli
# Codex CLI
gate init --harness codex
Add --scope project for project-only setup. Restart your OpenCode or Cursor session after gate init to load the hook. For Codex CLI, restart the session, then review the hook in the Trust & Permissions UI, mark it as trusted, and enable it. For Copilot CLI, the generated .github/hooks/PreToolUse.json is gitignored by default — each developer runs gate init --harness copilot-cli once in their local clone.
tools/call responses also pass through gate: # Claude Code (default) — dry-run, shows what would change
gate init --wrap-mcp
# OpenCode
gate init --harness opencode --wrap-mcp --yes
# Cursor
gate init --harness cursor --wrap-mcp --yes
# Copilot CLI
gate init --harness copilot-cli --wrap-mcp --yes
# Codex CLI
gate init --harness codex --wrap-mcp --yes
Add --scope project for project-level MCP config. For Cursor project-scoped MCP, re-enable the servers in Settings → Tools & MCPs after registration. See docs/mcp.md for --servers, per-harness paths, and manual single-server registration.
gate intercepts query commands automatically. No changes to your prompts or tools required.Run gate validate to confirm your config is valid before the first session.
The demo walks through three steps:
gate scan detecting PII columns across the schema before any query runscard_number fully visiblecard_number redacted across both MCP and Bash paths
Also works with OpenCode, Cursor, GitHub Copilot CLI, and Codex CLI — see Supported AI Tools for the full compatibility matrix.
For the design rationale, threat-model walkthrough, and detection-pipeline deep dive, read Introducing gate.
For a stronger guarantee, transfer ownership of the config to root so the agent cannot modify it:
sudo gate protect # any future enable/disable/config/allowlist now needs sudo
sudo gate unprotect # restore direct write access
Enforced at the OS level across all harnesses (Claude Code, OpenCode, Cursor, GitHub Copilot CLI, Codex CLI). Not supported on Windows.
高质量的开源MCP工具,保护数据隐私
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
AI Skill Hub 点评:门槛 的核心功能完整,质量优秀。对于Claude Desktop / Claude Code 用户来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | gate |
| 原始描述 | 开源MCP工具:A deterministic privacy boundary between your data and AI.。⭐23 · Rust |
| Topics | ai-governanceai-privacyai-security |
| GitHub | https://github.com/GaaraZhu/gate |
| License | MIT |
| 语言 | Rust |
收录时间:2026-05-26 · 更新时间:2026-05-26 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端