Local AI tool control
Some AI tools run on the computer and start their own helper programs, called MCP servers. Claude Code, Cursor, Codex, Claude Desktop and Gemini CLI work this way. Local AI tool control lets the…
Written By Christopher Scaminaci
Last updated 13 days ago
Some AI tools run on the computer and start their own helper programs, called MCP servers. Claude Code, Cursor, Codex, Claude Desktop and Gemini CLI work this way. Local AI tool control lets the endpoint agent see each tool call these AI tools make. It then applies your approvals and your data rules to the call. This page needs the Pro plan or higher. On a lower plan the agent only finds the tools and enforces nothing.
At a glance
- What it does: applies your approvals and data rules to the tool calls that local AI tools make.
- Plan: Pro and above.
- Who: an Administrator.
- Where you set it up: AI Governance → Staff computers → Endpoint agent.
- Where you see the data: Activity → Activity explorer and Activity → Findings.
The control is off for every tool until you choose. You choose on the Endpoint agent page, in the Local AI tools section. What the agent is, and what it never does, is in The StackJack endpoint agent.
The two ways to watch a tool
- A hook. The AI tool calls the agent before each tool call and waits for the answer. The agent says yes, or it says no with a short sentence that the AI tool shows to the person. Claude Code and Cursor use hooks.
- A wrap. The agent stands between the AI tool and each of its MCP servers. The tool starts the agent, and the agent starts the real server and passes the messages between them. The agent can stop a call on the way. Codex and Claude Desktop use a wrap.
What the agent decides
For each tool call the agent asks three questions, in this order.
- Which server is it? The agent identifies a server by what starts it (its command) or by its exact web address, never by the name the AI tool shows. A server that is not on your approved list is stopped when your list allows only approved servers. A server on your denied list is always stopped.
- Which tool of the server is it? If you set a tool list for an approved server, the agent stops a tool that the list does not allow. The list can name the only tools allowed, or the tools that are not allowed.
- What does the call carry? The arguments of the call and the result are checked with the same data rules as everywhere else in AI Governance. What happens follows your rules: allowed, masked, asked first, or stopped. Only this third question can send text to StackJack, and only when the capture level allows text. At the facts-only capture level no text leaves the computer. See Capture levels and what your employer sees.
The first two questions are answered on the computer, from the policy copy the agent keeps. They work at every capture level and when StackJack cannot be reached. A hook that cannot tell which server made a call does not stop the call on a guess. A call that goes through the StackJack MCP proxy is judged by the proxy, so the agent does not judge it a second time.
When the agent stops a call, the person sees a short sentence in the AI tool. If a server is already approved or denied in your lists, the same lists apply here. To approve servers, see Setting up the MCP proxy.
Safe by default when something is missing
A hook must never be the reason AI work stops. If the agent has no policy yet, cannot reach its service, cannot read the tool's message, or fails inside itself, the call goes through. The agent records a fact that the call was not checked. The one exception you control is Block AI tools when StackJack cannot be reached on the policy page. See Endpoint agent policy.
Editing a staff member's own settings
A hook for Claude Code, Cursor and Gemini CLI is placed in settings that apply to the whole computer, so no staff member's files are touched. Codex and Claude Desktop have no such place. To wrap them, the agent changes the staff member's own settings file for that tool. The switch for this is Edit staff members' own AI tool settings. It is on by default.
When the agent edits a file, it follows these rules:
- It keeps a backup of the original. The first time the agent changes a file, it copies the original next to it. The copy has the same name followed by
.stackjack-backup. The copy is made once and is never overwritten, so it always holds what the person had. - It changes only what it must. It wraps each local MCP server in the agent. A server that is already wrapped is not wrapped again. A file that the agent cannot read as a whole is left alone.
- It writes the file safely. The new file is written beside the old one and swapped in at once, so no tool reads a half-written file. The file keeps its owner and its access rights.
- It runs only when you allow it. The edit runs only when the endpoint agent is on, the switch is on, and the tool is set to a wrap. The helper for the signed-in person does this once for each new policy.
- Codex has one exception. When your list of approved MCP servers allows only approved servers, the agent does not wrap Codex. Codex checks a server by its command name. A wrapped server has the agent's name, so the wrap would stop every approved server too. Claude Desktop is not affected.
How to undo it
- For one computer or one person. Run
stackjack-agent unwrap-configson the computer. It puts every wrapped server back as it was. It works whatever the policy says, so the way back is never closed. - For the whole organization. Turn the switch off, or set each tool to Off. A wrapped server keeps working when the policy is off. The agent passes its messages through and checks nothing. Run the unwrap command, or remove the agent, to take the wrap out of the files.
- To get the original file back. The person or your technician copies the
.stackjack-backupfile over the changed file. The backup is the file as it was before the first change. A change the person made to the file after that is not in the backup.
Removing the agent does not put the files back by itself. Run the unwrap command first if you want the files restored.
What staff notice
Staff see no change in how their AI tools work while the agent allows a call. When the agent stops a call, the AI tool shows the short sentence. For apps and sites, the agent also shows a notice from the tray. See The endpoint agent for staff.
When something does not work
Was this helpful?
More in Connect your AI
Data sourcesSend telemetry from coding toolsSettings for staff machinesDelivering the settings through your RMMStill need help? Ask the team