Supported agents

Gate ships seven adapters. The seventh is generic: any JSON file containing an mcpServers object.

Adapters

AdapterFilesReads
claude-code.mcp.json, .claude/settings.json, .claude/settings.local.jsonServers, permission allow/deny rules, enableAllProjectMcpServers, defaultMode
vscode.vscode/mcp.json, .vscode/settings.jsonServers under servers or mcp.servers, chat.tools.autoApprove
cursor.cursor/mcp.jsonServers
windsurf.windsurf/mcp.json, .codeium/windsurf/mcp_config.jsonServers
codex.codex/config.toml, codex.tomlServers, approval_policy, sandbox_mode
gemini-cli.gemini/settings.jsonServers, autoAccept
generic-mcpany JSON file containing mcpServersServers

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.

Was this page helpful?