一键导入
add-mcp-server
Add an MCP server to the current project by creating or updating a project-level .mcp.json, .env, and .gitignore
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Add an MCP server to the current project by creating or updating a project-level .mcp.json, .env, and .gitignore
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Post or update a comment on a Linear ticket using the Linear MCP server. Accepts a ticket ID (e.g. ENG-123), a Linear ticket URL, or a direct link to an existing comment. Works for both human-authored comments and agent-generated summaries.
Creates a Linear document (the Documents feature, distinct from issues/projects) from context in the current conversation, a plan, or a file. Use when the user wants to write up a doc, spec, RFC, or notes page in Linear and attach it to a team, project, initiative, cycle, or issue.
Used to run githooks, perform code & plan reviews with expert critics, and commit/push verified changes
Creates a Linear project under an initiative from a draft list of tickets, clarifies ambiguity with the human, then creates the project and each ticket via /create-linear-ticket. Use when the user wants to stand up a new project in Linear from a plan, doc, or ticket list.
Used to build and execute an approved implementation plan by spinning up agents
Used to gather requirements, clarify scope, and create implementation plans for new feature requests or bug fixes
| name | add-mcp-server |
| description | Add an MCP server to the current project by creating or updating a project-level .mcp.json, .env, and .gitignore |
| model | sonnet |
Use this skill when the user wants to add an MCP server that should only be available in a specific repo or project — not globally.
Before touching any files, collect all required information upfront:
command + args) or HTTP/SSE (url).Locate the project root using git rev-parse --show-toplevel. Use that directory for all file operations. Check whether a .mcp.json already exists there — if so, read it to merge additions without clobbering existing servers.
Check whether a .env file exists at the project root. If it does, read it to identify which required env vars are already defined. Only ask the user for values that are genuinely missing. Do not read .env if it's blocked by permissions — just ask the user instead.
For any missing env var values collected in step 1: add them to .env (creating it if needed).
Write or update .mcp.json using ${VAR_NAME} syntax to reference env vars — Claude Code expands these at runtime. Never hardcode secret values.
Command-based server:
{
"mcpServers": {
"<server-name>": {
"command": "<executable>",
"args": ["<arg1>", "<arg2>"],
"env": {
"API_TOKEN": "${API_TOKEN}"
}
}
}
}
HTTP/SSE server:
{
"mcpServers": {
"<server-name>": {
"url": "https://example.com/mcp",
"headers": {
"Authorization": "Bearer ${API_TOKEN}"
}
}
}
}
.mcp.json is safe to commit because it only contains ${VAR_NAME} references, never literal secrets. Ensure .env is in .gitignore — check and add it if missing, then let the user know.
Tell the user to restart their Claude Code session for the new server to take effect. A full restart is required — the /mcp command only lists servers, it does not reload them.
After restarting, the user should run /mcp to confirm the server appears in the list. If it doesn't show up, check for typos in the server name, verify the command is installed, and confirm all env vars are set correctly in .env.