MCP 服务器添加与配置
add-mcp
向当前项目添加 MCP 服务器。当用户想要添加、配置或启用 MCP 服务器(如 context7、kubernetes、playwright、storybook 或 codegraphcontext)时使用。
- License 许可
- GPL-2.0
- 最近更新
- 2026-11-05
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- add-mcp
- description
- Add an MCP server to the current project. Use when the user wants to add, configure, or enable an MCP server like context7, kubernetes, playwright, storybook, or codegraphcontext.
- allowed-tools
- Read, Glob, Grep, Edit, Write, Bash(devenv:*)
- argument-hint
- <server-name | "list">
02 资源文件 5
- 参考文档servers/codegraphcontext.md808 B
- 参考文档servers/context7.md541 B
- 参考文档servers/kubernetes.md377 B
- 参考文档servers/playwright.md759 B
- 参考文档servers/storybook.md528 B
03 SKILL.md 正文
Add MCP Server
Add an MCP server configuration to the current project.
Instructions
Step 1: Identify the server
If the argument is list or empty, read all files in the servers/ directory next to this SKILL.md (use Glob on ~/.claude/skills/add-mcp/servers/*.md) and list available presets with a one-line description of each.
Otherwise, match the argument to a preset server name. If a matching preset exists, read its file from ~/.claude/skills/add-mcp/servers/. If no preset matches, ask the user for the server details (command, args, env, or URL).
Step 2: Detect project setup
Check whether the project uses devenv by looking for a devenv.nix file in the project root.
Step 3: Add the server
If the project has devenv.nix:
Add the server to claude.code.mcpServers in devenv.nix. Use the "devenv" snippet from the preset file. Make sure claude.code.enable = true; is present. If config is not already in the function arguments, add it.
Example structure in devenv.nix:
claude.code.mcpServers = {
server-name = {
type = "stdio";
command = "npx";
args = [ "-y" "package-name" ];
};
};
After editing, tell the user to let direnv reload (or run devenv shell) so the .mcp.json is regenerated.
If the project does NOT have devenv.nix:
Add the server to .mcp.json in the project root. Create the file if it doesn't exist. Use the "mcp.json" snippet from the preset file.
The file structure is:
{
"mcpServers": {
"server-name": {
"command": "...",
"args": ["..."]
}
}
}
Merge into existing .mcp.json if one exists — don't overwrite other servers.
Step 4: Permissions
Check .claude/settings.json (project-level) for a permissions allow list. If one exists and uses granular MCP permissions, remind the user they may need to add mcp__<server-name> entries. If enableAllProjectMcpServers is set globally, this is not needed.
Guidelines
- Never remove or modify existing MCP server entries unless the user asks
- Keep devenv.nix edits minimal — only touch
claude.code.mcpServers - If the preset needs a package (e.g., chromium for playwright), mention it but let the user decide whether to add it to devenv packages
04 同仓库更多 Skills
start-ticket
Kick off work on a Linear ticket end to end — file or look up the ticket, create an isolated jj workspace for it, move into that workspace, pull the ticket, and brief its scope. Use when the user wants to start working on a subject or an existing ticket, "start a ticket", "kick off LIN-123", or spin up a workspace from a ticket and begin.
文本润色与扩写
writing-assistant
帮助改进和充实 markdown 或纯文本文件中的文字。当用户需要写作反馈、风格修正、语法纠正,或将要点扩展为散文时使用。不从零开始撰写文本。
工作区管理
workspace
暂无简介
Claude技能创建指导
skill-writer
指导用户为 Claude Code 创建 Agent Skills。当用户想要创建、编写、设计新 Skill,或需要帮助处理 SKILL.md 文件、frontmatter 或技能结构时使用。
代码变更审查
review
审查代码变更的质量、安全性和最佳实践
GitLab 合并请求审查
review-mr
查找当前 jj 分支对应的 GitLab 合并请求(MR)并对其进行代码审查。当用户想要审查 MR、审查合并请求、审查“我的 MR”,或审查当前分支在 GitLab 上的更改时使用。