Agent Skillswarpdotdev/warp › agent-add-mcp

agent-add-mcp

GitHub

指导用户将MCP服务器配置添加到Warp编辑器中,包括确定作用域、获取连接细节、检查或创建配置文件以及写入具体配置。

resources/bundled/skills/add-mcp-server/SKILL.md warpdotdev/warp

Trigger Scenarios

用户需要在Warp中添加MCP服务器 用户询问如何配置Warp的MCP设置

Install

npx skills add warpdotdev/warp --skill agent-add-mcp -g -y
More Options

Non-standard path

npx skills add https://github.com/warpdotdev/warp/tree/master/resources/bundled/skills/add-mcp-server -g -y

Use without installing

npx skills use warpdotdev/warp@agent-add-mcp

指定 Agent (Claude Code)

npx skills add warpdotdev/warp --skill agent-add-mcp -a claude-code -g -y

安装 repo 全部 skill

npx skills add warpdotdev/warp --all -g -y

预览 repo 内 skill

npx skills add warpdotdev/warp --list

SKILL.md

Frontmatter
{
    "name": "agent-add-mcp",
    "description": "Use this skill when helping users add MCP servers to their Warp configuration."
}

Adding MCP Servers to Warp

Warp supports MCP servers via native config files. Follow these steps when helping a user add an MCP server.

Step 1: Determine Scope

If the user hasn't specified, ask whether they want to configure the server globally (for all projects) or project-scoped (for a specific repository only).

Config file paths:

  • Global (user-scoped): ~/.warp/.mcp.json
  • Project-scoped: {repo_root}/.warp/.mcp.json

Step 2: Gather Server Details

If the user hasn't provided the server's connection details, use WebSearch to find the correct configuration for the named server.

If it's unclear whether the server should be run as a local CLI process (stdio transport) or connected to via URL (HTTP/SSE streaming transport), ask the user which they prefer.

Step 3: Check and Prepare the Config File

Check whether the target config file exists.

  • If it does not exist, create it with mkdir -p for the directory and initialize it with an empty mcpServers wrapper key:

    {
      "mcpServers": {}
    }
    
  • If it exists, read it to determine which top-level wrapper key is already in use. Recognized wrapper keys (in order of preference):

    • mcpServers (preferred)
    • mcp_servers
    • servers
    • mcp.servers (nested under a mcp key)
    • Flat map (each top-level key is a server name)

    Preserve the existing wrapper key when writing. If the existing key is unrecognized or incompatible, switch to mcpServers.

    Never remove existing server entries — only add or update the new server.

Step 4: Write the Server Configuration

Command-based server (stdio transport)

{
  "mcpServers": {
    "server-name": {
      "command": "npx",
      "args": ["-y", "@scope/package-name"],
      "env": {
        "API_KEY": "${API_KEY}"
      }
    }
  }
}

By default, Warp spawns stdio servers from the directory the config was discovered in:

  • Project-scoped configs ({repo_root}/.warp/.mcp.json) run from the repo root.
  • Global configs (~/.warp/.mcp.json, ~/.claude.json, etc.) run from the home directory.

If the server's command or args are relative paths (e.g. ./tooling/mcp/server.js) or the server expects a specific cwd, set working_directory to override the default:

{
  "mcpServers": {
    "server-name": {
      "command": "node",
      "args": ["./tooling/mcp/server.js"],
      "working_directory": "/absolute/path/to/repo"
    }
  }
}

URL-based server (HTTP/SSE streaming transport)

{
  "mcpServers": {
    "server-name": {
      "url": "https://example.com/mcp",
      "env": {
        "API_KEY": "${API_KEY}"
      }
    }
  }
}

For environment variables containing secrets, use ${VAR_NAME} syntax — Warp will substitute the value from the user's environment at runtime.

Notes

  • Warp auto-detects changes to .mcp.json files on save — no restart required.
  • Configured servers appear in Warp's Settings under MCP, labeled "Detected from Warp".
  • Global config applies across all sessions; project config only applies when working inside that repository.

Version History

  • 726c1b6 Current 2026-07-24 20:22

Same Skill Collection

.agents/skills/add-feature-flag/SKILL.md
.agents/skills/add-telemetry/SKILL.md
.agents/skills/changelog-draft/SKILL.md
.agents/skills/classify-changelog-pr/SKILL.md
.agents/skills/cross-platform-cloud-verification/SKILL.md
.agents/skills/dedupe-issue-local/SKILL.md
.agents/skills/gui-create-launch-modal/SKILL.md
.agents/skills/gui-integration-test/SKILL.md
.agents/skills/gui-reproduce-bug-report-local/SKILL.md
.agents/skills/gui-settings-ui/SKILL.md
.agents/skills/gui-ui-guidelines/SKILL.md
.agents/skills/logging-and-error-reporting/SKILL.md
.agents/skills/promote-feature/SKILL.md
.agents/skills/remove-feature-flag/SKILL.md
.agents/skills/review-pr-local/SKILL.md
.agents/skills/rust-unit-tests/SKILL.md
.agents/skills/triage-issue-local/SKILL.md
.agents/skills/tui-testing/SKILL.md
.agents/skills/tui-ui-guidelines/SKILL.md
.agents/skills/tui-verify-change/SKILL.md
resources/bundled/mcp_skills/figma/figma-code-connect-components/SKILL.md
resources/bundled/mcp_skills/figma/figma-create-design-system-rules/SKILL.md
resources/bundled/mcp_skills/figma/figma-create-new-file/SKILL.md
resources/bundled/mcp_skills/figma/figma-generate-library/SKILL.md
resources/bundled/mcp_skills/figma/figma-implement-design/SKILL.md
resources/bundled/skills/change-keybinding/SKILL.md
resources/bundled/skills/create-skill/SKILL.md
resources/bundled/skills/create-tab-config/SKILL.md
resources/bundled/skills/factory-files/SKILL.md
resources/bundled/skills/factory-mcp/SKILL.md
resources/bundled/skills/modify-settings/SKILL.md
resources/bundled/skills/oz-platform/SKILL.md
resources/bundled/skills/pr-comments/SKILL.md
resources/bundled/skills/tab-configs/SKILL.md
resources/bundled/skills/tui-migrate-setup/SKILL.md
resources/bundled/skills/update-tab-config/SKILL.md
resources/bundled/skills/warpctrl/SKILL.md
resources/channel-gated-skills/dogfood/test-warp-ui/SKILL.md
resources/channel-gated-skills/dogfood/triage-vulnerabilities/SKILL.md
resources/channel-gated-skills/dogfood/verify-ui-change-in-cloud/SKILL.md
.agents/skills/gui-onboarding-verification-skill/SKILL.md
.warp/skills/gui-integration-test-video/SKILL.md
resources/bundled/mcp_skills/figma/edit-figma-design/SKILL.md
resources/bundled/mcp_skills/figma/figma-generate-design/SKILL.md
resources/bundled/mcp_skills/figma/figma-use/SKILL.md
resources/bundled/skills/claude-api/SKILL.md

Metadata

Files
0
Version
04a7f83
Hash
6f450e66
Indexed
2026-07-24 20:22

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-20 17:49
浙ICP备14020137号-1 $Гость$