add-mcp
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.
- 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
Help improve and flesh out written text in markdown or plain text files. Use when the user wants writing feedback, style fixes, grammar corrections, or help expanding bullet points into prose. Does not write text from scratch.
workspace
暂无简介
skill-writer
Guide users through creating Agent Skills for Claude Code. Use when the user wants to create, write, author, or design a new Skill, or needs help with SKILL.md files, frontmatter, or skill structure.
review
Review code changes for quality, security, and best practices
review-mr
Find the GitLab merge request for the current jj branch and run a code review on it. Use when the user wants to review the MR, review the merge request, review "my MR", or review the current branch's changes on GitLab.