MCP Integration
How MyClaude products integrate with the Model Context Protocol, exposing marketplace tools directly inside Claude Code sessions.
MyClaude products integrate with Claude Code through the Model Context Protocol, making marketplace tools available directly inside coding sessions.
This page explains what MCP is, how the MyClaude CLI exposes marketplace functionality as MCP tools, how installed products become available in Claude Code, and when to use MCP tools versus Skills versus Agents.
What is MCP
The Model Context Protocol (MCP) is a standard for tool communication between AI assistants and external systems. It defines how an AI model discovers available tools, invokes them with structured parameters, and receives structured results. MCP uses JSON-RPC 2.0 over standard I/O (stdin/stdout) as its transport layer.
In practical terms, MCP lets Claude Code call external programs the same way a developer calls CLI commands -- but with structured input and output instead of unstructured text. When a tool is registered via MCP, Claude Code can:
- Discover the tool's name, description, and parameter schema
- Invoke the tool with validated parameters
- Read the structured response and act on it
MCP servers are standalone processes that register tools, resources, and prompts. Claude Code connects to them over stdio and treats their tools as first-class capabilities within a coding session.
How MyClaude uses MCP
The MyClaude CLI includes a built-in MCP server mode. When started with myclaude mcp-serve, the CLI runs as a long-lived process that speaks the MCP protocol over stdin/stdout. It exposes five tools that map directly to CLI commands:
| MCP Tool | Maps to CLI command | Description |
|---|---|---|
vault_search | myclaude search | Search the marketplace for products |
vault_install | myclaude install | Install a product into the current project |
vault_info | myclaude info | Retrieve detailed product metadata |
vault_list | myclaude list | List locally installed products |
vault_update | myclaude update | Update installed products to latest versions |
Both the CLI commands and the MCP tools call the same shared core logic. There is no difference in behavior, validation, or security between using myclaude install @creator/product in a terminal and having Claude Code invoke the vault_install tool. The same authentication, the same API endpoints, the same checksum verification.
Authentication in MCP mode
The MCP server reuses your existing CLI authentication. It reads the refresh token from the OS keychain (or the MYCLAUDE_TOKEN environment variable) and exchanges it for an ID token, exactly as the CLI does. There is no separate login flow for MCP mode.
If you are not authenticated when Claude Code starts the MCP server, tools that require auth will return a structured error:
{
"error": {
"code": -32001,
"message": "Not authenticated. Run 'myclaude login' in your terminal first."
}
}Confirmation for destructive operations
MCP tools that involve purchases or file deletion use MCP's built-in confirmation mechanism. When Claude Code invokes vault_install for a paid product, the MCP server returns a confirmation prompt that Claude Code surfaces to the user before proceeding. You are always asked before money is spent or files are removed.
Setting up MCP in Claude Code
Automatic setup
Run myclaude setup-mcp to automatically register the MyClaude MCP server in your Claude Code configuration:
$ myclaude setup-mcp
# Added myclaude MCP server to .claude/settings.jsonThis writes the following entry to .claude/settings.json:
{
"mcpServers": {
"myclaude": {
"command": "myclaude",
"args": ["mcp-serve"]
}
}
}After running this command, restart your Claude Code session. The MCP server starts automatically when Claude Code launches and stays running for the duration of the session.
Manual setup
If you prefer to configure MCP manually, add the mcpServers entry to .claude/settings.json yourself:
{
"mcpServers": {
"myclaude": {
"command": "myclaude",
"args": ["mcp-serve"]
}
}
}Ensure the myclaude binary is in your PATH. If it is not, use the full path to the binary:
{
"mcpServers": {
"myclaude": {
"command": "/home/user/.npm-global/bin/myclaude",
"args": ["mcp-serve"]
}
}
}Verifying the connection
After restarting Claude Code, verify the MCP server is running by asking Claude Code to list your installed products:
> List my installed MyClaude products.If the MCP server is correctly configured, Claude Code will invoke the vault_list tool and return the results. If it is not, Claude Code will not recognize the tool and will say it cannot help with that request.
Example workflow
Here is what it looks like in practice: installing a code review skill from within a Claude Code session, entirely through MCP.
Step 1: You ask Claude Code to find a code review tool.
> Search MyClaude for code review skills.Claude Code invokes vault_search with the query "code review" and the category filter "skill". It receives a structured list of matching products and presents them to you.
Step 2: You ask Claude Code to install one.
> Install @kairo/review-skill.Claude Code invokes vault_install with the product handle. The MCP server downloads the product, verifies the checksum, extracts files to .claude/skills/review-skill/, and updates the local install registry. Claude Code reports the result.
Step 3: The skill is immediately available.
Because the product installed to .claude/skills/, Claude Code can use it in the same session. You can now reference the skill by name:
> Use the review-skill to review the changes in this PR.The entire flow happens inside Claude Code. You never switch to a terminal.
How installed products expose capabilities
When you install a MyClaude product via myclaude install (either from the terminal or through the MCP vault_install tool), the product's files are placed in the .claude/ directory tree. Different product types serve different purposes:
| Product type | Install location | What it provides to Claude Code |
|---|---|---|
| Skill | .claude/skills/<name>/ | A SKILL.md file that defines an invocable capability with instructions, rules, and examples |
| Squad | .claude/skills/<name>/ | A SQUAD.md that defines a multi-persona collaboration pattern |
| Agent | .claude/skills/<name>/ | An AGENT.md that defines an autonomous task execution pattern |
| Workflow | .claude/skills/<name>/ | A WORKFLOW.md that defines a multi-step process |
| Design system | .claude/skills/<name>/ | A DESIGN-SYSTEM.md with tokens and rules for UI consistency |
| Prompt | .claude/skills/<name>/ | A PROMPT.md with reusable prompt templates |
| CLAUDE.md | .claude/ | Content that merges into the project's CLAUDE.md |
| Application | .claude/apps/<name>/ | A standalone application package |
Claude Code discovers installed skills by scanning the .claude/skills/ directory on startup. Each subdirectory that contains a recognized markdown file (SKILL.md, AGENT.md, etc.) becomes an invocable capability.
The MCP server itself does not provide these capabilities. It provides the marketplace tools (search, install, list, update, info). The installed products provide their own capabilities through the Claude Code skills system.
Architecture diagram
+---------------------------+
| Claude Code |
| |
| +---------+ +---------+ |
| | Skills | | MCP | |
| | System | | Client | |
| +----+----+ +----+----+ |
| | | |
+-------+------------+-------+
| |
| | JSON-RPC 2.0 (stdio)
| |
+-------+----+ +----+------------+
| .claude/ | | myclaude mcp-serve |
| skills/ | | |
| (installed | | vault_search |
| products) | | vault_install |
+------------+ | vault_info |
| vault_list |
| vault_update |
+--------+--------+
|
| HTTPS
|
+--------+--------+
| MyClaude API |
| (myclaude.sh) |
+-----------------+The left path is the skills system: Claude Code reads installed product files from .claude/skills/ and uses them as capabilities. The right path is the MCP integration: Claude Code communicates with the MyClaude marketplace through the MCP server to search, install, and manage products.
MCP tools vs Skills vs Agents
These three concepts serve different purposes and operate at different layers. Understanding the distinction helps you choose the right product type to install or create.
| Concept | What it is | When to use | Example |
|---|---|---|---|
| MCP tools | Functions exposed by an external server via the Model Context Protocol | When Claude Code needs to interact with an external system (API, database, marketplace) | vault_search, vault_install, GitHub MCP tools |
| Skills | Markdown files in .claude/skills/ that define capabilities with instructions and rules | When you want to give Claude Code domain expertise or a repeatable process | Code review skill, security audit skill, design system enforcement |
| Agents | A specialized skill pattern where Claude Code operates autonomously on a multi-step task | When the task requires planning, multiple tool calls, and decision-making without human intervention per step | Deployment agent, migration agent, test-writing agent |
MCP tools are the transport layer -- they connect Claude Code to external systems. Skills are the knowledge layer -- they tell Claude Code how to approach a problem. Agents are the autonomy layer -- they combine skills and tools into self-directed workflows.
A typical advanced setup uses all three together: MCP tools to connect to external APIs, skills to encode domain knowledge, and an agent orchestration pattern to tie them into an autonomous workflow.
Future: marketplace-native MCP tool discovery
Today, the MCP server exposes marketplace management tools (search, install, list). In a future release, individual MyClaude products will be able to register their own MCP tools during installation. For example, a database migration skill could expose an MCP tool that runs migrations, or a monitoring product could expose a tool that queries metrics.
When this capability ships, installing a product will automatically register its MCP tools, making them discoverable by Claude Code without manual configuration. The product's vault.yaml will declare its MCP tool schema, and the MyClaude MCP server will proxy those tools alongside the built-in marketplace tools.
This creates a composable tool ecosystem: install a product, get its tools. No configuration, no glue code.
Related pages
- CLI Commands Reference -- full reference for all CLI commands including
mcp-serve - CLI Authentication -- how the MCP server authenticates with MyClaude
- CLI Configuration -- MCP server inherits CLI configuration and environment variables