mcp-integration
將 MCP 伺服器整合到 Claude Code 外掛中
也可从以下获取: davila7,Joseph OBrien,Joseph OBrien,anthropics
使用 Model Context Protocol 將 Claude Code 外掛連接至外部服務和 API。此技能提供 stdio、SSE、HTTP 和 WebSocket 伺服器類型的配置模式,並支援驗證功能。
下载技能 ZIP
在 Claude 中上传
前往 设置 → 功能 → 技能 → 上传技能
开启并开始使用
测试它
正在使用“mcp-integration”。 How do I set up an MCP server for file system access?
预期结果:
- Use stdio transport for local file system access with @modelcontextprotocol/server-filesystem:
- Create .mcp.json with the server command, arguments, and allowed paths. The npx command downloads and runs the official filesystem server.
- Specify environment variables like LOG_LEVEL for debugging.
- Pre-allow the mcp__plugin_*__read_file tool in your command frontmatter before use.
正在使用“mcp-integration”。 Connect my plugin to a REST API with authentication
预期结果:
- Use HTTP transport type with your API endpoint and authorization headers.
- Store the API token in an environment variable like ${API_TOKEN} for security.
- Claude Code injects the environment variable at runtime.
- The tool will be available as mcp__plugin_<name>__<tool-name> for use in commands.
正在使用“mcp-integration”。 What are the MCP server types and when to use each?
预期结果:
- stdio: Local processes, custom servers, file system tools - runs as child process
- SSE: Hosted services with OAuth - browser-based authentication, cloud APIs
- HTTP: REST APIs with token auth - simple authentication, stateless services
- WebSocket: Real-time streaming - persistent connections, push notifications
安全审计
安全This is an official Anthropic documentation skill teaching MCP server integration. All static findings are false positives - code examples in documentation files (not executable code) showing legitimate patterns for building MCP servers. The skill explicitly teaches security best practices including using environment variables for secrets and HTTPS for connections.
风险因素
🌐 网络访问 (44)
🔑 环境变量 (31)
⚙️ 外部命令 (280)
质量评分
你能构建什么
新增外部服務存取
使用 MCP 伺服器配置將資料庫、API 和檔案系統整合到外掛中。
連接雲端服務
配置託管的 MCP 伺服器以使用 OAuth,存取雲端 API 和服務。
捆綁自訂工具
將本機 MCP 伺服器與外掛一起封裝,以實現自動工具探索和使用。
试试这些提示
How do I add an MCP server to my plugin that connects to a local database using stdio transport?
Configure an SSE MCP server for a hosted service that uses OAuth authentication. Show me the .mcp.json format.
How do I configure multiple MCP servers in a single plugin for different service types?
What is the best way to handle API keys and database URLs in MCP server configuration without hardcoding them?
最佳实践
- Always use ${CLAUDE_PLUGIN_ROOT} for file paths to ensure portability across installations
- Store credentials in environment variables using ${VAR_NAME} syntax, never hardcode secrets
- Pre-allow specific MCP tools in command frontmatter using full tool names, avoid wildcard patterns
避免
- Hardcoding absolute paths instead of using ${CLAUDE_PLUGIN_ROOT} for portability
- Committing credentials or tokens to version control in configuration files
- Using HTTP instead of HTTPS for MCP server connections, exposing credentials in transit