---
title: "Skills vs MCP: token cost, security, and when to use each"
type: "deep dive"
url: "https://aifordevs.org/articles/skills-vs-mcp"
markdown: "https://aifordevs.org/articles/skills-vs-mcp.md"
publisher: "AI for Devs"
license: "https://aifordevs.org/reuse"
attribution: "Credit AI for Devs and link to https://aifordevs.org/articles/skills-vs-mcp"
description: "Skills vs MCP compared on context cost per loading stage, security, governance, and portability, with a rule for when to write a skill, run a server, or both."
author: "AI for Devs"
published: "2026-11-25"
level: "Intermediate"
topics: ["mcp", "context"]
---

# Skills vs MCP: token cost, security, and when to use each

Skills vs MCP compared on context cost per loading stage, security, governance, and portability, with a rule for when to write a skill, run a server, or both.

> **TL;DR**
>
> - Skills vs MCP comes down to procedure versus access. A skill is a folder of instructions and scripts that teaches an agent how to do a task. An MCP server is a program that gives an agent live tools and data.
> - A skill costs about 100 tokens until a request triggers it, and its body stays under 5,000 tokens. An MCP host that loads every tool definition upfront spent about 150,000 tokens in the MCP project's own example, against about 2,000 with tool search.
> - A skill's risk is its supply chain, because it runs with the agent's access. An MCP server's risk is the live credentials it holds and the tool metadata it sends to the model.
> - Skills are governed like code, in git and pull requests. MCP access is governed where the calls pass, which is where an MCP gateway such as Bifrost applies per-key tool allow-lists and holds writes for approval.
> - Most production agents need both in the same task: the skill says which tools to call and in what order, and the MCP server performs the calls.

Skills vs MCP is a question about where knowledge lives and where access lives. An agent skill is a folder with a `SKILL.md` file that the agent reads when a task matches its description, plus any scripts and reference files it needs. An [MCP server](https://aifordevs.org/glossary#mcp-server) is a program that exposes tools, resources, and prompts to AI applications over the [Model Context Protocol](https://aifordevs.org/glossary#mcp). Anthropic's [guidance on combining them](https://claude.com/blog/extending-claude-capabilities-with-skills-mcp-servers) puts the split in one line: if you are explaining how to do something, write a skill, and if the model needs to access something, use MCP.

This article compares the two on the dimensions that decide the choice in practice: what each costs in the [context window](https://aifordevs.org/glossary#context-window) at each loading stage, what each exposes to attackers, who governs it, and where it runs. How to write a `SKILL.md` is covered in the guide to [Claude skills](https://aifordevs.org/articles/claude-skills), and the protocol itself in [what is MCP](https://aifordevs.org/articles/what-is-mcp). Facts below are as of November 23, 2026.

## Skills vs MCP at a glance

A skill packages procedure and runs inside the agent's own environment. An MCP server packages access and runs as a separate process, local or remote, that the host connects to. The table lines up the differences that matter when you pick one.

| Dimension | Agent skill | MCP server |
| --- | --- | --- |
| What it carries | Instructions, reference files, scripts | Tools, resources, and prompts backed by live systems |
| Format | `SKILL.md` with YAML frontmatter, in a folder | JSON-RPC 2.0 messages over stdio or Streamable HTTP |
| In context at session start | About 100 tokens per skill | Tool definitions, unless the host defers them |
| Where its code runs | The agent's shell or sandbox | The server's own process |
| Holds credentials | No, it borrows the agent's access | Yes, for the systems it wraps |
| Network access | Set by the surface; none on the Claude API | The server's own, outside the agent's sandbox |
| Main risk | A malicious or careless file in the bundle | Live credentials and poisoned tool metadata |
| Governed through | Git, code review, distribution | Authorization on each call |

The rows that most often decide the choice are credentials and context. If the task needs a credential for a system of record, it needs a server. If the task needs a long procedure that only some requests use, it needs a skill.

## What each one loads into context

A skill loads in three stages, and only the first costs tokens before a task asks for it. MCP tool definitions cost tokens as soon as the host hands them to the model, which a naive host does at the start of every conversation. The gap between the two shrinks once the host defers definitions, and that is now the default in Claude Code.

Anthropic's [Agent Skills overview](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview) lists the cost of each skill stage:

- Metadata: the `name` and `description` go into the [system prompt](https://aifordevs.org/glossary#system-prompt) at startup, at about 100 [tokens](https://aifordevs.org/glossary#token) per skill.
- Instructions: when a request matches the description, the agent reads the `SKILL.md` body, which Anthropic keeps under 5,000 tokens.
- Resources and code: reference files cost nothing until read. Scripts run through bash, and only their output enters context.

The MCP project describes the other side in its [client best practices guide](https://modelcontextprotocol.io/docs/2026-07-28/develop/clients/client-best-practices). With dozens of servers and hundreds of tools, a host that passes every definition upfront spends most of the window before the model reads the user's message. The guide's example puts that at about 150,000 tokens, against about 2,000 with progressive discovery.

**Figure 1.** On a log scale, 50 idle skills cost about as much context as a triggered one. The outlier is an MCP host that sends every definition upfront; tool search brings MCP back into the same range as skills.

The guide does not say loading everything is wrong. For a handful of tools it is fine, and the guide recommends switching to discovery once definitions pass a threshold such as 1% to 5% of the window. Claude Code goes further. Its [MCP documentation](https://code.claude.com/docs/en/mcp) says tool search is on by default: only tool names and server instructions load at session start, and full definitions load when Claude needs a tool. Setting `ENABLE_TOOL_SEARCH=auto` instead loads tools upfront until their definitions reach 10% of the window.

Tool results are a second cost that skills mostly avoid. Each direct tool call returns its full result to the model. Claude Code warns when one MCP tool output passes 10,000 tokens and caps it at 25,000 by default, configurable with `MAX_MCP_OUTPUT_TOKENS`. A skill script that validates a 5,000-line file returns one line. Code mode, which the MCP guide calls programmatic tool calling, applies the same idea to MCP: the model writes a script that calls tools in a sandbox, and only the final output returns.

Tool descriptions also cost accuracy, not just tokens. A [study of 856 tools across 103 MCP servers](https://arxiv.org/abs/2602.14878) found at least one defect in 97.1% of tool descriptions, and 56% did not state their purpose clearly. Rewriting them raised median task success by 5.85 percentage points but added 67.46% more execution steps. A skill that names the right tool for each step removes much of that guessing, which is one reason the two work better together. The guide to [context engineering](https://aifordevs.org/articles/context-engineering) covers the rest of the window budget.

## The security surface of each

A skill is a supply-chain risk and an MCP server is a live-access risk. Both reach the model the same way, as text in its context, and both can steer it into calls the user did not intend. The defenses differ because the asset at risk differs: for a skill it is the agent's existing access, and for a server it is the credentials the server holds.

A skill adds no permissions of its own. Its instructions and scripts run with whatever the agent can already reach, which on Claude Code means [full network access](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview) and the user's files. Anthropic tells teams to use skills only from trusted sources, audit every bundled file, and treat a skill like installing software. The warning has data behind it: a [February 2026 survey of agent skills research](https://arxiv.org/abs/2602.12430) cites empirical analyses that found vulnerabilities in 26.1% of community-contributed skills. Claude Enterprise can scan custom skills uploaded in claude.ai and Cowork, but not skills uploaded through the Skills API or the Console.

An MCP server holds real credentials and performs actions on request. The [tools specification](https://modelcontextprotocol.io/specification/2026-07-28/server/tools) says servers must validate inputs, enforce access controls, rate limit calls, and sanitize outputs. It says there should always be a human in the loop who can deny a tool call, and that clients must treat tool annotations as untrusted unless the server is trusted. Tool metadata is an attack path of its own: [threat modeling of seven MCP clients](https://arxiv.org/abs/2603.22489) found tool poisoning, where instructions hide in a tool's metadata, to be the most prevalent client-side vulnerability.

| Threat | Agent skill | MCP server | Control |
| --- | --- | --- | --- |
| Hidden instructions | In `SKILL.md` or a reference file | In a tool description or result | Read every file; treat tool metadata as untrusted |
| Code you did not review | A bundled script | The server binary or startup command | Pin the reviewed version |
| Credential exposure | Scripts that read the user's environment | Tokens the server stores | Scope credentials per user or per key |
| Unwanted writes | Bash or file tools the agent already has | Write tools the server exposes | Human approval on writes |
| Silent change after review | A marketplace update | A server update or a changed tool list | Version pinning and change review |

Review a skill the way you review a pull request, and review an MCP server the way you review a service account with write access. The longer checklist for the server side is in [MCP security risks](https://aifordevs.org/articles/what-is-mcp), and the skill side in [running third-party skills safely](https://aifordevs.org/articles/claude-skills).

## Governance: files versus calls

Skills are files, so you govern them the way you govern code: in git, through review, and by controlling where they are installed. MCP access is a stream of calls, so you govern it where those calls pass, by deciding which caller may list and call which tool. The two need different owners and different tools.

A skill's governance problem is distribution. Anthropic's docs say custom skills do not sync across surfaces: a skill uploaded to claude.ai must be uploaded again for the API, and Claude Code skills live on the filesystem apart from both. Sharing differs too. On the Claude API, uploaded skills are available to everyone in the workspace, while Claude Code skills are personal, per project, or shipped in a plugin.

MCP's governance point is the authorization on each request. The tools specification lets a server vary its `tools/list` response by the authorization presented, for example by returning only the tools the caller's granted scopes permit. That makes the server, or a gateway in front of many servers, the natural place to decide which agent can call which tool. Per-server rules drift as servers multiply, which is the problem an MCP gateway exists to solve. The roundup of [MCP gateways](https://aifordevs.org/articles/best-mcp-gateways) compares the options.

## Governing MCP tool traffic with Bifrost

[Bifrost](https://www.getmaxim.ai), an [open-source AI gateway](https://github.com/maximhq/bifrost), is the MCP gateway to start with for governing tool calls. It routes model calls and tool calls through one control plane, so the same virtual keys, budgets, and logs apply to both, and it serves every connected tool to clients through one `/mcp` endpoint.

Three of its controls map onto the gaps above, as of November 23, 2026:

- Per-key tool filtering. Each virtual key carries an [allow-list of MCP tools](https://docs.getbifrost.ai/features/governance/mcp-tools) per server, and a key with no MCP configuration gets no tools unless a server is marked Allow by Default. A caller's own `x-bf-mcp-include-tools` header can narrow that list but never widen it, and the key's limits apply again when a tool runs.
- Execution approval. When a model returns tool calls, Bifrost [does not run them](https://docs.getbifrost.ai/mcp/tool-execution). Your application reviews each one and sends the approved calls to `/v1/mcp/tool/execute`. [Agent Mode](https://docs.getbifrost.ai/mcp/agent-mode) runs only the tools listed in `tools_to_auto_execute`, which is empty by default, and returns any other call to the application unrun.
- Context cost. With [Code Mode](https://docs.getbifrost.ai/mcp/code-mode), the model sees four meta-tools, reads Python stubs for the servers it needs, and runs a script in a sandboxed Starlark interpreter. The Bifrost team's published benchmark with 508 tools across 16 servers cut input tokens by 92.8%, and auto-execute limits still apply to each call inside the script.

Bifrost also governs the skill side. Its [Skills Repository](https://docs.getbifrost.ai/features/skills-repository) stores each save as an immutable version, serves a chosen version, and publishes skills as plugin marketplaces that Claude Code and Codex install from. Management actions are permission-gated, but the marketplace and download URLs are public so that CLI agents can fetch them, so a skill served this way must never contain a secret.

MCP servers that employees add on their own laptops never reach a gateway's config. Bifrost applies [governance](https://www.getmaxim.ai/resources/governance) and security controls such as virtual keys, guardrails, and audit logs at the gateway, and [Bifrost Edge](https://www.getmaxim.ai/edge) extends them to employee machines: it [inventories the MCP servers](https://docs.getbifrost.ai/edge/mcp-governance) configured in supported AI apps and enforces allow or deny decisions on each device. The guide to [shadow AI](https://aifordevs.org/articles/shadow-ai) covers that fleet-wide view.

## Portability: where each one runs

Both formats are open, but they travel differently. A skill folder moves between agents that implement the format, while its runtime changes under it. An MCP server runs once and serves any compliant host, while each host decides how much of it the model sees.

The `SKILL.md` format is published as an [open specification](https://agentskills.io/specification), and the MCP project's own [guide to building with agent skills](https://modelcontextprotocol.io/docs/2026-07-28/develop/build-with-agent-skills) says the files work with any agent that implements the standard. The same folder does not behave the same everywhere, though:

| Surface | Network for skill scripts | How a skill gets there |
| --- | --- | --- |
| Claude API | None, and no runtime package installs | Upload through `/v1/skills` |
| Claude Code | Full, like any program on the machine | A folder on disk or a plugin |
| claude.ai | Full, partial, or none, set by admins | Zip upload in settings |
| Other skill-aware agents | Set by that agent | That agent's skills location |

A skill that calls an API in Claude Code fails on the Claude API, where the container has no network. MCP has the opposite shape. A remote server over Streamable HTTP serves every compliant host from one deployment, and a local stdio server runs wherever the host can launch it. What varies is the host: one defers definitions and another loads them all. If a task must reach the network from every surface, put that access in a server and keep the skill to procedure.

## Combining a skill and an MCP server in one task

Combine them when a task needs both judgment and access. The skill says what to do, in what order, and when to stop and ask. The MCP server performs each call with its own credentials. Neither one alone covers the task.

Take incident triage. An MCP server exposes `query_incidents` and `create_ticket`. A skill named for triage tells the agent to query open incidents for the affected service first, run a bundled script that scores severity from the results, fill the five fields your team requires on every ticket, and ask a person before creating the ticket. The MCP client guide describes the host side of the same pairing: a skill can declare which servers it needs, and the host connects them only when that skill is invoked.

**Figure 2.** The skill's body loads only when the request matches, and its script returns a single line. Behind Bifrost, the read-only query runs on its own, while the write comes back to the app until a person approves it.

The pairing also splits the controls cleanly. The skill's review happens once, in the pull request that changes it. The server's controls apply on every call: the virtual key allows two tools, `query_incidents` is listed for auto-execution because it only reads, and `create_ticket` is not. The guide to [tool calling](https://aifordevs.org/articles/tool-calling) covers the request and result format both sides rely on.

## When to use a skill, an MCP server, or both

Use a skill when the agent needs to know how, and use an MCP server when it needs to reach something live. When a task needs both, write the skill around the server's tools.

Write a skill when:

- The task follows your team's procedure, such as a review checklist, a release-notes format, or a migration runbook.
- The work is deterministic and fits a script, like validating a config file or filling a form.
- The knowledge changes with your repository, so it belongs in version control next to the code.
- Only some requests need it, so paying 100 tokens until it triggers beats a long system prompt.

Run an MCP server when:

- The agent needs current data from a system of record, such as tickets, a database, or logs.
- Several agents or apps need the same access, and you want one place for credentials.
- Actions must be authorized per user or per key, or logged per call.
- The agent runs where skill scripts have no network, such as the Claude API's skills container.

Avoid two common mismatches. A skill that embeds an API token to call a service directly turns a reviewable file into a credential leak, and it fails on surfaces with no network. An MCP server whose tools encode a whole procedure, such as one `triage_incident` tool with hidden steps, hides judgment the team should be able to read and change in review.

## Practical guidance for a first setup

Start by sorting what you already have. Long, repeated instructions in system prompts or in a `CLAUDE.md` file are skill candidates. API calls that agents make with keys pasted into scripts are server candidates.

1. Move one repeated procedure into a skill, keep the body under 5,000 tokens, and push deterministic checks into a script.
2. Put each external system behind one MCP server, and give its tools descriptions that state their purpose in the first sentence.
3. Turn on tool search or code mode before you connect a fifth server, and check the definition cost against 1% to 5% of the window.
4. Review skills in pull requests and pin the version you reviewed. Review servers like service accounts.
5. Once a second team or host needs the same servers, route them through an MCP gateway and grant tools per virtual key, with writes held for approval.

The [MCP topic hub](https://aifordevs.org/topics/mcp) and the [context hub](https://aifordevs.org/topics/context) collect related guides, and [building an MCP server](https://aifordevs.org/articles/build-an-mcp-server) walks through the server side end to end.

## Questions

### Do agent skills replace MCP?

No. A skill is a folder of instructions and scripts, so it cannot hold credentials for a remote system or serve many clients from one place, and on the Claude API it runs in a container with no network access. Skills replace long system prompts and repeated instructions. Live access to tickets, databases, and logs still needs MCP or another tool interface.

### What is the difference between Claude skills and MCP?

Claude skills carry procedure: how your team does a task, packaged as a SKILL.md file that loads in stages. MCP carries access: a protocol through which a server exposes tools and data that the model calls at runtime. Anthropic's own rule of thumb is that explaining how to do something is a skill, and needing Claude to access something is MCP.

### Which uses fewer tokens, skills or MCP?

Skills use fewer tokens at rest, about 100 each until a request triggers one. MCP cost depends on the host. Loading every tool definition upfront can take most of the context window, about 150,000 tokens in the MCP guide's example, while tool search or code mode brings it near 2,000. Claude Code turns tool search on by default.

### Can a skill use an MCP server?

Yes. A skill's instructions can name MCP tools, the order to call them, and the fields each call needs. The MCP client best practices guide also describes skills that declare which servers they need, so a host connects those servers only when the skill runs. That pairing keeps both the procedure and the tool definitions out of context until a task asks for them.

### Are skills safer than MCP servers?

Neither is safe by default, and they fail differently. A skill is a supply-chain risk: its instructions and scripts run with whatever access the agent already has, and one survey found vulnerabilities in 26.1% of community skills. An MCP server is a live-access risk, because it holds credentials and performs actions. Review a skill like code and a server like a service account.

### Do skills work outside Claude?

Yes. The SKILL.md format is published as an open specification at agentskills.io, and the MCP project's own guide says skill files work with any agent that implements the standard. Distribution still differs by product. Anthropic's custom skills do not sync between claude.ai, the API, and Claude Code, so each surface needs its own copy.

## Sources

1. [Anthropic docs, Agent Skills overview (read November 23, 2026)](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview)
2. [Anthropic, Extending Claude's capabilities with skills and MCP servers (December 19, 2025)](https://claude.com/blog/extending-claude-capabilities-with-skills-mcp-servers)
3. [Claude Code docs, Connect Claude Code to tools via MCP (read November 23, 2026)](https://code.claude.com/docs/en/mcp)
4. [Model Context Protocol, Client best practices (read November 23, 2026)](https://modelcontextprotocol.io/docs/2026-07-28/develop/clients/client-best-practices)
5. [Model Context Protocol, Build with agent skills (read November 23, 2026)](https://modelcontextprotocol.io/docs/2026-07-28/develop/build-with-agent-skills)
6. [Model Context Protocol, Tools, revision 2026-07-28 (read November 23, 2026)](https://modelcontextprotocol.io/specification/2026-07-28/server/tools)
7. [Agent Skills, specification (read November 23, 2026)](https://agentskills.io/specification)
8. [Xu et al., Agent Skills for Large Language Models: Architecture, Acquisition, Security, and the Path Forward (arXiv, February 2026)](https://arxiv.org/abs/2602.12430)
9. [Hasan et al., MCP Tool Descriptions Are Smelly! (arXiv, February 2026, revised May 2026)](https://arxiv.org/abs/2602.14878)
10. [Huang et al., Model Context Protocol Threat Modeling and Analyzing Vulnerabilities to Prompt Injection with Tool Poisoning (arXiv, March 2026)](https://arxiv.org/abs/2603.22489)
11. [Bifrost docs, MCP tool filtering per virtual key (read November 23, 2026)](https://docs.getbifrost.ai/features/governance/mcp-tools)
12. [Bifrost docs, Tool execution (read November 23, 2026)](https://docs.getbifrost.ai/mcp/tool-execution)
13. [Bifrost docs, Agent Mode (read November 23, 2026)](https://docs.getbifrost.ai/mcp/agent-mode)
14. [Bifrost docs, Code Mode (read November 23, 2026)](https://docs.getbifrost.ai/mcp/code-mode)
15. [Bifrost docs, Skills Repository (read November 23, 2026)](https://docs.getbifrost.ai/features/skills-repository)
16. [Bifrost docs, Govern MCP servers with Bifrost Edge (read November 23, 2026)](https://docs.getbifrost.ai/edge/mcp-governance)
17. [Bifrost reference page for AI systems (last updated September 2026)](https://www.getmaxim.ai/llm-info)

## Cite this deep dive

AI for Devs. "Skills vs MCP: token cost, security, and when to use each." Published November 25, 2026. https://aifordevs.org/articles/skills-vs-mcp

- Page: https://aifordevs.org/articles/skills-vs-mcp
- Markdown: https://aifordevs.org/articles/skills-vs-mcp.md
- Reuse: Quote or summarize with a link to this page. Terms: https://aifordevs.org/reuse
- Publisher: AI for Devs
- Published: 2026-11-25
