Supported agents
Gate ships seven adapters. The seventh is generic: any JSON file containing an mcpServers object.
Adapters
| Adapter | Files | Reads |
|---|---|---|
claude-code | .mcp.json, .claude/settings.json, .claude/settings.local.json | Servers, permission allow/deny rules, enableAllProjectMcpServers, defaultMode |
vscode | .vscode/mcp.json, .vscode/settings.json | Servers under servers or mcp.servers, chat.tools.autoApprove |
cursor | .cursor/mcp.json | Servers |
windsurf | .windsurf/mcp.json, .codeium/windsurf/mcp_config.json | Servers |
codex | .codex/config.toml, codex.toml | Servers, approval_policy, sandbox_mode |
gemini-cli | .gemini/settings.json | Servers, autoAccept |
generic-mcp | any JSON file containing mcpServers | Servers |
Adapters read configuration and normalise it. They contain no rule logic and no severity opinions, so supporting a new agent never means re-implementing security analysis.
The generic adapter
New agent frameworks appear faster than adapters can be written, and nearly all
of them copy the same JSON shape. The generic adapter walks the repository for
JSON files containing a recognisable mcpServers (or servers) object and
normalises them, so a developer using a tool Gate has never heard of still gets
a scan.
It runs last and skips files another adapter already claimed, so a .mcp.json
is never reported twice.
Selecting adapters
gate.config.ts
export default defineConfig({
adapters: {
// Empty include means "all detected adapters".
include: [],
exclude: ['generic-mcp'],
},
})
Adding one
An adapter is one file and one registry entry:
export interface AgentAdapter {
id: string
name: string
docs?: string
detect(context: ScanContext): Promise<boolean>
discover(context: ScanContext): Promise<DiscoveredAgentConfig[]>
}
ScanContext is a narrow, read-only view of the repository:
adapters cannot spawn processes, open sockets, or read outside the root. The
context is the enforcement point.
If the ecosystem uses the standard JSON shape, normalizeServerMap does the
rest. See packages/adapters/src/adapters/cursor.ts, which is nine lines of
logic.