Skip to content
mentoor

Topic 3 of 4 · 5 min read

Porting skills and MCP configs between agents

Goal: Translate a skill and an MCP server entry from one agent's configuration to another's without changing behaviour.

A skill and an MCP server are portable ideas with non-portable wrappers: keep the content identical and translate only the config around it.

Check yourself · 1 of 3

What stays the same when you move an MCP server between agents?

Choose one answer

Why it matters

Skills and MCP servers are where teams put real capability: a release checklist, a database query tool, a ticket lookup. If each agent needs a hand-rewritten copy, the copies diverge. Most of the work is in the parts that already match.

Skills

The Agent Skills format is an open standard. A skill is a folder with a SKILL.md file: front matter with a name and a description, then instructions, plus optional scripts and reference files. Several agents read this format, so the same folder can often be used in more than one tool. What differs is where the folder lives (each tool has its own skills directory) and which optional front-matter fields it honours. Keep the body tool-neutral: avoid naming one agent's tool names in the steps.

MCP servers

The Model Context Protocol lets one server work with many clients. The server itself does not change. What changes is the config entry that launches it, because each agent stores it in a different file and shape:

  • Claude Code: a .mcp.json file with an mcpServers object.
  • Gemini CLI: mcpServers inside settings.json.
  • Codex: a [mcp_servers.name] table in a TOML config file.
  • VS Code: a .vscode/mcp.json file where the top key is servers.

The same four facts appear in each: a name, a command, its arguments, and environment variables. Translate those four.

How to port

  1. Write down the server's name, command, arguments and environment variable names.
  2. Open the target agent's docs and find its file, key names and format (JSON or TOML).
  3. Move the four facts. Keep secrets as references to environment variables, never pasted values.
  4. Start the agent and list its tools. The tool names should match the source agent.
  5. Call one read-only tool and compare the result.

Before and after

Before, Claude Code .mcp.json: { "mcpServers": { "tickets": { "command": "npx", "args": ["-y", "tickets-mcp"] } } }.

After, Codex TOML: a table [mcp_servers.tickets] with command = "npx" and args = ["-y", "tickets-mcp"]. Same server, same tools, different wrapper.

What goes wrong

  • Wrong top-level key. mcpServers in a file that expects servers is silently ignored.
  • Pasted secrets. A token copied into a committed config is now in git history.
  • Assuming the skill triggers the same way. Loading rules and the description text can behave differently, so test with a real request.

Examples

Same server in two formats

{
  "mcpServers": {
    "tickets": {
      "command": "npx",
      "args": ["-y", "tickets-mcp"],
      "env": { "TICKETS_TOKEN": "${TICKETS_TOKEN}" }
    }
  }
}
[mcp_servers.tickets]
command = "npx"
args = ["-y", "tickets-mcp"]

[mcp_servers.tickets.env]
TICKETS_TOKEN = "${TICKETS_TOKEN}"

Check your target agent's docs for how it expands environment variables. Some pass them through, others need an explicit list.

The ignored entry

An engineer copies a .mcp.json block into .vscode/mcp.json and keeps mcpServers. VS Code expects servers, so no tools appear and no error is shown. Renaming the key fixes it.

Key points

  • A skill folder with SKILL.md is an open format, so the content can move between agents that support it.
  • An MCP server stays the same; only the config file, key names and format change per agent.
  • Translate four facts: name, command, arguments and environment variable names.
  • Keep secrets as environment variable references, never pasted into committed config.
  • After porting, list the tools and call one read-only tool to prove the behaviour matches.

Common mistakes

  • Rewriting a skill's instructions for each agent instead of keeping one tool-neutral body.
  • Copying a config block without changing the top-level key the target expects.
  • Pasting a real token into a config file that is committed.
  • Declaring the port done without listing tools and calling one.

Check yourself · 2 of 3

You moved a config block and the new agent shows no tools and no error. What is a likely cause?

Choose one answer

Check yourself · 3 of 3

How should an API token appear in a ported MCP config?

Choose one answer

Practice items, not counted towards your mastery.

Start here

More for this topic