> ## Documentation Index
> Fetch the complete documentation index at: https://docs.barndoor.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Govern tools only (MCP only)

> For admins: what Bridge does when it governs tool traffic but not models, how each client behaves on a person's own Claude or OpenAI sign-in, what that guarantees, and how to lock your Barndoor gateway into Claude Code.

This page is for admins whose organization has Bridge govern **MCP only**, or who are deciding whether it should. The other Bridge pages describe the default, **Models and MCP**; this page says what's different. To switch modes, see [Choose what Bridge governs](https://docs.barndoor.ai/how-tos/barndoor-bridge/set-up-your-organization.md#choose-what-bridge-governs).

Choose **MCP only** when you want Barndoor to govern tools and data, and people keep the model access they already have: their own Claude or ChatGPT plan, or their own API key.

## What's governed

| | Models and MCP (default) | MCP only |
| - | - | - |
| **Model requests** | Through your LLM Gateway, under Model Access and model data protection | Straight to the provider, on the person's own sign-in. Barndoor doesn't see them. |
| **Barndoor tools**, remote and local | Policy, approvals, data protection, and audit on every call | The same |
| **The client's own built-in tools** (files, shell, web, browser) | [Client settings](https://docs.barndoor.ai/how-tos/barndoor-bridge/client-settings.md) decide which stay on | Each client's defaults. Client settings don't apply. |
| **Reporting** | LLM Usage Dashboard and MCP Usage Dashboard | MCP Usage Dashboard and the tool-call audit log only |

Because model requests don't pass through Barndoor, set up nothing under **Model Routes**, **Model Access**, or **Client settings** for this mode. Connect your MCP servers, turn on the local tools people need, and write the policies that grant them, as in [Give people tools](https://docs.barndoor.ai/how-tos/barndoor-bridge/set-up-your-organization.md#give-people-tools).

## What each client does

People still start each client from Bridge. That's what adds the Barndoor MCP server.

| Client | Runs as | Barndoor MCP server | The person's own MCP servers |
| - | - | - | - |
| **Claude Desktop** | The person's own Claude Desktop, on their own Claude sign-in. No second copy. | Added to their Claude Desktop configuration as `barndoor` | Still load, including their claude.ai connectors |
| **Claude Code** CLI (`barndoor run claude`) | Claude Code on the person's own Claude sign-in and their own model choice | Added for the session | Don't load. Their settings and hooks are left out too. |
| **Codex** CLI (`barndoor run codex`) | Codex on the person's own ChatGPT or API sign-in and their own model choice. | Added for the session | Don't load |
| **Codex Desktop** | Codex Desktop on the person's own sign-in, in the folder they choose | Added for the session | Don't load |
| **Kilo** | Doesn't launch. Kilo runs only on Barndoor's models, so `barndoor run kilo` is refused with a message naming your organization's Bridge setting. On a computer without Kilo, people see the "not installed" or `kilo executable not found in PATH` message instead. | | |

Each terminal launch prints one line saying so: `barndoor: your organization's Bridge setting governs tool traffic only; the client uses its own model sign-in`.

### The Codex policy and plain `codex`

If your Macs have the [Codex policy](https://docs.barndoor.ai/how-tos/barndoor-bridge/provider-lockdown.md#codex-policy), which the MDM updater installs unless you opt out, `codex` started outside Bridge fails with `requirements.toml allowed_permission_profiles refers to undefined profile barndoor-active`. Under **MCP only** that means people lose plain Codex: only `barndoor run codex` and **Launch Codex Desktop** work. Opt out of the Codex policy if people need to run Codex on its own.

## What it guarantees

* **Every Barndoor tool call is governed.** Remote and local tools both work through the Barndoor MCP server, under your policies, approvals, and data protection, and every call is audited. The server runs on the person's computer, so tools that run locally work as they do under **Models and MCP**.
* **Claude Code and Codex sessions started from Bridge have Barndoor as their only MCP server.**
* **In Claude Desktop, the Barndoor server isn't locked in.** It's an entry named `barndoor` in the person's own configuration. They can switch it off or remove it, and launching from Bridge again puts it back. Their own connectors and MCP servers run beside it, outside your policies. On a personal sign-in, Claude Desktop accepts managed MCP servers only in its Code tab, so its chat can't be locked.
* **A client opened directly, not from Bridge, has no Barndoor server** unless you add one for it; see the next section.

If you need Claude Desktop itself locked to Barndoor, use **Models and MCP** with the [Claude Desktop managed profile](https://docs.barndoor.ai/how-tos/barndoor-bridge/provider-lockdown.md#claude-desktop-managed-profile).

## Managed Barndoor server for Claude Code

In Claude Desktop, the Barndoor MCP server Bridge adds is the person's to remove. This profile adds your Barndoor gateway to Claude Code as a server the organization provides, which people can't remove. It isn't in the MDM kit: you write and deploy it yourself.

It uses Claude Code's own managed settings, so it applies to the Claude Code CLI and to the **Code** tab in Claude Desktop, on a personal claude.ai sign-in.

1. Create a configuration profile with a custom settings payload for the preference domain `com.anthropic.claudecode`, at device scope, with this content. Replace `{{your-org}}` with your organization's Barndoor host.

   ```xml theme={null}
   <key>managedMcpServers</key>
   <dict>
     <key>barndoor-gateway</key>
     <dict>
       <key>type</key>
       <string>http</string>
       <key>url</key>
       <string>https://{{your-org}}.platform.barndoor.ai/mcp</string>
     </dict>
   </dict>
   ```

2. Keep the name `barndoor-gateway`, or another name that isn't `barndoor`: a managed server named `barndoor` would replace the one Bridge adds, and local tools would stop working. Deploy it to the same devices as Bridge. Claude Code picks it up on its next start; Claude Desktop needs a restart.

3. Each person signs in to Barndoor once. In a terminal, Claude Code shows the server as needing authentication under `/mcp`; in Claude Desktop's Code tab, a **Reconnect barndoor-gateway** prompt appears in the session.

4. On a Mac, check it:

   ```bash theme={null}
   claude mcp get barndoor-gateway
   ```

   Expect `Scope: Managed settings (provided by your organization)`. `claude mcp remove barndoor-gateway` is refused.

Things to know:

* **Remote tools only.** This server is your hosted gateway, which can't reach the laptop. It still lists tools that run locally, but calling one returns `runs locally via barndoor-cli and is not executable through the platform router`. For local tools, people use the `barndoor` server Bridge adds.
* **Not Claude Desktop's chat.** Claude Desktop on a personal sign-in ignores managed MCP servers outside the Code tab, and the server doesn't appear in the **Connectors** menu, so there's no switch to turn it off.
* **Don't combine it with [provider lockdown](https://docs.barndoor.ai/how-tos/barndoor-bridge/provider-lockdown.md#provider-lockdown).** A managed-settings profile for Claude Code makes it ignore the Claude policy's managed settings file entirely, including Barndoor's hooks, and `barndoor doctor` reports the policy as overridden. Lockdown also blocks the direct provider access that **MCP only** sessions need.
* **To allow only Barndoor,** Claude Code's managed settings also take `disableClaudeAiConnectors` (no claude.ai connectors) and `allowedMcpServers` (an allowlist for servers people add; an empty list allows none, and the managed server stays). These are Anthropic's settings, not Barndoor's; see the [Claude Code documentation](https://code.claude.com/docs/en), and roll them out to a few Macs before the whole fleet.

## If people also have the hosted Barndoor connector in Claude

Some people also have Barndoor added as a connector on their claude.ai account, the hosted gateway. Under **MCP only**, Claude Desktop then shows two Barndoor connectors: `barndoor` from Bridge, and their own. With both on, Claude can pick the hosted connector, in Chat and in the Code tab.

The hosted connector lists the tools that run on the laptop but can't run them:

* **In Chat**, a local tool is refused with a message that it only runs locally through barndoor-cli.
* **In the Code tab**, the agent may instead run `barndoor tools call` in its own shell. The call works, but the audit log records it under the agent **Barndoor CLI**, not Claude.
* **Remote tools** work through the hosted connector and are audited under Claude.

**The fix:** in each chat or Code session where people need local tools, turn the hosted connector off under **+ → Connectors**, or remove it from their claude.ai account. With it off, Claude uses Bridge's `barndoor`, and both local and remote tools run, audited under Claude. [Get started](https://docs.barndoor.ai/how-tos/barndoor-bridge/using-bridge.md#claude-desktop) tells people this.

## What people see

* **Launching Claude Desktop while it's open.** From Bridge v0.1.250, on macOS the Bridge window asks **Quit Claude Desktop?** and, if the person agrees, quits it and opens it again with `barndoor` added. `barndoor run claude-desktop` in a terminal quits and reopens it without asking. On Windows, Bridge can't quit Claude Desktop for them, because closing its window leaves it running in the notification area: the launch is refused, and the person quits Claude Desktop and launches again. With an earlier Bridge, Claude Desktop must be fully quit before launching it from Bridge: if it's already open, `barndoor` may not appear, or may disappear the next time the person changes a setting, because Claude Desktop rewrites its configuration from memory.
* **Their own `barndoor` entry.** If someone already has a `barndoor` server of their own in Claude Desktop's configuration, Bridge leaves it as it is and says so. Local tools then depend on that entry.
* **Local tools refused through the hosted gateway.** A local tool called through a claude.ai connector, or the managed server above, is refused: the managed server returns `runs locally via barndoor-cli and is not executable through the platform router`. The `barndoor` server from Bridge runs it. See [the section above](#if-people-also-have-the-hosted-barndoor-connector-in-claude).

Fixes for these are under [Common problems](https://docs.barndoor.ai/how-tos/barndoor-bridge/monitor-and-troubleshoot.md#common-problems).

## Switching back to Models and MCP

When you set the organization back to **Models and MCP** while someone's Claude Desktop is open, Bridge leaves the `barndoor` entry in place until Claude Desktop quits. Once they quit it and Bridge syncs, the entry is removed from their Claude Desktop configuration, and it doesn't come back when they reopen Claude Desktop.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.