Explore skills

Blog / Authoring

How to Turn a Skill Into an MCP Tool Others Can Call

A skill can run as an MCP tool: callers send inputs and get a result, never the prompt or scripts. How the wrapper works, what to design, and ways to publish.

How to Turn a Skill Into an MCP Tool Others Can Call

A skill gives the agent instructions to follow. An MCP tool takes inputs and returns a result. Turning one into the other means deciding what the inputs are and where the instructions run.

Table of contents

The short answer

A skill becomes an MCP tool when something other than your own agent session runs it. The caller's agent sends a tools/call request with named arguments, a server runs the skill's instructions and scripts, and the server returns text or structured data. The caller never reads your SKILL.md.

That is the reason to do it. A skill file is readable by whoever installs it. A tool is only callable. If you want others to use a skill without receiving its prompt or its scripts, or you want a skill to run on a machine with credentials the caller should not hold, the tool shape is the right one.

There are three practical routes: write your own MCP server around the skill, host the skill on a platform that exposes it as a tool, or skip the wrapper and share the folder. I explain each below, with the honest costs. I am the one who writes most of these at work, and I do not benchmark any of them here. The article uses the MCP specification, Anthropic's Claude Code documentation and Ragspaces pages, all read on 2026-11-23.

Skill versus tool, in one example

Take a skill that checks a draft for banned phrases:

---
name: phrase-check
description: "A skill can run as an MCP tool: callers send inputs and get a result, never the prompt or scripts. How the wrapper works, what to design, and ways to publish."
---

1. Read the file the user names.
2. Run `python scripts/scan.py <file>`.
3. Report each hit with its line number and a suggested replacement from references/replacements.md.

Used as a skill, Claude reads these steps and runs them in your session, with your files and your permissions. The Agent Skills overview describes this loading: the description is always in context, the body loads when the skill triggers, and scripts "run through bash" with only their output entering context (Agent Skills overview, checked 2026-11-23).

Used as a tool, the same job looks like a function: phrase_check(text) -> list of hits. The caller supplies the draft as an argument, and the server runs the scan and returns the list. The caller needs no folder, no Python and no list of banned phrases. They also cannot see the list.

Both shapes are useful. The difference is who holds the instructions.

What an MCP tool is

The Model Context Protocol specification says servers "expose tools that can be invoked by language models," and that "each tool is uniquely identified by a name and includes metadata describing its schema" (MCP specification, tools). A tool definition has these fields, all from the spec:

  • name, a unique identifier.
  • title, an optional display name.
  • description, a human-readable description of the functionality.
  • inputSchema, a JSON Schema for the parameters.
  • outputSchema, optional, a JSON Schema for structured results.
  • annotations, optional properties describing behavior.

A client discovers tools with a tools/list request and calls one with tools/call, passing the tool name and arguments. Here is how the phrase-check skill would be listed:

{
  "name": "phrase_check",
  "title": "Banned phrase check",
  "description": "Check a draft against a banned-phrase list. Returns each hit with its line number.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "text": { "type": "string", "description": "The draft to scan" }
    },
    "required": ["text"]
  }
}

And the result comes back as a content array. The spec lists text, image, audio, resource links and embedded resources as content types, and it separates two kinds of failure: protocol errors for things like unknown tools or invalid arguments, and tool execution errors reported "in tool results with isError: true."

The spec describes tools as "model-controlled": "the language model can discover and invoke tools automatically based on its contextual understanding and the user's prompts." That sounds like a skill, and it is, with one difference. A skill's description loads into context as a listing entry. A tool's name and description are also loaded, but Claude Code defers them: "Tool search keeps MCP context usage low by deferring tool definitions until Claude needs them. Only tool names and server instructions load at session start" (Claude Code MCP docs). So a tool is cheap while idle. I cover how the two compare in the post on Claude skills vs MCP vs plugins.

Step 1: pick a skill that fits

Not every skill should be a tool. A good candidate has these traits:

  • Clear inputs. You can list the arguments in a sentence. "A draft and a language" works. "Whatever the user is looking at" does not.
  • A result you can return. A report, a file, a score, a list. Something the caller can use without a conversation.
  • No dependence on the caller's files. A tool runs somewhere else. If the skill reads ./src from the caller's repository, the server cannot see it, and the caller must send the content as an argument.
  • Few judgment calls mid-way. A skill can ask the user a question halfway through. A tool call is one request and one response.

Skills that are procedures for the caller's own project (a release checklist, a commit style) are poor tools. They need the project. Skills that transform an input into an output (scan this text, convert this table, summarize this document, audit this config) are good tools.

If you are unsure, write the inputSchema first. If you cannot fill it in with a few typed fields, the skill is not ready.

Step 2: define the inputs and the output

This step is where tools get good or bad, and it is mostly work you already did when you wrote the skill description.

Inputs. Each argument gets a type and a short description. Keep the list short. The more fields, the more ways a calling model can get one wrong. The spec requires that servers "validate all tool inputs," so decide the limits now: maximum length, allowed values, required versus optional.

Output. Return what the caller needs and nothing else. If the skill's job is a report, return the report as text. If the caller will parse it, add an outputSchema and return structuredContent; the spec says that when an output schema is present, "Servers MUST provide structured results that conform to this schema," and for backwards compatibility a tool returning structured content "SHOULD also return the serialized JSON in a TextContent block."

Errors. Decide what an execution error looks like. A banned-phrase scan that finds no file is not a protocol error; it is a tool execution error, returned with isError: true and a message the calling model can act on.

Description. The tool description does the job a skill description does: it tells the model when to call it. Anthropic's authoring guidance for skills applies almost unchanged: be specific, include what it does and when to use it, and write in third person (best practices). The same rules apply to a tool description.

Step 3: choose where the skill runs

Something has to execute the skill's steps when a call arrives. There are two designs.

Design A: the server runs the logic itself. If the skill is mostly a script, the MCP server calls that script directly. The "instructions" become code. This is the most predictable option. The tool returns the same result for the same input, and no model is involved on the server side. It suits scripted skills like the banned-phrase scan above.

Design B: the server runs a model with the skill's instructions. If the skill is mostly judgment (review this contract, critique this design), the server sends the skill's body plus the caller's input to a model and returns the model's answer. The prompt stays on the server. Costs are the server owner's: every call is a model request someone pays for. That is the main reason hosted skills have per-run pricing. Ragspaces' paid skills seen on the home page cost "$1.00 per run."

In both designs the server is a normal MCP server. I am not going to reproduce SDK code here, because the MCP SDK APIs change between versions; the SDK's own docs are the place for current code. The Anthropic skills repository includes an mcp-builder skill, and the Ragspaces catalog has several copies that I opened on 2026-11-23:

If you write a server, one of them is a reasonable place to start, and the spec above is the ground truth.

Step 4: connect it to a client

For Claude Code, the MCP docs give the command to add a remote server: claude mcp add --transport http <name> <url>. Servers can be scoped to local, project (.mcp.json) or user. Once connected, the tools appear to Claude, with definitions deferred until needed.

Three details from the docs matter for people who publish tools:

  • "Verify you trust each server before connecting it. Servers that fetch external content can expose you to prompt injection risk." That is a caller's responsibility, and your documentation should help them judge.
  • A plugin can bundle MCP servers, "a directory of skills, agents, hooks, MCP servers, or other components that Claude Code installs and loads as one unit" (plugins docs).
  • Tool lists can change. The spec has a listChanged capability so a server can notify clients when tools are added or removed.

Codex and other clients also speak MCP, so a tool built once reaches more than one agent.

Three ways to publish

Share the skill folder Write and host your own MCP server Host the skill on a platform that exposes it as a tool
What the caller gets The prompt and scripts A tool call result A tool call result
Can they read the instructions Yes No, if the server keeps them No, with protection on, per the platform
Who runs it The caller's agent You, on your server The platform
Work for you Almost none Build, host, secure, pay for model calls, handle auth Upload the skill and set visibility
Good fit Free, open skills Internal tools, anything needing your own credentials or data Skills you want to share or sell without the source
Source for the claim Claude Code skills docs MCP spec Ragspaces how it works

Sharing the folder is the simplest and the right choice when you do not mind the reader seeing everything. A GitHub repository with a SKILL.md and an install command is a legitimate way to publish. The post on how to install Claude Code skills covers what the reader does on their side.

Writing your own server is the right choice when the tool needs something only you have: a database, an internal API, a license. You own hosting, authentication, rate limits and abuse, which is real work. The spec's list of server obligations is a fair checklist: validate inputs, implement access controls, rate limit, sanitize outputs.

A platform route trades control for effort. You hand the skill to someone who runs it for callers.

Security

Putting a skill behind a tool changes who is at risk. When you share a folder, the reader trusts you. When you expose a tool, you trust the caller's inputs, and the caller trusts your outputs.

From the spec, servers "MUST validate all tool inputs, implement proper access controls, rate limit tool invocations, sanitize tool outputs." Clients "SHOULD prompt for user confirmation on sensitive operations" and "show tool inputs to the user before calling the server, to avoid malicious or accidental data exfiltration." The spec also says "there SHOULD always be a human in the loop with the ability to deny tool invocations."

Practical consequences for the author:

  • Never put secrets in the tool's description or output. The description is shown to models and often to users.
  • Treat arguments as hostile. A text field that ends up in a shell command is an injection point. Pass it to a script as data, not as part of a command line.
  • Limit what the tool can reach. If the skill only needs to scan text, do not give the server filesystem or network access it does not need.
  • Treat the tool annotations carefully. The spec says clients "MUST consider tool annotations to be untrusted unless they come from trusted servers." Do not rely on an annotation like a read-only flag for your own safety.
  • Keep keys out of the skill. If the skill calls a third-party API, the server should hold the key. The short version is to read keys from the server's environment, never from the prompt.

What Ragspaces adds

Ragspaces is an open catalog of 5,299 agent skills for Claude Code and Codex (home page count on 2026-11-23). It covers the third column of the table above, and I would send you to the others for needs it does not meet.

What it does: each skill has a visibility of private, followers or public. With protection on, others call the skill as a tool and never see its prompts or scripts. Paid skills run on Ragspaces: you call them from your agent and get the result, never the source. The installer adds Ragspaces as an MCP server, so shared skills appear as tools in your agent; it needs Node.js, links the computer and uploads the skills in ~/.claude/skills and ~/.agents/skills (how it works).

What it does not do, as far as I can document: it does not give you a server you host yourself, and it does not expose your own databases or internal APIs. Ragspaces does not publish the author revenue share.

To see what skills written for automatic triggering look like on the page, before you decide what your tool description should say:

Those are free skills with readable pages.

Common mistakes

Making a tool out of a skill that needs the caller's files. The server cannot see them. Take the content as an argument or keep it a skill.

Too many arguments. Each is another chance for the calling model to fill it wrongly.

Returning a wall of text. The caller's context pays for it. Return the answer, not the log.

Mixing protocol errors and execution errors. Unknown tool and bad arguments are protocol errors. A scan that finds a bad file is an execution error with isError: true.

Putting a secret in the description. Descriptions are read by models and by people.

Forgetting the cost on your side. In design B every call is a model request that someone pays for.

Frequently asked questions

What is the difference between a skill and an MCP tool?

A skill is a folder with SKILL.md that the agent reads and follows in its own session. An MCP tool is a function with a name and an input schema that a server runs, returning a result. The caller of a tool does not see how it works.

Can I expose a SKILL.md as an MCP tool without writing code?

Not by itself. A server has to run it. You can write an MCP server around the skill, or host the skill on a platform that exposes it as a tool, as Ragspaces does for protected skills.

What does a tool definition need?

According to the MCP specification, a name and a description plus an inputSchema in JSON Schema. A title, an outputSchema and annotations are optional. Clients discover tools with tools/list and call them with tools/call.

Do MCP tools cost context like skills do?

Claude Code defers tool definitions by default. Its docs say "Only tool names and server instructions load at session start," and definitions load when Claude needs a tool. A skill's name and description are in the listing on every turn.

How do I keep my prompt private?

Run the skill on a server and expose a tool. The caller sends arguments and receives results. On Ragspaces, protection means others call the skill as a tool and never see its prompts or scripts.

Is it safe to call someone else's tool?

Only if you trust the server. Claude Code's docs say to "verify you trust each server before connecting it," because servers that fetch external content can expose you to prompt injection. The MCP spec says there should be a human able to deny tool calls.

Key takeaways

  • A skill is instructions the caller's agent follows. A tool is a function a server runs, and the caller sees only its result.
  • Choose skills with clear inputs, a returnable result and no need for the caller's files.
  • Define inputSchema, output and errors before you write anything else.
  • Run the logic as a script (predictable) or with a model call on your server (flexible and billed to you).
  • Validate every input and keep secrets out of descriptions and outputs.

The bottom line

Share the folder when you are happy for people to read it. Make a tool when the instructions or the credentials should stay with you. Start from the inputSchema: if the skill fits in a few typed fields and returns one result, it will make a good tool.

If you want to see how skills are described and priced on a platform that runs them for you, browse the Ragspaces catalog. Skill pages show the description, README and reviews with no account.

Related articles

About this research

Dmitry Makarenko co-founded Zipy as VP R&D, leading 50+ engineers across five countries, and now builds AI agents full-time. (LinkedIn)

This article is based on the Model Context Protocol specification (tools, 2025-06-18 revision), the Claude Code MCP and plugins documentation, Anthropic's Agent Skills documentation and Ragspaces pages, all read on 2026-11-23. Content reviewed and updated: 2026-11-26

Keep reading