mcp-integration
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.
Security Assessment
Detected risks:
About mcp-integration
The mcp-integration skill facilitates the integration of Model Context Protocol (MCP) servers into Claude Code plugins, solving the challenge of connecting plugins to external services and APIs. By leveraging MCP, developers can expose external service capabilities as tools within Claude Code, enabling structured communication with databases, APIs, file systems, and other external resources. This skill is particularly useful for plugin developers who need to extend their plugins' functionality by interfacing with external services seamlessly and securely.
The skill provides multiple configuration methods, including a dedicated `.mcp.json` file or inline configuration within `plugin.json`, allowing flexible setup based on plugin complexity. It supports various server types such as local stdio processes, SSE for server-sent events, HTTP REST APIs, and WebSocket for real-time communication. Each server type has specific use cases, from local file access to OAuth-based cloud services and low-latency real-time streaming. The skill also handles environment variable expansion, OAuth flows, process management, and token handling, simplifying authentication and integration tasks for developers.
Typical use cases include integrating cloud services like Asana or GitHub, connecting local databases, creating custom MCP servers for internal tools, or enabling real-time data streaming. The target users are plugin developers and technical teams who aim to extend the capabilities of Claude Code plugins through robust, standardized connections to external tools and services. By using this skill, developers can maintain clear separation of configuration, manage multiple MCP servers efficiently, and ensure secure and reliable interactions with external resources.
FAQ
How do I configure an MCP server for my plugin?
You can configure MCP servers either by creating a dedicated `.mcp.json` file at the plugin root, which is recommended for multiple servers, or by adding an `mcpServers` field inline in `plugin.json` for simpler setups.
Which MCP server types are supported?
The skill supports stdio (local processes), SSE (server-sent events), HTTP (REST APIs), and WebSocket servers. Each type is suited for different use cases, such as local tools, cloud services, RESTful APIs, or real-time communication.
Does the skill handle authentication for external services?
Yes, it supports OAuth flows for SSE servers and token-based authentication for HTTP and WebSocket servers. Tokens are managed automatically by Claude Code, with user prompts on first use if needed.
Can I use environment variables in my MCP configuration?
Yes, all MCP configurations support environment variable substitution, including variables like `${CLAUDE_PLUGIN_ROOT}` for plugin directory paths and other custom environment variables.
Is this skill suitable for both cloud and local services?
Absolutely. stdio servers are ideal for local tools and custom processes, while SSE, HTTP, and WebSocket configurations are better suited for cloud-based services and real-time external APIs.
Install mcp-integration
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
anthropics/claude-plugins-official