← All posts
Gateway · Answer

How to limit what Claude Code can access

Control Claude Code with per-tool allow-lists, an approval inbox for risky moves, and hard spending budgets.

GW
· 3 min read
A digital gateway filtering AI tool calls

You limit what Claude Code can access by routing all its tool calls through the GainWix AI Studio gateway. This local-first control plane lets you set per-tool allow-lists, enforce an approval inbox for risky moves, and define hard spending budgets to prevent runaway costs. It's a simple shift. You stop trusting the model. You start trusting the rails.

What are the three levers of control?

You don't leave the keys in the lock. You use three specific tools to keep the agent honest.

LeverWhat it doesWhen to use it
Allow-listsBlocks specific tools or foldersStop AI from touching your .env or SSH keys
Approval InboxHolds risky moves for a clickPrevent accidental rm -rf on production
BudgetsSets hard limits on API spendStop an autonomous loop from costing $500

The allow-list is your first line of defense. You define exactly which folders the agent can see. For example, you can grant access to your /src folder but block your /config directory. The agent can't hallucinate its way past these rules. The gateway blocks the call before it ever hits your disk. It is total control.

The Approval Inbox handles the grey areas. Some tool calls are too risky to automate. When Claude Code tries to execute a destructive command, the gateway pauses the run. It sends a notification to your inbox. You check the intent and click approve or reject. It's a human-in-the-loop safety switch. You stay in charge.

Budgets stop the money bleed. Autonomous agents can get stuck in a loop. They might try ten different ways to fix a bug, burning through tokens in seconds. GainWix AI Studio sets a hard stop. Once the limit hits, the agent stops. No surprises on the invoice.

Your Team Is Already Using AI… Without Your Permission
Watch · 49s
Your Team Is Already Using AI… Without Your Permission
Watch with transcript →

Steps to limit access today

You can set this up in a few minutes.

  1. Download GainWix AI Studio from gainwix.ai.
  2. Connect your Claude Code instance to the gateway. This creates the one doorway for all tool calls.
  3. Open the security tab to define your allow-lists. Mark your sensitive directories as blocked.
  4. Set a daily budget in the cost shield. This prevents runaway costs.
  5. Enable the approval inbox for any tool that can modify the filesystem.

Now every tool call goes through one gateway you control. You can see this in action at our /security/ page.

What the gateway doesn't do

This isn't a firewall for your network. It doesn't stop Claude from reading a file if you've already given it access to that folder via the OS. It only controls the tool calls the agent tries to make. It's a control plane, not a sandbox.

If you want to understand how this fits into a larger architecture, read about our /blog/one-doorway/ approach. You can also see how this compares to the /blog/what-is-an-mcp-gateway/ model.

GainWix AI Studio is a local-first control plane. Your secrets and logs stay on your machine.

Questions people also ask

Does this slow down Claude Code?

No. The gateway works in milliseconds. You only wait when a risky move hits the approval inbox.

Can I set different limits for different projects?

Yes. Policies are local to your machine and apply to every tool call the agent makes.

Sources

  1. GainWix — Security — checked 7 September 2026
Try it with your own Claude

GainWix AI Studio is a free desktop download. Connect Claude Code, decide what it may touch, and hand off your first real job.

Download GainWix AI Studio ↓
Work with AI that works with you.
Keep reading
Abstract cover art for: What is an MCP gateway? One door for every Claude tool call
Gateway · 3 Sep 2026

What is an MCP gateway? One door for every Claude tool call

An MCP gateway is one controlled doorway that every AI tool call passes through, so you can log it, block it, or ask a human before it runs.

Read · 7 min
Abstract cover art for: One doorway between Claude and everything you own
Gateway · 14 Jul 2026

One doorway between Claude and everything you own

A short story about handing Claude Code a real job — and staying in control of every door it opens.

Read · 5 min
Abstract cover art for the GainWix 0.1.16 release note
GainWix Workmates · 4 Sep 2026

GainWix 0.1.16: an AI that already knows your work

Give your AI memory that lives in files you own. Release 0.1.16 fills your Second Brain by asking you one question at a time.

Read · 9 min