Skip to content
TrustedSkillsbeta
Developer

How Skills and MCP Servers Work Together in AI Agents

How skills and MCP servers work together in AI agents — the full lifecycle from finding an MCP server to your AI agent calling its tools, with architecture diagrams and real-world examples.

Last updated 27 September 2026

⚡ Quick Answer

Here's how it works: you find a skill, add its config to your AI client, the client launches the skill as a background subprocess, and the AI model calls that subprocess's tools when your conversation needs them. Communication is JSON-RPC over stdio — no ports, no network config, just pipes between processes.

You don't need to know how MCP works under the hood to use it. Knowing it does make a broken config much easier to debug.

The Architecture in One Diagram

┌─────────────────────────────────────────────────────────┐
│                     An MCP server                       │
│  e.g. a weather server (made-up example)                │
└───────────────────────┬─────────────────────────────────┘
                        │ (1) You find a server
                        ▼
┌─────────────────────────────────────────────────────────┐
│                  AI Client Config                        │
│  { "mcpServers": { "weather": {                         │
│      "command": "npx",                                  │
│      "args": ["-y", "<weather-server>"] } } }           │
└───────────────────────┬─────────────────────────────────┘
                        │ (2) Client starts MCP server as subprocess
                        ▼
┌─────────────────────────────────────────────────────────┐
│                  MCP Server Process                      │
│  npx -y <weather-server>                                │
│  Listens on stdio · Exposes:                            │
│    get_weather(location, units)                          │
│    get_forecast(location, days)                          │
└───────────────────────┬─────────────────────────────────┘
                        │ (3) Client discovers tools
                        ▼
┌─────────────────────────────────────────────────────────┐
│                  Claude                                  │
│  "What's the weather in Sydney?"                        │
│  → calls get_weather({ location: "Sydney" })            │
└─────────────────────────────────────────────────────────┘

The weather server here is a made-up example to show the flow. It is not a package you can install.

The Full Lifecycle, Step by Step

Step 1: Discovery

You find an MCP server that does what you need. Its README gives the config JSON to copy. (Most listings on TrustedSkills are SKILL.md skills, not MCP servers. Those install with the skills CLI command on the skill page and need no MCP config.)

Step 2: Configuration

Paste that JSON into your AI client's config file. For Claude Desktop it's claude_desktop_config.json. The config just tells the client: "when you start up, run this command."

Step 3: Server Launch

When you restart the AI client, it reads the config and launches each MCP server as a child process. That's literally what npx -y @package/name is doing — the client runs it as a subprocess and connects via stdio.

Step 4: Tool Discovery

The client sends the server a message: "what tools do you have?" The server responds with a JSON list of tool definitions. Here's what that looks like:

{
  "tools": [
    {
      "name": "get_weather",
      "description": "Get current weather for a location",
      "inputSchema": {
        "type": "object",
        "properties": {
          "location": { "type": "string" },
          "units": { "type": "string", "enum": ["metric", "imperial"] }
        },
        "required": ["location"]
      }
    }
  ]
}

Step 5: Tool Calling

User asks something. Claude decides a tool is relevant and calls it:

{
  "method": "tools/call",
  "params": {
    "name": "get_weather",
    "arguments": { "location": "Sydney", "units": "metric" }
  }
}

Step 6: Result

The server does the work — calls an API, reads a file, queries a database — and returns the result. Claude uses it to form a response. You see a helpful answer; the JSON flew by invisibly.

Skill vs MCP Server: What's the Real Difference?

AspectMCP ServerSkill
What it is A running process implementing the MCP protocol A packaged, documented, versioned capability
Registry listing No Yes — with metadata, verification status, etc.
Has SKILL.md Not required Yes — standardised description file
Verification N/A TrustedSkills badges: Official, Featured, Pinned, Checked, Listed, Unverified

How the Protocol Works (the Short Version)

A local MCP server uses JSON-RPC 2.0 over stdio. No HTTP server. No ports. The client writes JSON to the server's stdin; the server writes JSON to its stdout. That's the whole transport.

It's simple by design — works the same on Mac, Windows, and Linux. No firewall rules, no network configuration, no port conflicts. The subprocess is isolated to process-level communication only.

Remote MCP servers use the Streamable HTTP transport instead. The older HTTP+SSE transport is deprecated.

💡 Good to know: Because MCP uses stdio, you can test any MCP server manually by running it in a terminal and typing JSON at it. It's a great way to debug a skill that isn't behaving as expected.

End-to-End Example: Weather Skill

You ask Claude Desktop: "What's the weather in Tokyo?"

  1. Weather MCP server is running (launched from your config)
  2. Claude sees the get_weather tool is available
  3. Claude decides this query needs that tool
  4. It calls get_weather({ location: "Tokyo", units: "metric" })
  5. The MCP server calls the Open-Meteo API
  6. Returns: { temperature: 18, condition: "Partly cloudy" }
  7. Claude gives you a natural-language answer using that data

Total time: under a second. Feels like magic; it's just well-designed plumbing.


Frequently Asked Questions

How does Claude know when to use an MCP tool?

The tool definitions include a name and description. Claude reads those and decides whether a tool is relevant to what you're asking. The better the tool description, the more reliably Claude uses it at the right moment.

Can an MCP server access my local files?

Only if it's designed to. A filesystem server can read files; a weather server can't. Each server only does what its tools define. This is why reading a server's README before you add it matters.

What happens when an MCP server crashes?

Claude will stop offering that server's tools and may show an error. Restart your AI client to relaunch the server. Claude Desktop writes crash details to its log files: ~/Library/Logs/Claude on Mac, %APPDATA%\Claude\logs on Windows.

Can I run many MCP servers simultaneously?

Yes. Each server runs as a separate subprocess. You can have dozens running at once — Claude picks whichever tools are most relevant for each query.

TT

TrustedSkills Team

The TrustedSkills team maintains the TrustedSkills index of AI agent skills. The index records where each skill comes from and how to install it. It does not review or audit skill code.