CLAUDE LABJP
DESIGN — Claude Design gets a major update: design-system imports, direct canvas editing, and more export formatsCODE — Claude Design can start from your local codebase and hand a design off to Claude Code to implementFABLE — Fable 5, a Mythos-class model made safe for general use, is now available in Claude Code v2.1.170FIX — Mid-stream connection drops now preserve partial responses instead of showing a raw errorSCROLL — A new wheelScrollAccelerationEnabled setting disables mouse-wheel scroll acceleration in fullscreenTIER — The Claude Design beta is available to Pro, Max, Team, and Enterprise customersDESIGN — Claude Design gets a major update: design-system imports, direct canvas editing, and more export formatsCODE — Claude Design can start from your local codebase and hand a design off to Claude Code to implementFABLE — Fable 5, a Mythos-class model made safe for general use, is now available in Claude Code v2.1.170FIX — Mid-stream connection drops now preserve partial responses instead of showing a raw errorSCROLL — A new wheelScrollAccelerationEnabled setting disables mouse-wheel scroll acceleration in fullscreenTIER — The Claude Design beta is available to Pro, Max, Team, and Enterprise customers
Articles/Claude Code
Claude Code/2026-06-18Advanced

Give an Unattended Agent Only the MCP Tools It Needs — Enforcing a Deny-by-Default Policy

An unattended Claude Code agent can't lean on a permission prompt, so whatever a tool can reach becomes the blast radius. Here's how to lock MCP servers and tools down to deny-by-default and hand back only what the job needs, with managed-settings.json examples.

claude-code120mcp12permissions3automation69

Premium Article

The agents I launch on a schedule have no one standing by to click the permission prompt.

I run Dolice Labs as an indie developer, and across several sites I kick off Claude Code-based agents at fixed times every day. Early on, one of those unattended agents reached for tools it had no business touching, then sat waiting on a permission dialog that no one was there to answer — frozen until morning.

In an interactive session, a risky tool call surfaces on screen and I can stop it. In unattended operation, that last line of defense simply isn't there. So before asking "what should make it stop," the better question is "what can it reach at all" — and that belongs in configuration. This piece is about denying MCP servers and their tools by default, then handing back only what the job actually needs.

For an unattended agent, reach is the blast radius

The same permission settings mean very different things in interactive versus unattended use.

Interactively, the ask permission mode is effectively a safety net. Tool calls it isn't sure about get routed to you, so even a loose allowlist is survivable because a human makes the final call.

Unattended, there is no one to ask. A tool that isn't allowed stalls; one that is allowed simply runs. There's no middle. So for an unattended agent, the breadth of the allowlist is exactly the breadth of what can happen without anyone watching.

For me, MCP-backed tools were where this bit hardest. An agent whose only job was to generate an article and push it could still see a filesystem-wide MCP server and a browser-automation MCP. For that job, the reach was obviously far too wide.

Per-tool allow and "policy enforcement" live on different layers

The easy thing to conflate here is project-level permissions versus policy enforced at a higher layer.

The permissions.allow / permissions.deny keys in settings.json are project or user settings. Convenient — but because they live at a layer you can also write to, another setting can override them. For automation, it's worth asking: what happens if this agent's settings file gets rewritten somehow?

Managed (administrator-layer) settings exist precisely to set a floor that lower local settings cannot override. Claude Code reads settings across several layers and resolves them roughly in this order of precedence:

PriorityLayerTypical locationOverridable from below
HighManaged policyOS system locationNo
MidCommand-line flags-- options at launch
MidProject settings.claude/settings.jsonYes
LowUser settings~/.claude/settings.jsonYes

The key move is to put an unattended agent's "floor" at that top layer. However the local settings get touched, the deny survives.

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
Build a configuration that denies MCP servers and tools by default and hands back only the necessary ones via an allowlist, with concrete managed-settings.json examples
Understand how per-tool allow lists differ from policy enforced at a higher layer, so you can set a floor that local settings cannot override
Learn how to confirm at startup that the policy is actually in effect, plus the precedence and fallback traps I hit running my own unattended pipelines
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

Related Articles

Claude Code2026-03-24
How to Automate Game Development with Claude Code × unity-mcp — A Complete Workflow from Concept to Release
Learn how to combine Claude Code with unity-mcp to automate Unity game development. The hcg-workflows skill set provides an 8-phase workflow from planning to deployment.
Claude Code2026-06-18
Claude Code Adds /cd — Carrying Your Warm Cache Across Repositories
Claude Code's new /cd moves a running session to another working directory without rebuilding the prompt cache. Here are the design calls and pitfalls when you sweep across several repositories in one sitting.
Claude Code2026-06-14
Running Claude Code Hooks as a Quality Gate Without Breaking Your Pipeline
An implementation note on running Claude Code Hooks as a safety valve for automation: when to block with exit code 2 versus JSON output, how to keep formatters from looping or over-blocking, and how to log every hook firing so misfires are traceable.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →