接外部 · 够到你的数据与工具Reach Out · Touching Your Data and Tools.
agent 默认只看得见你的终端和仓库。MCP(Model Context Protocol)给它接上外面的东西:你的数据库、issue 跟踪、监控、内部 API —— Warp 还能直接读你已有的 Claude / Codex MCP 配置。这章讲哪些该连、连上之后 agent 多了什么、为什么能连不等于该连,以及一条权限上的红线。By default the agent only sees your terminal and repo. MCP (the Model Context Protocol) wires it to the outside: your database, issue tracker, monitoring, internal APIs — and Warp can read your existing Claude / Codex MCP configs directly. Which to connect, what the agent gains once you do, why can-connect is not should-connect, and a permissions line to hold.
到这里,agent 看得见的还只是你的终端和仓库。但你大半上下文不在那儿 —— 在数据库、issue 跟踪、监控面板、内部 API 里。MCP(Model Context Protocol)是那根接线:把这些外部数据和工具接进来,agent 就能直接读、直接调。这章讲哪些该连、连上之后多了什么,以及一条权限红线。By here, all the agent sees is still your terminal and repo. But most of your context isn't there — it's in databases, issue trackers, monitoring dashboards, internal APIs. MCP (the Model Context Protocol) is the wire: connect those external data and tools, and the agent can read and call them directly. This chapter covers which to connect, what you gain once connected, and one permissions line.
— I
MCP 给 agent 接上终端之外MCP Wires the Agent Beyond the Terminal.
MCP 是 agent 的插件口:用一个标准接口,把外部工具和数据源挂上来。MCP is the agent's plugin socket: one standard interface to hang external tools and data sources off of.连上一个数据库 MCP,agent 就能查你的真实数据;连上 issue 跟踪(GitHub、Linear、Jira),它能读工单写状态;连上监控,它能就着真实指标判断。1注 1Note 1Warp Docs · Model Context Protocol (MCP) —— 截至 2026-07-10,MCP servers 用标准接口给 Warp 本地 agent 暴露工具和数据源;支持 CLI command server、Streamable HTTP / SSE URL server、自定义 headers、环境变量。Warp Docs · Model Context Protocol (MCP) — as of 2026-07-10, MCP servers expose tools and data sources to Warp local agents through a standard interface; Warp supports CLI command servers, Streamable HTTP / SSE URL servers, custom headers, and environment variables.这是它从「只懂命令行」迈到「够得着你整套系统」的那一步 —— 一个光看终端答不了的问题(「这次发布慢,是哪个服务的 P99 涨了」),连上监控 MCP 它就能自己查、自己答。接口是标准化的,所以你今天给 Claude 或 Codex 配过的 MCP 服务器,往往能原样用在 Warp 上。Connect a database MCP and the agent can query your real data; connect an issue tracker (GitHub, Linear, Jira) and it can read tickets and write status; connect monitoring and it can judge against real metrics.1注 1Note 1Warp Docs · Model Context Protocol (MCP) —— 截至 2026-07-10,MCP servers 用标准接口给 Warp 本地 agent 暴露工具和数据源;支持 CLI command server、Streamable HTTP / SSE URL server、自定义 headers、环境变量。Warp Docs · Model Context Protocol (MCP) — as of 2026-07-10, MCP servers expose tools and data sources to Warp local agents through a standard interface; Warp supports CLI command servers, Streamable HTTP / SSE URL servers, custom headers, and environment variables. This is its step from 'only knows the command line' to 'can reach across your whole system' — a question the terminal alone can't answer ('this release is slow, whose P99 went up') becomes one it queries and answers itself once a monitoring MCP is connected. The interface is standardized, so an MCP server you configured for Claude or Codex today often works as-is in Warp.
默认 denylist,每次批准Default denylist, approve every time
高风险High-risk
支付、客户数据导出、密码管理器、生产控制台、邮件发送Payments, customer export, password manager, production console, email sending
不要接,或只在隔离环境临时接Do not connect, or connect only temporarily in isolation
— II
它能读你已有的配置It Can Read Your Existing Configs.
你不必重新配一遍 —— Warp 会自动检测你已有的 Claude / Codex MCP 配置,加服务器也不用重启。You don't reconfigure from scratch — Warp auto-detects your existing Claude / Codex MCP configs, and adding a server doesn't need a restart.在 Settings > Agents > MCP servers 里加,或用 Warp Drive 里的 MCP Servers 入口。全局 Warp file-based servers 默认 auto-spawn;第三方全局 servers 要你显式打开「Auto-spawn servers from third-party agents」;项目级 servers 永不自动启动,重启后还要重新手动开。2注 2Note 2Warp Docs · MCP security behavior —— 全局 Warp file-based servers 默认 auto-spawn;第三方全局 servers 需开启 Auto-spawn servers from third-party agents;项目级 servers 永不自动启动,需逐个手动开启;MCP 配置编辑需要批准。Warp Docs · MCP security behavior — global Warp file-based servers auto-spawn by default; third-party global servers require enabling Auto-spawn servers from third-party agents; project-scoped servers never auto-spawn and must be started manually; MCP config edits require approval.这条规则很重要:从陌生 repo clone 下来的 .warp/.mcp.json 不能自己启动本地命令。一个 CLI 型条目通常长这样(示意,真正可用的 package 和参数以对应 MCP server 文档为准):Add them under Settings > Agents > MCP servers, or through MCP Servers in Warp Drive. Global Warp file-based servers auto-spawn by default; third-party global servers require you to enable "Auto-spawn servers from third-party agents"; project-scoped servers never auto-spawn and must be manually started again after restart.2注 2Note 2Warp Docs · MCP security behavior —— 全局 Warp file-based servers 默认 auto-spawn;第三方全局 servers 需开启 Auto-spawn servers from third-party agents;项目级 servers 永不自动启动,需逐个手动开启;MCP 配置编辑需要批准。Warp Docs · MCP security behavior — global Warp file-based servers auto-spawn by default; third-party global servers require enabling Auto-spawn servers from third-party agents; project-scoped servers never auto-spawn and must be started manually; MCP config edits require approval. That rule matters: a cloned repo's .warp/.mcp.json cannot silently start local commands. A CLI server entry usually looks like this (illustrative; use the package and args from the server's own docs):
我要给 Warp Agent 接一个 MCP server:<server-name>。
先不要安装或启动。
请帮我审查:
1. 它能读什么;
2. 它能写什么;
3. 凭据放在哪里,能否撤销;
4. 日志在哪里,是否可能含 token;
5. 该设为 allowlist、Agent decides 还是 denylist;
6. 第一次只读验证问题应该问什么。I want to connect an MCP server to Warp Agent: <server-name>.
Do not install or start it yet.
Review:
1. what it can read;
2. what it can write;
3. where credentials live and how they can be revoked;
4. where logs live and whether they can contain tokens;
5. whether to set allowlist, Agent decides, or denylist;
6. the first read-only verification question to ask.
我要给 Warp Agent 接一个 MCP server:github-mcp-server。
先不要安装或启动。
请帮我审查:
1. 它能读什么;
2. 它能写什么;
3. 凭据放在哪里,能否撤销;
4. 日志在哪里,是否可能含 token;
5. 该设为 allowlist、Agent decides 还是 denylist;
6. 第一次只读验证问题应该问什么。I want to connect an MCP server to Warp Agent: github-mcp-server.
Do not install or start it yet.
Review:
1. what it can read;
2. what it can write;
3. where credentials live and how they can be revoked;
4. where logs live and whether they can contain tokens;
5. whether to set allowlist, Agent decides, or denylist;
6. the first read-only verification question to ask.
— III
能连不等于该连Can-Connect Isn't Should-Connect.
每多接一个 MCP 服务器,agent 能做的事变多,能闯的祸也变多。Every MCP server you add widens what the agent can do — and what it can break.三笔代价要算:多一个外部依赖就多一份攻击面,多一组工具就多烧 token,多一处写权限就多一处它能改坏的地方。所以默认连只读,写权限单独想清楚。Warp 让你对每个 MCP 服务器选「Agent decides / allowlist / denylist」,denylist 优先于另两者、命中必须人工批准 —— 生产库的写口就该进 denylist。3注 3Note 3Warp Docs · Agent Profiles & Permissions —— 可针对每个 MCP 服务器选择「Agent decides」、allowlist 或 denylist;denylist 优先于 allowlist 与「Agent decides」,命中必须人工批准。Warp Docs · Agent Profiles & Permissions — for each MCP server you can choose 'Agent decides,' allowlist, or denylist; the denylist takes precedence over both the allowlist and 'Agent decides,' and a match always requires manual approval.连之前先问三句:这服务器要的权限是只读还是能写?它的工具会不会把敏感数据带出去?这件事我多久用一次、值不值得让它常驻?「能连」是接口给的能力,「该连」是你给的判断。Three costs to count: each external dependency is more attack surface, each tool set burns more tokens, each write permission is one more place it can damage. So connect read-only by default, and think write access through separately. Warp lets you pick 'Agent decides / allowlist / denylist' per MCP server, with the denylist taking precedence over the other two and a match always requiring manual approval — a prod database's write path belongs on the denylist.3注 3Note 3Warp Docs · Agent Profiles & Permissions —— 可针对每个 MCP 服务器选择「Agent decides」、allowlist 或 denylist;denylist 优先于 allowlist 与「Agent decides」,命中必须人工批准。Warp Docs · Agent Profiles & Permissions — for each MCP server you can choose 'Agent decides,' allowlist, or denylist; the denylist takes precedence over both the allowlist and 'Agent decides,' and a match always requires manual approval. Before connecting, ask three things: read-only or write? could its tools carry sensitive data out? how often do I use this, and is it worth keeping resident? 'Can connect' is the capability the interface gives; 'should connect' is the judgment you give.
你要做的事What you need
优先选Prefer
原因Why
一次性调用一个公开 APIOne-off call to a public API
API CLI / curlAPI CLI / curl
轻,不扩大长期权限边界Lightweight, no permanent permission boundary
重复查内部资料或 issueRepeatedly query internal docs or issues
MCP
让 agent 直接读上下文Lets the agent read context directly
需要网页登录、点按钮、看页面状态Need login, clicks, visual page state
浏览器 / Computer Use 类工具Browser / Computer Use class tool
MCP 不是 GUI 自动化MCP is not GUI automation
第一次只接只读 MCP:先启动、问一个只读问题、看它用到哪些 tool。First MCP should be read-only: start it, ask one read-only question, inspect which tools it used.
不要先接支付、生产数据库写入、密码管理器、云控制台写权限、邮件发送、客户数据导出。Do not start with payments, production DB writes, password managers, cloud-console write access, email sending, or customer-data export.
共享 MCP server 前确认 env 会被 scrub,仍要求每个人自己填 token。Before sharing an MCP server, confirm env values are scrubbed and each person must enter their own token.
分享日志前先清 token;很多 MCP URL 本身就等同密码。Clean tokens before sharing logs; many MCP URLs are effectively passwords.
只连一个,把分寸先练出来:Connect just one, and build the judgment first:
01
连一个只读的 MCP 服务器Connect one read-only MCP server
挑一个低风险的(本地数据库只读、文档服务器都行),用 npx 跑通再贴进 Settings > Agents > MCP servers。Pick a low-risk one (a local DB read-only, or a docs server), get it running with npx, then paste it into Settings > Agents > MCP servers.
02
问一个光看终端答不了的问题Ask a question the terminal alone can't answer
让 agent 用这个服务器回答,确认它真读到了外部数据,而不是凭空编。Have the agent answer using that server, confirming it actually read the external data rather than making it up.
03
把它的权限收成只读 allowlistLock its permission to a read-only allowlist
设完权限再依赖它 —— 这一步就是「能连」和「该连」之间的那道闸。Set the permission before relying on it — this step is the gate between 'can connect' and 'should connect.'
能连的是接口,
该连的是判断.
What can connect is the interface,
what should connect is judgment.
Aklman Library
— 讨论Discussion
讨论Discussion.
评论区初始化中…Initializing comments…
01 / 01
没有匹配结果No matches.
换个关键词,或按 Esc 回到页面Try another keyword, or press Esc to return