Connect your agents
Vardhold finds every agent on the PC by itself. This page explains how each one is covered, and the one step MCP servers need.
On this page
Coverage at a glance#
| Agent | Discovered | Checked before it runs | Recorded as it happens |
|---|---|---|---|
| Claude Code | Yes | Hook | Yes |
| Cursor | Yes | Hooks | Yes |
| GitHub Copilot CLI | Yes | Hook | Yes |
| Any MCP server (stdio or HTTP) | Yes | Proxy, once the server is protected | Yes |
| Claude Desktop, Windsurf (Devin Desktop), VS Code with GitHub Copilot and other extensions, Kiro, Google Antigravity, Trae, OpenAI Codex CLI, Gemini CLI, Qwen Code, OpenCode, Amp, Augment Auggie, Kilo Code CLI, Cline CLI, Letta Code, Goose, Crush, Aider, OpenClaw, Hermes Agent | Yes | Their MCP servers, through the proxy | Yes |
| Local models and their apps: Ollama, LM Studio, llama.cpp, Jan, AnythingLLM, Open WebUI | Yes | – | Yes |
Pre-execution coverage for more agents, through their own hook systems, is first on the roadmap.
Claude Code#
The installer registers vardhold-hook as a PreToolUse hook in Claude Code's managed settings, which apply to every user and which user or project settings cannot remove. Before each tool call (shell commands, background monitors, file reads and edits, web fetches and MCP tools) the hook asks the service and returns its verdict. Tools without a specific check, including ones Claude Code adds later, are recorded with their arguments, and every file path, URL or command in those arguments is checked like the real action.
- Fast: the hook is compiled to native code and adds about 45 ms to a check.
- Fail closed: the hook is registered so that if it crashes, is missing or times out, Claude Code blocks the call (Claude Code 2.1.295 or later).
- Clear to the agent: a block comes back with the rule and the reason, so Claude can explain it and try another way.
Sessions that were open before the install pick up the hook when they restart. To install without it, use INSTALLCLAUDEHOOK=0.
Cursor#
The installer adds Vardhold to Cursor's enterprise hooks file, C:\ProgramData\Cursor\hooks.json, which only administrators can change. It checks:
- shell commands, before they run
- MCP tool calls, before they run
- file reads, before the agent reads the file
- searches with Grep, as a read of the folder or file searched (the workspace when no path is given)
- files attached to a prompt or a read, before they are sent to the model: an attached secret stops the prompt
- file edits and deletes made by the agent
In a workspace with several folders, each file is judged against the folder it is in, so work in a second project folder is not taken for work outside the project.
The Cursor CLI (cursor-agent) is recognised as its own agent, Cursor CLI: its processes are recorded and evaluated like any command-line agent, and when Cursor's hooks run for it, its actions are recorded under its own name.
The hooks are registered to fail closed. Edits made by Tab completion, which a person accepts keystroke by keystroke, are not agent actions and are not checked. Restart Cursor once after installing. To install without the hooks, use INSTALLCURSORHOOK=0.
GitHub Copilot CLI#
The installer adds Vardhold as a policy hook in a file of its own, C:\ProgramData\GitHub\Copilot\policy.d\vardhold.json, which only administrators can change. Copilot runs policy hooks for every user and session, before any other hooks, in every folder whether trusted or not, and disableAllHooks cannot turn them off. Before each tool call the hook asks the service. It checks:
- shell commands (bash and PowerShell)
- files viewed, created and edited, and every file a patch adds, changes or deletes
- searches, as a read of the folder searched
- web fetches and web searches
- MCP tools and any other tool: recorded with their arguments, and every file path, URL or command in them checked like the real action
A block comes back to Copilot with the rule and the reason. When Vardhold allows an action, the hook says nothing, so Copilot's own permission prompts still apply.
If the hook crashes, Copilot blocks the call. If the hook times out, Copilot lets the call through; the hook is therefore given 61 minutes, longer than any approval can wait. Start a new Copilot CLI session after installing. To install without the hook, use INSTALLCOPILOTHOOK=0. Copilot in VS Code and Copilot's cloud agent do not use this hook.
MCP servers#
MCP servers give agents tools: databases, browsers, ticketing systems, shells. Vardhold scans the configuration of every MCP client it knows on the PC and lists each server on the dashboard's MCP servers page: Claude Desktop, Claude Code (user, project and .mcp.json), Cursor, VS Code and VS Code Insiders, the Cline and Roo Code extensions, Windsurf, Codex (~/.codex/config.toml), Gemini CLI, GitHub Copilot CLI, Kiro, Amazon Q, LM Studio, the Cline CLI, OpenClaw (~/.openclaw/openclaw.json, when it is plain JSON rather than JSON5-only syntax), Hermes Agent, Goose and OpenCode.
Hermes Agent and Goose keep their servers in YAML, and OpenCode writes a server's command as one list. Vardhold lists these servers and raises the same alerts for them, but does not rewrite those files, so it cannot protect them with the switch: route them through vardhold-mcp-proxy by hand.
Servers defined inside a project are found too: .mcp.json, .cursor/mcp.json, .vscode/mcp.json, .gemini/settings.json, .kiro/settings/mcp.json and .roo/mcp.json, in the 200 most recently used project folders. Vardhold learns those folders from what VS Code and the editors built on it record when they open a folder, and from Claude Code's project list. Only folders on local drives are read.
Listing a server does not protect it. Its calls are checked only once it runs through the Vardhold proxy, which you turn on per server, or for every server with one setting.
Protect a server#
- Open the dashboard from the tray icon and go to MCP servers.
- Turn on Protect for the server. Vardhold rewrites the client's configuration so the server starts behind
vardhold-mcp-proxy, keeping a backup of the original. - Restart the MCP client.
From then on, every tools/call is checked against the policy before it reaches the server, including the paths, URLs and commands in the tool's arguments, nested ones too. Resource reads (resources/read) are checked as well: a file: resource as reading that file, a web address as a connection. A rule such as mcp-shell-tools can ask before any tool that runs shell commands. HTTP servers are routed through the service.
For an HTTP server, Vardhold writes a forwarder address with a random key into the client's configuration, so only that client can use it. Because the service makes the connection, the agent's own blocks apply to it as well: nothing is forwarded while the kill switch is on, while the server or its client is blocked, or while the client's network is blocked. The connection is checked against net.connect rules. Link-local addresses, which include the cloud metadata address, are never connected to. Neither is Vardhold's own port. Servers on other local ports and on private networks are allowed.
Protect every server automatically#
In Settings, turn on Protect every MCP server automatically (administrator confirmation). At every scan, Vardhold then routes each unprotected server through the proxy, new ones included, and records that it did. Servers in a project's own config are the exception: such files are often checked in and shared, so Vardhold does not rewrite them on its own. Protect them one by one. A server you turn protection off for is left alone. Restart the MCP client after a server is protected. A Codex entry written in a form Vardhold cannot change with certainty is listed but not edited; protect it by hand.
Stay protected#
Vardhold re-scans MCP configurations every minute. If a protected server stops being routed through Vardhold, for example because an agent edited the configuration, a high-severity alert is raised. A new server that is not protected raises a medium one, so nothing new appears unnoticed.
A medium-severity alert is also raised when a client is set to run a server's tools without asking the person first: alwaysAllow in Cline and Roo Code, autoApprove in Kiro, Amazon Q and others, trust: true in Gemini CLI. It is raised once, and again whenever more tools are added. The alert says whether Vardhold still checks those calls, which it does once the server is protected.
Every other agent#
Vardhold recognises agents from signatures (executable names, install locations and command lines) and attributes every process to the agent that started it, so a node or python process launched by an agent is counted as that agent's work.
A desktop app's or IDE's top-level process writing its own data under AppData (its cache, its settings, the profile of a browser built into it) is the app at work, not the agent, and is not recorded, unless a high or critical rule matches, such as a write to SSH keys or to Vardhold itself. Everything else is recorded and evaluated: the app's helper processes (VS Code's extension host, where Copilot and Cline run, for example), its writes anywhere outside AppData or into the Startup folder, and everything the processes, tools and MCP servers it starts do.
Two kinds of process are not counted as the agent's, whoever started them. A browser an agent opens, and any program in a browser's install folder, is the person's browser writing its own profile. A terminal you open inside a desktop app or IDE (VS Code, Cursor, Windsurf, Claude Desktop's terminal panel) is yours: what you type there is your work, not the app's agent. An agent you start in that terminal, such as Claude Code, is still recognised as itself. The trade-off: commands an IDE's built-in agent runs in that same integrated terminal look identical and are not counted as the agent's either. Cursor's are still checked before they run by its hook; for other IDE agents, Vardhold sees them as the person's.
Self-hosted and always-on agents#
OpenClaw and Hermes Agent run in the background, often from a scheduled task, and take instructions from messaging apps such as Telegram, Slack or WhatsApp. Vardhold recognises them by their install folders (~/.openclaw, %LOCALAPPDATA%\hermes), so everything they run is counted as theirs even when nobody is at the PC. llama.cpp's server is a local model, but started with --tools or --agent it can run shell commands and write files: it is then listed as its own agent, llama.cpp server (agent tools on). The default policy keeps their API keys and sign-ins (~/.openclaw/credentials, Hermes's .env and auth.json, Goose's secrets.yaml, the Cline CLI's providers.json) from being read by hooked agents, and asks before their MCP configurations are changed. They are recorded as they act; none of them is checked before it acts yet.
A private Windows telemetry (ETW) session records the process starts, file writes, creates, deletes, renames and network connections of every agent process. A connection is named after the DNS lookup that returned its address, so host rules such as *.github.com and the known-hosts list apply to it. Several sites can share one address, so the name is the one the process most likely asked for. A connection made without a lookup Vardhold saw keeps its address. These events are evaluated against the same policy. Because they are seen as they happen, a matching block rule raises an alert rather than preventing the action. You then respond with:
- Suspend, resume or end the agent's processes from the dashboard, the CLI or the kill switch.
- Block the agent's network access with Windows Defender Firewall rules, one visible rule group per agent.
- Automatic suspension on a detected block, an opt-in setting for headless agents (CLI agents and MCP servers). It never applies to desktop or IDE apps a person is using.
Response actions are aimed at agents only. System and security processes, shared runtimes such as node, python and browsers, and Vardhold itself are always refused.
Trust an agent#
On the Agents page each agent has a trust level:
| Trust | Effect |
|---|---|
unknown | The default. The policy applies as written. |
allowed (trusted) | The same rules apply, except where a rule sets verdict_trusted. Nothing else changes, so the policy states everything trust does. |
blocked | Every checked action is denied. |
Blocking an agent is open to anyone at the PC. Trusting one, or lifting a block, needs administrator confirmation.