Claude Code plugin or MCP server: where your permission rules stop
8m read time

Claude Code plugin or MCP server: where your permission rules stop

Shipping the same skill as a plugin or over MCP looks like a packaging choice. I measured it on Claude Code 2.1.334: your deny rules and your sandbox hold for every kind of skill, but not for what an MCP tool runs itself.

evidence0/5 deny rules that stopped the MCP toolClaude Code 2.1.3343 sourcesDecember 2, 2026
own measurement
One skill shipped four ways, each cell run three times in interactive sessions, plus separate runs for Read, Edit, sandbox and skill deny rules
tested on
Claude Code 2.1.334
checked
December 2, 2026

A reminder came up today: revisit the article on Claude Code plugins versus MCP. I went looking for it. There was no article. Apparently I forgot to publish it.

So my reminders are now a post ahead of my blog. Fine, I'll write it then.

The question behind it is a good one. You have a skill and you want to share it. Two routes are obvious: a plugin, or an MCP server that serves it. It feels like choosing between two kinds of packaging.

It turned out to be a different choice. The line runs between a skill and a tool, and that is where your permission rules stop.

Deny rules and the sandbox block Bash, Read and Edit, while the MCP server goes around the wall to the files.

One skill, four wrappers ​

I put the same skill into Claude Code 2.1.334 four ways:

  • Plugin: a SKILL.md with a reference.md beside it and a line !`date -u +%Y`.
  • MCP skill: the same skill through Skills over MCP, the extension that lets a server serve real skills. According to the documentation it is in public beta, from 2.1.331.
  • MCP prompt: the same text as an MCP prompt, the file as an MCP resource. The older workaround.
  • MCP tool: a load_skill tool that returns the skill text and the file, and runs the date command itself.

Each one had to do three things: load the supporting file, run a harmless shell command, and honour the same permission settings. Once with Bash(date:*) on the allow list, once on the deny list.

A skill that asks for the current year. Security testing rarely gets more thrilling.

Each reference file holds its own canary string, so the answer gives away which route delivered it. The tool server appends its own process ID to the date output, so I can see who actually ran the command. Every cell ran three times, in an interactive session with its own config folder and an empty repo.

PluginMCP skillMCP promptMCP tool
File reached the modelvia Read, asks permissionthe model fetched the resource itself, no promptthe model fetched the resource itself, no promptinside the tool result
!`date` allowedClaude Code runs it before the model sees the skillnot run, literal textnot run, literal textrun by the server
!`date` deniedwhole skill abortednot runnot runrun anyway by the server

Three rounds, the same result in every cell each time.

What the plugin gets right ​

The plugin fails closed. With Bash(date:*) denied, Claude Code neither runs the line nor quietly skips it. The whole skill stops:

text
Shell command permission check failed for pattern "!`date -u +%Y`"

The model sees nothing. That is what the skills documentation says too: an injected command that matches a deny rule aborts the skill.

With both MCP variants, the same line reached the model as plain text in every run. Safer. Also a lot less useful if your skill needs live context.

The MCP skill obeys your rules too ​

An MCP skill cannot get a shell line executed, but it can ask Claude to run something. So I made a second MCP skill with one instruction: run date -u +%Y with the Bash tool.

With date on the allow list, Bash ran the command without a prompt. On the deny list, this came back:

text
Permission to use Bash with command date -u +%Y has been denied.

Three times each. A skill, from a plugin or from an MCP server, has Claude do the work with its own tools. Your rules are already sitting there.

The MCP skill also has a gate of its own. Let the model load it and Claude Code asks: "Use skill "probe:probe-ms"? This skill can direct Claude to run code." Pick "Allow this version" and a rule with that version's hash lands in your user settings. After that it loaded without a prompt, until I changed the reference file on the server. Then the prompt came back, headed "Skill changed." Type the command yourself and Claude Code asks nothing.

A Skill(mcp__probe__*) deny rule stopped the skill, typed and model-loaded alike. The supporting file stayed readable through ReadMcpResourceTool, exactly as the MCP documentation warns.

So far, everything answers to your rules.

Where your rules stop ​

Then the MCP tool.

With Bash(date:*) denied, Claude Code asked permission for mcp__probe__load_skill. After the one approval the server ran date without blinking. In all four deny runs.

That could still have been a quirk of Bash rules. So I stretched it. An fs_probe tool on the same server reads secret.txt and writes owned.txt, and in the same session I had Claude attempt the read itself:

SetClaude itselfThe MCP tool
deny Read(secret.txt)"File is in a directory that is denied by your permission settings."read SECRET-91f2
deny Edit(owned.txt)n/awrote owned.txt
sandbox, denyRead on secret.txtcat: secret.txt: Permission deniedread SECRET-91f2
sandbox, denyWrite on owned.txtowned.txt: Permission deniedwrote owned.txt

Add the Bash deny and that makes five rules. 0/5 stopped the tool.

The only gate was the prompt asking whether that one tool call could go ahead.

The sandbox wraps Bash and leaves the server alone because the server is a different process. Sandboxing Claude Code covers what Claude runs itself, and an MCP server is something Claude Code starts and then only talks to. Your permission rules work at the tool level, and for an MCP tool the tool call is all there is. According to the permissions documentation, a deny rule on the tool itself, such as mcp__probe, does stop that call. I did not test that one. The sandbox post also covers the sandbox runtime, which wraps the whole process including MCP servers. Not tested either.

"Don't ask again" covers one tool, forever ​

Pick "Yes, and don't ask again" on that prompt and Claude Code writes mcp__probe__load_skill to permissions.allow in your repo's .claude/settings.local.json. The next call ran without a prompt, same server, with the date deny still neatly in place.

A different tool on the same server did prompt again. What you approve is one tool, and with it everything that tool will ever do. With the MCP skill, the prompt came back when the server changed something. Here your settings hold only a tool name, no version.

A plugin with a server inside changes nothing ​

A plugin may bring its own MCP server through a .mcp.json. That is how I distribute MCP servers myself, in my own plugin marketplace. So I tested that too: the same server, now inside a plugin, the same Bash deny.

It ran date just as cheerfully.

If you thought "then I'll just make it a plugin" closes the gap: so did I. For about ten minutes.

The plugin's supporting file ​

The plugin had one annoyance: its supporting file cost a permission prompt. With a directory marketplace, and with a git marketplace install into the plugin cache. Either way the file sits outside your working directory, and there Read asks.

You can remove that with allowed-tools in the SKILL.md frontmatter. Three variants measured:

allowed-toolsPrompt for the file
Readnone
Read(//<absolute skill path>/**)none
Read(${CLAUDE_SKILL_DIR}/**)still prompts

The last one matches the documentation: in allowed-tools, ${CLAUDE_SKILL_DIR} is only substituted in Bash rules.

The first one reaches further than you would want. While the skill was still running, I asked for an unrelated file outside the project. Read, no prompt.

One turn later the same kind of Read politely asked permission again. A bare Read means: read anything, for as long as the skill runs.

A side note for anyone who sometimes misses the "Yes, allow reading from … during this session" option: it disappeared from a folder path of 162 characters and was still there at 160. With a config folder as long as ~/.claude, the path to my test plugin stayed under that limit. The permissions documentation only says those options appear when the prompt can show you everything they would allow. Why the cut sits exactly there, I did not dig into.

What to do with it ​

  • Ship work that has to execute as a skill. Plugin or MCP skill then matters little for your rules: either way Claude runs it with its own tools and your deny rules hold.
  • Read an MCP tool approval as trust in the whole process. Saying yes to one tool call is saying yes to whatever the server does inside that call. Your Bash, Read and Edit rules and your sandbox play no part in it, so vet the server before you install it.
  • Be stingy with "don't ask again". It is per tool and permanent, in a file that lives in your repo.
  • Scope allowed-tools to an absolute path, never a bare Read, if you want the plugin's file prompt gone.

One more thing. The first test round ran in a folder under my home directory, and there the test sessions loaded my own rules. Including the one that checks my calendar at the start of every session. So in the middle of a security test, the MCP session first wanted to know what I was up to this week.

The answer was no.

I started with a question about packaging and ended at the question of who signs off. A skill has Claude do the work, with your rules attached. An MCP tool asks once whether it may, and after that the only thing that applies is whatever is in its own code.

(45 of 45)
1My Claude Code setup: status line, plugins and terminal2Superpowers: teaching Claude Code to think before it types3Claude Code hooks: deterministic control over AI workflows4The CLAUDE.md file: give your AI permanent memory5Stop asking your agent nicely6What's new in Claude Code: notes from the London talk7The best number in Opus 4.8 isn't a benchmark8Stale memory is worse than no memory9The agent is just a loop10Build an MCP server, then ask whether it should exist11Skill, subagent, hook, or slash command? Pick the right one12Log in to MCP servers from your shell13How to give Claude safe access to your SQL database14The day 'default' became 'Manual'15Claude Code skills: how to write one that works16How to write a proper Claude Code subagent17Claude Code permissions: the guide I wish the docs were18Sandboxing Claude Code: put your agent in a box that holds19Prompt injection defense for developers who ship agents20Best Claude model for coding: which one for which task21Refactoring legacy code with a coding agent: start with characterization tests22MCP server authentication: OAuth, scopes and rate limits23Opus 5 is here and your effort settings just expired24AI agent incident response: what to do when your coding agent goes wrong25Claude Code /doctor command: what it checks and fixes26Claude Code context management: when to /clear and when to /compact27Git worktrees for parallel coding agents: what they isolate and what they share28Claude Code plan mode: decide before the agent writes29Debugging with a coding agent: give it the search, keep the hypothesis30Claude Code checkpoints and /rewind: how to undo an agent's changes31Claude Code cross-session messaging: how to make your sessions talk to each other32Audit logging for AI agents: what Claude Code records and what deserves a human33Sharing Claude Code config across a team: what a repo can and cannot enforce34Claude Code timestamps: your session has no clock35Claude Code in a large codebase: scoping an agent to the part that matters36Recovering a Claude Code session your picker will not show you37Where Claude Code spends its time: a month of my own sessions, measured38Steering Claude Code mid-task: Esc, queued messages and /btw39Claude Code auto mode: why your Agent allow rule does nothing40Claude Code Superpowers: what subagent-driven development costs in tokens41Read-only database access for Claude: the role, the flag and Azure without passwords42Claude Code keeps asking for permission: every mode, measured43Build a Claude Code plugin marketplace, on GitHub Enterprise too44Your Claude Code file-protection hook doesn't see Bash45Claude Code plugin or MCP server: where your permission rules stop