CO

converting-mcps-to-skills

Enables integration with MCP servers by allowing agents to discover, test, and use external tools as native skills.

Install

mkdir -p .claude/skills/converting-mcps-to-skills && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/4868" && unzip -o skill.zip -d .claude/skills/converting-mcps-to-skills && rm skill.zip

Installs to .claude/skills/converting-mcps-to-skills

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Connect to MCP (Model Context Protocol) servers and create skills for repeated use. Load when a user wants to use an MCP server, connect to external tools via MCP, or when they mention MCP, model context protocol, or specific MCP servers.
238 chars✓ has a “when” trigger
Advanced

Key capabilities

  • Connect to MCP servers via HTTP/stdio
  • List available tools via JSON-RPC
  • Retrieve schema information for tools
  • Facilitate local skill development for MCP endpoints

How it works

It acts as an interface layer that executes transport scripts to communicate with MCP servers, listing and calling endpoints via standardized protocols.

Inputs & outputs

You give it
MCP server URL or command
You get back
List of available tools and execution results

When to use converting-mcps-to-skills

  • Connect to filesystem MCP
  • Expose local tools via MCP
  • Test MCP server endpoints

About this skill

Converting MCP Servers to Skills

Letta Code is not itself an MCP client, but as a general computer-use agent, you can easily connect to any MCP server using the scripts in this skill.

What is MCP?

MCP (Model Context Protocol) is a standard for exposing tools to AI agents. MCP servers provide tools via JSON-RPC, either over:

  • HTTP - Server running at a URL (e.g., http://localhost:3001/mcp)
  • stdio - Server runs as a subprocess, communicating via stdin/stdout

Quick Start: Connecting to an MCP Server

Step 1: Determine the transport type

Ask the user:

  • Is it an HTTP server (has a URL)?
  • Is it a stdio server (runs via command like npx, node, python)?

Step 2: Test the connection

For HTTP servers:

npx tsx <SKILL_DIR>/scripts/mcp-http.ts <url> list-tools

# With auth header
npx tsx <SKILL_DIR>/scripts/mcp-http.ts <url> --header "Authorization: Bearer KEY" list-tools

Where <SKILL_DIR> is the Skill Directory shown when the skill was loaded (visible in the injection header).

For stdio servers:

npx tsx <SKILL_DIR>/scripts/mcp-stdio.ts "<command>" list-tools

# Examples
npx tsx <SKILL_DIR>/scripts/mcp-stdio.ts "npx -y @modelcontextprotocol/server-filesystem ." list-tools
npx tsx <SKILL_DIR>/scripts/mcp-stdio.ts "python server.py" list-tools

Step 3: Explore available tools

# List all tools
... list-tools

# Get schema for a specific tool
... info <tool-name>

# Test calling a tool
... call <tool-name> '{"arg": "value"}'

Creating a Dedicated Skill

When an MCP server will be used repeatedly, create a dedicated skill for it. This makes future use easier and documents the server's capabilities.

Decision: Simple vs Rich Skill

Simple skill (just SKILL.md):

  • Good for straightforward servers
  • Documents how to use the parent skill's scripts with this specific server
  • No additional scripts needed

Rich skill (SKILL.md + scripts/):

  • Good for frequently-used servers
  • Includes convenience wrapper scripts with defaults baked in
  • Provides a simpler interface than the generic scripts

See references/skill-templates.md for templates.

Built-in Scripts Reference

mcp-http.ts - HTTP Transport

Connects to MCP servers over HTTP. No dependencies required.

npx tsx mcp-http.ts <url> [options] <command> [args]

Commands:
  list-tools              List available tools
  list-resources          List available resources
  info <tool>             Show tool schema
  call <tool> '<json>'    Call a tool
  login                   Run OAuth flow and cache tokens for this server
  logout                  Clear cached OAuth tokens for this server

Options:
  --header "K: V"         Add HTTP header (repeatable). Disables auto-OAuth.
  --auth <mode>           "auto" (default), "oauth", or "none"
  --timeout <ms>          Request timeout (default: 30000)

Examples:

# Basic usage
npx tsx mcp-http.ts http://localhost:3001/mcp list-tools

# With static bearer authentication
npx tsx mcp-http.ts http://localhost:3001/mcp --header "Authorization: Bearer KEY" list-tools

# OAuth-protected server (opens a browser to sign in, then caches tokens)
npx tsx mcp-http.ts https://example.com/mcp login
npx tsx mcp-http.ts https://example.com/mcp list-tools

# Call a tool
npx tsx mcp-http.ts http://localhost:3001/mcp call vault '{"action":"search","query":"notes"}'

OAuth support: When a server returns 401 WWW-Authenticate: Bearer ... and no static Authorization header was supplied, mcp-http.ts will automatically:

  1. Discover the authorization server via resource_metadata, the realm= param, or the server's own origin (.well-known/oauth-authorization-server then .well-known/openid-configuration).
  2. Dynamically register a public client with PKCE (token_endpoint_auth_method: none).
  3. Open the system browser to the authorization endpoint, catch the redirect on a 127.0.0.1 loopback port, and exchange the code for tokens.
  4. Cache the token set (and the registered client) at ~/.letta/mcp-oauth/<host>_<path>.json with 0600 perms.
  5. Auto-refresh expired access tokens using the stored refresh token before each request; if refresh fails, it re-runs the browser flow once.

Use login to run the flow explicitly (e.g. as a first step in a skill's setup) and logout to clear cached tokens. Passing an explicit --header "Authorization: ..." disables auto-OAuth so you stay in control. Pass --auth none to force static-only behavior.

mcp-stdio.ts - stdio Transport

Connects to MCP servers that run as subprocesses. No dependencies required.

npx tsx mcp-stdio.ts "<command>" [options] <action> [args]

Actions:
  list-tools              List available tools
  list-resources          List available resources
  info <tool>             Show tool schema
  call <tool> '<json>'    Call a tool

Options:
  --env "KEY=VALUE"       Set environment variable (repeatable)
  --cwd <path>            Set working directory
  --timeout <ms>          Request timeout (default: 30000)

Examples:

# Filesystem server
npx tsx mcp-stdio.ts "npx -y @modelcontextprotocol/server-filesystem ." list-tools

# With environment variable
npx tsx mcp-stdio.ts "node server.js" --env "API_KEY=xxx" list-tools

# Call a tool
npx tsx mcp-stdio.ts "python server.py" call read_file '{"path":"./README.md"}'

Common MCP Servers

Here are some well-known MCP servers:

ServerTransportCommand/URL
Filesystemstdionpx -y @modelcontextprotocol/server-filesystem <path>
GitHubstdionpx -y @modelcontextprotocol/server-github
Brave Searchstdionpx -y @modelcontextprotocol/server-brave-search
obsidian-mcp-pluginHTTPhttp://localhost:3001/mcp

Troubleshooting

"Cannot connect" error:

  • For HTTP: Check the URL is correct and server is running
  • For stdio: Check the command works when run directly in terminal

"Authentication required" error:

  • Add --header "Authorization: Bearer YOUR_KEY" for HTTP servers using static bearers
  • Or --env "API_KEY=xxx" for stdio servers that need env vars
  • For OAuth-protected HTTP servers, just run any command (or login) — the helper will do PKCE + dynamic client registration and cache tokens under ~/.letta/mcp-oauth/. Delete that file (or run logout) to force a re-login.

OAuth issues:

  • "Could not discover OAuth server metadata": the server didn't include resource_metadata and its origin doesn't serve .well-known/oauth-authorization-server or .well-known/openid-configuration. Fall back to a static bearer, or point the helper at the auth server manually via a custom skill.
  • "Dynamic client registration failed": the auth server disables open DCR. You'll need to pre-register a client and pass its client_id (and any required credentials) via headers, or wrap this skill with a server-specific one.
  • "state mismatch" / callback timeout: another process may be holding the browser callback; re-run and complete the sign-in in the newly opened tab.

Tool call fails:

  • Use info <tool> to see the expected input schema
  • Ensure JSON arguments match the schema

When not to use it

  • When local tools are sufficient
  • Environments without external tool integration requirements
  • Non-standard or legacy RPC protocols

Prerequisites

MCP server binary/URLNpx/tsx environment

Limitations

  • Dependency on external server availability
  • Requires understanding of transport types
  • Limited to MCP-compliant servers

How it compares

It transforms external protocol definitions into local, reusable agent skills instead of just consuming them once.

Compared to similar skills

converting-mcps-to-skills side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
converting-mcps-to-skills (this skill)12moReviewAdvanced
mcp-integration219moReviewIntermediate
opencode-orchestrator-creator89moReviewIntermediate
mcp-management67moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

More by letta-ai

View all by letta-ai

acquiring-skills

letta-ai

Guide for safely discovering and installing skills from external repositories. Use when a user asks for something where a specialized skill likely exists (browser testing, PDF processing, document generation, etc.) and you want to bootstrap your understanding rather than starting from scratch.

313

creating-skills

letta-ai

Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Letta Code's capabilities with specialized knowledge, workflows, or tool integrations.

37

initializing-memory

letta-ai

Comprehensive guide for initializing or reorganizing agent memory. Load this skill when running /init, when the user asks you to set up your memory, or when you need guidance on creating effective memory blocks.

22

adding-models

letta-ai

Guide for adding new LLM models to Letta Code. Use when the user wants to add support for a new model, needs to know valid model handles, or wants to update the model configuration. Covers models.json configuration, CI test matrix, and handle validation.

18

finding-agents

letta-ai

Find other agents on the same server. Use when the user asks about other agents, wants to migrate memory from another agent, or needs to find an agent by name or tags.

12

migrating-memory

letta-ai

Migrate memory blocks from an existing agent to the current agent. Use when the user wants to copy or share memory from another agent, or during /init when setting up a new agent that should inherit memory from an existing one.

12

You might also like

mcp-integration

anthropics

This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context Protocol", "connect external service", mentions "${CLAUDE_PLUGIN_ROOT} with MCP", or discusses MCP server types (SSE, stdio, HTTP, WebSocket). Provides comprehensive guidance for integrating Model Context Protocol servers into Claude Code plugins for external tool and service integration.

21123

opencode-orchestrator-creator

IgorWarzocha

Creates universal OpenCode orchestrator folder structure with specialized agent that can manage swarm servers via curl commands

8104

mcp-management

mrgoonie

Manage Model Context Protocol (MCP) servers - discover, analyze, and execute tools/prompts/resources from configured MCP servers. Use when working with MCP integrations, need to discover available MCP capabilities, filter MCP tools for specific tasks, execute MCP tools programmatically, access MCP prompts/resources, or implement MCP client functionality. Supports intelligent tool selection, multi-server management, and context-efficient capability discovery.

6100

n8n-mcp-orchestrator

manutej

Expert MCP (Model Context Protocol) orchestration with n8n workflow automation. Master bidirectional MCP integration, expose n8n workflows as AI agent tools, consume MCP servers in workflows, build agentic systems, orchestrate multi-agent workflows, and create production-ready AI-powered automation pipelines with Claude Code integration.

795

mcp-cli

github

Interface for MCP (Model Context Protocol) servers via CLI. Use when you need to interact with external tools, APIs, or data sources through MCP servers, list available MCP servers/tools, or call MCP tools from command line.

767

windsurf-mcp-integration

jeremylongshore

Manage integrate MCP servers with Windsurf for extended capabilities. Activate when users mention "mcp integration", "model context protocol", "external tools", "mcp server", or "cascade tools". Handles MCP server configuration and integration. Use when working with windsurf mcp integration functionality. Trigger with phrases like "windsurf mcp integration", "windsurf integration", "windsurf".

14

Search skills

Search the agent skills registry