GA

gatekit-ai/gatekit

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

40 stars 5 forks 质量 70 趋势 0Apache-2.0

gatekit-ai/gatekit 是一个从 https://github.com/gatekit-ai/gatekit. 导入的 MCP 服务器候选

概览

gatekit-ai/gatekit 是一个从 https://github.com/gatekit-ai/gatekit. 导入的 MCP 服务器候选

概述(AI 翻译)

一个可被黑的MCP网关。

Gatekit 是一个模型上下文协议网关,用于控制你的大型语言模型(LLM)与 MCP 工具之间的流量,以提高可见性、安全性和控制力。

它自带工具管理、内容安全、审计日志和令牌使用跟踪插件。支持本地 stdio 服务器和远程 HTTP/SSE 服务器。

需要自定义行为吗?用插件扩展,不要用分支。 你的自定义保持独立,这样你可以持续获得Gatekit更新,不会合并冲突。

内置插件处理:

  • 工具管理 — 只展示你想要的工具,重命名和修改描述以更清晰的上下文和更好的发现性
  • 内容安全——在PII和秘密信息离开你的机器前捕捉,防御基本的提示注入攻击(基于正则表达式)
  • 审计日志 — 调试故障,跟踪使用情况,检查完整的请求和响应正文
  • 令牌使用跟踪 — 估算每台服务器和工具的令牌消耗,支持CSV导出
  • Stdio服务器沙箱 — 利用操作系统原生隔离(macOS Seatbelt、Linux 气泡膜)限制本地 MCP 服务器在你机器上可访问的内容

Gatekit 配置编辑器(终端界面)

快速启动

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Gatekit

A hackable MCP gateway.

Gatekit is a Model Context Protocol gateway that controls traffic between your LLM and MCP tools for better visibility, security, and control.

It ships with plugins for tool management, content security, audit logging, and token usage tracking. Supports both local stdio servers and remote HTTP/SSE servers.

Need custom behavior? Extend with plugins, not forks. Your customizations stay separate, so you can keep getting Gatekit updates without merge conflicts.

Built-in plugins handle:

  • Tool management — expose only the tools you want, rename and modify descriptions for cleaner context and better discoverability
  • Content security — catch PII and secrets before they leave your machine, defend against basic prompt injection attacks (regex-based)
  • Audit logging — debug failures, track usage, inspect full request and response bodies
  • Token usage tracking — estimate token consumption per server and tool, with CSV export
  • Stdio server sandboxing — restrict what local MCP servers can access on your machine using OS-native isolation (macOS Seatbelt, Linux bubblewrap)

Gatekit configuration editor (Terminal UI)

Quick Start

Installation

# With uv (recommended)
uv tool install gatekit

# With pipx
pipx install gatekit

# With pip (in a virtual environment)
pip install gatekit

Requires Python 3.10+. Works on macOS, Linux, and Windows.

Usage

gatekit

Guided Setup

The TUI includes a guided setup wizard that:

  1. Auto-detects MCP clients on your system (Claude Desktop, Codex, Claude Code, Cursor, Windsurf)
  2. Discovers all configured MCP servers from each client
  3. Generates a complete Gatekit configuration
  4. Provides client-specific setup instructions with copy buttons
  5. Creates restore scripts in case you want to revert

Manual Configuration

For MCP clients not detected by Guided Setup, configure Gatekit as an MCP server with command and args:

{
  "servers": {
    "gatekit": {
      "command": "gatekit-gateway",
      "args": ["--config", "/absolute/path/to/gatekit.yaml"]
    }
  }
}

Example for VS Code (.vscode/mcp.json):

{
  "servers": {
    "gatekit": {
      "command": "gatekit-gateway",
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →