إنتقل إلى المحتوى الرئيسي

Skills over MCP: Server-Delivered Skills

متقدّم
What you'll learn
  • Understand what changes when a skill arrives from an MCP server instead of a folder on disk
  • Call an MCP skill by its server:skill name, and predict the name a connector or plugin server gets
  • Write the permission rules that block, prompt for, or pre-approve one server's skills
  • Know which sessions, models and connections can't use MCP skills — the usual reason they "don't show up"
  • Guard the shell commands a skill runs while loading with the PreSkillShellCommand hook

Until now a skill was a folder: a SKILL.md plus scripts, sitting in ~/.claude/skills/, a project's .claude/skills/, or a plugin. An MCP server could give Claude tools, but the know-how for using those tools well — the checklist, the order of calls, the reference doc — had to be shipped separately and kept in sync by hand.

Skills over MCP closes that gap. A server can now serve skills alongside its tools, so the workflow travels with the service it describes. Claude Code added this as a beta in v2.1.331 and listed it in the v2.1.332 release notes on November 25, 2026. It is built on an official MCP extension, so it is not a Claude-only trick: any MCP host can implement it.

The protocol in one minute​

The extension is io.modelcontextprotocol/skills, specified in SEP-2640 (status: Final) and maintained by the Skills Over MCP Working Group. It adds two methods and reuses one MCP already had:

MethodWhat it does
skills/listLists skills with their full frontmatter and a file manifest — every file's URI, SHA-256 digest and byte size
skills/getFetches one skill entry by URI, even if it isn't listed
resources/readReads SKILL.md and supporting files — skills are delivered through the existing Resources primitive

A skill served this way is still an ordinary Agent Skill: a directory with a SKILL.md and optional files. Servers should use skill:// URIs. The design choice that matters most for you is the manifest:

The spec requires hosts to refuse content that fails verification, to restrict file reads to URIs in the manifest, and to revoke a saved approval when any file is changed, added or removed. That last rule is the protocol's answer to the rug pull: a server can still change a skill at any time, but it can't do it silently under an approval you gave to an earlier version.

Digests prove consistency, not safety

A matching SHA-256 only proves you got the bytes the server listed. It says nothing about whether those instructions are trustworthy. The spec says it plainly: hosts must treat skill content as untrusted input. A skill can direct Claude to run code — add only servers you trust.

Using MCP skills in Claude Code​

Guided walkthrough1 of 5
  1. Claude Code v2.1.331 or later, a Fable model or Claude Opus 4.8, Sonnet 5, Haiku 5.5 or later, and a direct connection to Anthropic with feature-flag fetching on. The full list of setups that can't use them is in the next section.

How the name is built​

Where the server comes fromSkill name
A server you added, named docsdocs:pdf
A claude.ai connector named "Docs"claude_ai_Docs:pdf
A docs server bundled in plugin my-pluginplugin_my-plugin_docs:pdf

In the server part, spaces and punctuation other than - become _.

Rules that block, prompt, or pre-approve​

Add these with /permissions, or in a settings file. Examples use a server named docs:

GoalListRule
Block all its skills, including typed commandsdenySkill(mcp__docs__*)
Block only its pdf skilldenySkill(docs:pdf)
Block its skills and its toolsdenymcp__docs
Prompt every time Claude loads oneaskSkill(mcp__docs__*)
Approve every version of its skillsallowSkill(mcp__docs__*)
.claude/settings.json — block one server's skills, prompt for another's
{
"permissions": {
"deny": ["Skill(mcp__scratch__*)"],
"ask": ["Skill(mcp__docs__*)"]
}
}

Three details trip people up:

  • An ask rule beats every mode. With an ask rule, Claude needs approval each time it loads the skill — even in auto and bypassPermissions modes.
  • allow only works in some places. Put it in user or managed settings; it covers servers added at user or local scope and managed servers, but not connectors, .mcp.json servers, or plugin servers. A skill-name allow rule can't skip the prompt either — set the rule on the server.
  • Deny doesn't stop resource reads. With deny rules, normal resource reads from the server still work. To stop Claude reading any server's resources — including an allowed skill's supporting files — deny ReadMcpResourceTool.

One more difference from a skill on disk: an MCP skill gets no allowed-tools grant. Whatever its frontmatter says, its tool calls go through your normal permissions.

Why MCP skills "don't show up"​

This is the beta's biggest source of confusion. MCP skills are not supported when any of these apply:

CategoryNot supported
SessionsCloud sessions, claude -p, claude remote-control server mode, GitHub Actions, the Agent SDK
Servers in the Desktop appConnectors, Desktop extensions, servers from claude_desktop_config.json
ConnectionsCloud providers, a custom ANTHROPIC_BASE_URL, apiKeyHelper, ANTHROPIC_AUTH_TOKEN
ComplianceOrganizations with a setting such as HIPAA or zero data retention (for connectors, also customer-managed encryption keys)

And by plan and login:

  • Pro, Max or Ultra with /login — on.
  • Team or Enterprise with /login — off until the organization turns them on (an Owner enables Skills over MCP for connectors; for other servers, disableDirectMcpSkills: false in managed settings).
  • Long-lived token from any of those plans — on.
  • API key or Console login — rolling out (off until the rollout reaches you). With a token, key or Console login, claude.ai connectors don't load, so only your other MCP servers can supply skills.

That first table means MCP skills are an interactive feature for now: a headless claude -p pipeline won't see them. If an unattended job depends on a skill, ship it as a file in the repo or a plugin instead.

Other limits: each server shows up to 100 skills; for scanned skills, 100 KB per text file and 400 KB per skill, and skills containing an archive or other unsupported binary (such as WebP or OTF) don't load. A server must support MCP revision 2026-07-28 or later — see MCP 2026-07-28: Stateless — and a stdio server that takes more than 3 seconds to start should be launched as the installed program rather than through npx.

Who scans what​

Anthropic scans skills from third-party Directory connectors you add on claude.ai, and from custom connectors while an Enterprise organization keeps "Skill and plugin security scanning" on. A version loads only after it passes. Anthropic does not scan skills from other servers — including Directory servers you add with claude mcp add. For those, the vetting is yours: see Vetting Agent Skills You Install.

Guarding skill shell commands: PreSkillShellCommand​

Skills can contain injected commands — !`git status` inline, or a fenced block opened with ```! — that run while the skill loads, so their output lands in the prompt. Here's the catch the new hook fixes: PreToolUse hooks don't fire for injected commands. A guard you wrote for Claude's own Bash calls never saw them.

PreSkillShellCommand (v2.1.332+) runs before each injected command, after the permission check on it, and also in bypassPermissions mode. It can only block — never approve or rewrite. To harden it, follow the docs' recipe:

.claude/settings.json (macOS/Linux)
{
"hooks": {
"PreSkillShellCommand": [
{
"matcher": "Bash|PowerShell",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PROJECT_DIR}/.claude/hooks/block-rm.sh",
"args": [],
"onFailure": "block"
}
]
}
]
}
}
  • Matcher Bash|PowerShell covers both tools that run injected commands.
  • A non-async command, http or mcp_tool hook. A prompt or agent hook on this event can't run, and Claude Code blocks every command it matches.
  • Define it in settings or a plugin, not in the skill's own frontmatter. On a skill's first load in a session, inside a subagent, or in a forked skill, its own frontmatter hooks don't apply.
  • onFailure: "block", so a hook that crashes or times out doesn't wave the command through.
  • Keep the script on PreToolUse too. In auto mode, a command that would need approval doesn't run at load time — Claude may run it later as a normal tool call, which fires PreToolUse, not this event.

The hook's input adds command_name (the skill loading), command_source (such as userSettings, projectSettings, plugin, builtin) and invoked_by (user, claude, or other). Exit 2 or return permissionDecision: "deny" and the skill still loads, but Claude reads [not run: blocked by hook: <reason>] instead of the output. Return continue: false to stop the whole skill from loading.

Update before you add it

Claude Code v2.1.331 and older run injected commands without calling this hook — and a settings file that names it opens every interactive session with an Unknown hook event warning. Upgrade first; to enforce it across a team, use the requiredMinimumVersion setting. If you simply don't want skills running shell commands at all, "disableSkillShellExecution": true in managed settings replaces them with a placeholder (bundled and managed skills are exempt).

Test it safely, as the docs suggest: create .claude/skills/hook-test/SKILL.md containing only the line below, then type /hook-test. The echo deletes nothing; with the block-rm script installed you should see a Not run in /hook-test line.

Contents of .claude/skills/hook-test/SKILL.md

!`echo 'rm -rf'`

Beyond Claude: who else speaks this​

Because it's an MCP extension, a skills-serving server isn't tied to one assistant. The community-maintained extension support matrix tracks which hosts implement it; when this page was verified it listed ChatGPT with partial support, along with tooling such as the MCP Inspector (which can verify a server's skills) and fast-agent. Support is moving quickly — check the matrix rather than trusting any static list, including this one. To build one, start from the ext-skills specification and see Build Your First MCP Server.

Common mistakes​

  • Expecting MCP skills in CI. claude -p, GitHub Actions and the Agent SDK can't use them. Keep pipeline skills in the repo.
  • Relying on a PreToolUse guard. It never sees a skill's load-time shell commands; add PreSkillShellCommand too.
  • Writing allow for a connector. allow rules don't cover connectors, .mcp.json servers or plugin servers.
  • Trusting "it passed the scan" for every server. Only certain connectors are scanned; claude mcp add servers are not.
  • Assuming one approval lasts forever. "Allow this version" means exactly that — any change to the skill's files brings the prompt (or classifier) back.

Check yourself

0/3
  1. Your PreToolUse hook blocks `rm -rf`. A skill's SKILL.md contains an injected `!` command that runs `rm -rf`. What happens before v2.1.332's new hook is configured?
  2. A server named `docs` comes from a claude.ai connector called "Docs". What's its `pdf` skill called?
  3. You approved "Allow this version" for a skill. The server later edits one supporting file. What happens?
Key takeaways
  • MCP servers can now serve skills alongside tools via the official io.modelcontextprotocol/skills extension (SEP-2640, Final)
  • In Claude Code they're a public beta (v2.1.331+), named server:skill, interactive only — not in claude -p, GitHub Actions or the Agent SDK
  • Control them per server with Skill(mcp__name__*) rules; an ask rule prompts even in auto and bypass modes
  • Approvals are bound to the exact file manifest — any change asks again
  • PreToolUse never saw a skill's load-time shell commands; PreSkillShellCommand (v2.1.332+) can block them

Next​