接线 · MCP 把你的世界接进来Wire In · MCP Brings Your World In.
你的上下文大半不在代码里 —— 在 GitHub 的 issue、Linear 的工单、数据库的表、Sentry 的报错、Notion 的文档里。MCP 让 Claude Code 直接读它们、调它们,不用你来回复制粘贴。这是它从「改这个项目」扩到「接管你整套工作」的接口。这一章讲 MCP 怎么配、哪些服务器值得接、本地 vs 远程的取舍,以及一条比「能不能接」更重要的线:每接一个外部工具,你就把它能读到、能动到的范围扩大了一圈 —— 什么时候「能接」不等于「该接」。Most of your context isn't in code — it's in a GitHub issue, a Linear ticket, a database table, a Sentry error, a Notion doc. MCP lets Claude Code read and call them directly, no copy-paste shuttling. It's the interface that stretches it from 'editing this project' to 'taking on your whole workflow.' How to configure MCP, which servers are worth wiring, local vs remote trade-offs, and a line that matters more than 'can it connect': every external tool you add widens what it can read and act on — when 'can connect' isn't 'should connect.'
9 分钟 · 初稿 2026.079 Min · Drafted 2026.07
你的上下文大半不在代码里。需求在 Jira 的工单里,报错在 Sentry 里,数据在 PostgreSQL 里,设计稿在 Figma 里,讨论在 Slack 里 —— 于是你的日常变成了搬运:开网页,复制,粘进对话,再解释一遍这是什么。MCP 把搬运换成接线:让 Claude Code 直接读它们、动它们。这一章讲怎么接、接在哪一层,以及一条比「能不能接」更要紧的线 —— 每接一个,它的读写半径就大一圈。Most of your context isn't in code. Requirements live in Jira tickets, errors in Sentry, data in PostgreSQL, designs in Figma, discussion in Slack — so your day becomes haulage: open the page, copy, paste into chat, explain what it is. MCP replaces hauling with wiring: Claude Code reads and acts on those systems directly. This chapter covers how to connect, at which scope — and a line that matters more than 'can it connect': every hookup widens its read-write radius.
— I
接线:一条命令,两种形态Wiring In: One Command, Two Shapes.
MCP(Model Context Protocol)是接外部工具的开放标准,几百个现成服务器可用。接上之后的样子,文档自己举的例子最直观:「实现 JIRA 工单 ENG-4521 描述的功能并在 GitHub 开 PR」「按 Slack 里新发的 Figma 设计稿改邮件模板」「从我们的 PostgreSQL 里找 10 个用过这个功能的用户」。1注 1Note 1Claude Code Docs · MCP —— MCP 是开放标准,把外部工具与数据源接给 Claude Code:实现 Jira issue 并开 PR、查 PostgreSQL、按 Slack 里的 Figma 稿改模板、起草 Gmail 邀请等都是文档自己举的例子。接入:claude mcp add,--transport http / sse(远程服务)或 stdio(本地进程,-- 后接启动命令);/mcp 面板看连接状态、给需要 OAuth 2.0 的远程服务器登录。作用域:local(默认,存 ~/.claude.json,只属于你和当前项目)、project(写 .mcp.json 进版本库,团队共享,首次使用前要你批准,claude mcp reset-project-choices 可重置)、user(你的所有项目)。tool search 默认开启:工具名先注册、完整定义用到才加载,几十个服务器也不挤占上下文。安全原话:「先确认你信任每个服务器再连接」,会抓取外部内容的服务器可能带来 prompt injection 风险。截至 2026-07-17。Claude Code Docs · MCP — MCP is the open standard wiring external tools and data into Claude Code: implementing a Jira issue and opening a PR, querying PostgreSQL, updating a template from Figma designs posted in Slack, and drafting Gmail invites are the docs' own examples. Adding: claude mcp add with --transport http / sse (remote services) or stdio (a local process, its launch command after --); the /mcp panel shows connection status and signs in to remote servers needing OAuth 2.0. Scopes: local (default, stored in ~/.claude.json, yours and this project only), project (.mcp.json checked into version control, team-shared, requiring your approval before first use; claude mcp reset-project-choices resets), user (all your projects). Tool search is on by default: tool names register upfront and full definitions load on use, so dozens of servers don't crowd the context. The security line verbatim: 'Verify you trust each server before connecting it' — servers that fetch external content can expose you to prompt injection risk. As of 2026-07-17.接入只是一条命令,分两种形态:远程服务用 --transport http(或 sse),本地进程用 stdio、-- 后面跟启动命令:MCP (Model Context Protocol) is the open standard for external tools, with hundreds of ready servers. What it looks like once connected, the docs' own examples say best: 'implement the feature described in JIRA issue ENG-4521 and create a PR on GitHub'; 'update our standard email template based on the new Figma designs posted in Slack'; 'find 10 users who used this feature, from our PostgreSQL.'1注 1Note 1Claude Code Docs · MCP —— MCP 是开放标准,把外部工具与数据源接给 Claude Code:实现 Jira issue 并开 PR、查 PostgreSQL、按 Slack 里的 Figma 稿改模板、起草 Gmail 邀请等都是文档自己举的例子。接入:claude mcp add,--transport http / sse(远程服务)或 stdio(本地进程,-- 后接启动命令);/mcp 面板看连接状态、给需要 OAuth 2.0 的远程服务器登录。作用域:local(默认,存 ~/.claude.json,只属于你和当前项目)、project(写 .mcp.json 进版本库,团队共享,首次使用前要你批准,claude mcp reset-project-choices 可重置)、user(你的所有项目)。tool search 默认开启:工具名先注册、完整定义用到才加载,几十个服务器也不挤占上下文。安全原话:「先确认你信任每个服务器再连接」,会抓取外部内容的服务器可能带来 prompt injection 风险。截至 2026-07-17。Claude Code Docs · MCP — MCP is the open standard wiring external tools and data into Claude Code: implementing a Jira issue and opening a PR, querying PostgreSQL, updating a template from Figma designs posted in Slack, and drafting Gmail invites are the docs' own examples. Adding: claude mcp add with --transport http / sse (remote services) or stdio (a local process, its launch command after --); the /mcp panel shows connection status and signs in to remote servers needing OAuth 2.0. Scopes: local (default, stored in ~/.claude.json, yours and this project only), project (.mcp.json checked into version control, team-shared, requiring your approval before first use; claude mcp reset-project-choices resets), user (all your projects). Tool search is on by default: tool names register upfront and full definitions load on use, so dozens of servers don't crowd the context. The security line verbatim: 'Verify you trust each server before connecting it' — servers that fetch external content can expose you to prompt injection risk. As of 2026-07-17. Connecting is one command in two shapes: remote services via --transport http (or sse), local processes via stdio with the launch command after --:
三条接线:远程服务、带密钥的本地进程、查看与登录Three hookups: a remote service, a keyed local process, inspect and sign in
担心几十个服务器把上下文挤爆?这一点默认已被解决:tool search 只把工具名先注册进来,完整定义等用到那一刻才加载 —— 闲置的接线几乎不占地方。1注 1Note 1Claude Code Docs · MCP —— MCP 是开放标准,把外部工具与数据源接给 Claude Code:实现 Jira issue 并开 PR、查 PostgreSQL、按 Slack 里的 Figma 稿改模板、起草 Gmail 邀请等都是文档自己举的例子。接入:claude mcp add,--transport http / sse(远程服务)或 stdio(本地进程,-- 后接启动命令);/mcp 面板看连接状态、给需要 OAuth 2.0 的远程服务器登录。作用域:local(默认,存 ~/.claude.json,只属于你和当前项目)、project(写 .mcp.json 进版本库,团队共享,首次使用前要你批准,claude mcp reset-project-choices 可重置)、user(你的所有项目)。tool search 默认开启:工具名先注册、完整定义用到才加载,几十个服务器也不挤占上下文。安全原话:「先确认你信任每个服务器再连接」,会抓取外部内容的服务器可能带来 prompt injection 风险。截至 2026-07-17。Claude Code Docs · MCP — MCP is the open standard wiring external tools and data into Claude Code: implementing a Jira issue and opening a PR, querying PostgreSQL, updating a template from Figma designs posted in Slack, and drafting Gmail invites are the docs' own examples. Adding: claude mcp add with --transport http / sse (remote services) or stdio (a local process, its launch command after --); the /mcp panel shows connection status and signs in to remote servers needing OAuth 2.0. Scopes: local (default, stored in ~/.claude.json, yours and this project only), project (.mcp.json checked into version control, team-shared, requiring your approval before first use; claude mcp reset-project-choices resets), user (all your projects). Tool search is on by default: tool names register upfront and full definitions load on use, so dozens of servers don't crowd the context. The security line verbatim: 'Verify you trust each server before connecting it' — servers that fetch external content can expose you to prompt injection risk. As of 2026-07-17.顺带一条省心的对照:如果那个系统有好用的 CLI(比如 GitHub 的 gh),装上让它直接用,常常比接 MCP 更省 —— CLI 是最上下文经济的外部接口,不熟的它还能靠 --help 现学。2注 2Note 2Claude Code Docs · Best practices —— 与外部服务打交道时,CLI 是最省上下文的方式:装了 gh,Claude 就会用它建 issue、开 PR、读评论;不熟的 CLI 也能靠 --help 现学。截至 2026-07-17。Claude Code Docs · Best practices — for external services, CLI tools are the most context-efficient route: with gh installed, Claude uses it to create issues, open PRs, and read comments; it can learn an unfamiliar CLI from --help on the spot. As of 2026-07-17.Worried dozens of servers will burst the context? Solved by default: tool search registers only tool names upfront, loading full definitions the moment one is used — idle wiring costs almost nothing.1注 1Note 1Claude Code Docs · MCP —— MCP 是开放标准,把外部工具与数据源接给 Claude Code:实现 Jira issue 并开 PR、查 PostgreSQL、按 Slack 里的 Figma 稿改模板、起草 Gmail 邀请等都是文档自己举的例子。接入:claude mcp add,--transport http / sse(远程服务)或 stdio(本地进程,-- 后接启动命令);/mcp 面板看连接状态、给需要 OAuth 2.0 的远程服务器登录。作用域:local(默认,存 ~/.claude.json,只属于你和当前项目)、project(写 .mcp.json 进版本库,团队共享,首次使用前要你批准,claude mcp reset-project-choices 可重置)、user(你的所有项目)。tool search 默认开启:工具名先注册、完整定义用到才加载,几十个服务器也不挤占上下文。安全原话:「先确认你信任每个服务器再连接」,会抓取外部内容的服务器可能带来 prompt injection 风险。截至 2026-07-17。Claude Code Docs · MCP — MCP is the open standard wiring external tools and data into Claude Code: implementing a Jira issue and opening a PR, querying PostgreSQL, updating a template from Figma designs posted in Slack, and drafting Gmail invites are the docs' own examples. Adding: claude mcp add with --transport http / sse (remote services) or stdio (a local process, its launch command after --); the /mcp panel shows connection status and signs in to remote servers needing OAuth 2.0. Scopes: local (default, stored in ~/.claude.json, yours and this project only), project (.mcp.json checked into version control, team-shared, requiring your approval before first use; claude mcp reset-project-choices resets), user (all your projects). Tool search is on by default: tool names register upfront and full definitions load on use, so dozens of servers don't crowd the context. The security line verbatim: 'Verify you trust each server before connecting it' — servers that fetch external content can expose you to prompt injection risk. As of 2026-07-17. And one comparison worth keeping: if the system has a good CLI (GitHub's gh, say), installing it and letting Claude drive it is often cheaper than MCP — CLIs are the most context-efficient external interface, and it can learn an unfamiliar one from --help on the spot.2注 2Note 2Claude Code Docs · Best practices —— 与外部服务打交道时,CLI 是最省上下文的方式:装了 gh,Claude 就会用它建 issue、开 PR、读评论;不熟的 CLI 也能靠 --help 现学。截至 2026-07-17。Claude Code Docs · Best practices — for external services, CLI tools are the most context-efficient route: with gh installed, Claude uses it to create issues, open PRs, and read comments; it can learn an unfamiliar CLI from --help on the spot. As of 2026-07-17.
— II
放哪一层:私用、随仓库、跟着你Which Scope: Private, with the Repo, or with You.
和 CLAUDE.md、subagent 一样,MCP 配置也分层,答案取决于「这条线属于谁」。1注 1Note 1Claude Code Docs · MCP —— MCP 是开放标准,把外部工具与数据源接给 Claude Code:实现 Jira issue 并开 PR、查 PostgreSQL、按 Slack 里的 Figma 稿改模板、起草 Gmail 邀请等都是文档自己举的例子。接入:claude mcp add,--transport http / sse(远程服务)或 stdio(本地进程,-- 后接启动命令);/mcp 面板看连接状态、给需要 OAuth 2.0 的远程服务器登录。作用域:local(默认,存 ~/.claude.json,只属于你和当前项目)、project(写 .mcp.json 进版本库,团队共享,首次使用前要你批准,claude mcp reset-project-choices 可重置)、user(你的所有项目)。tool search 默认开启:工具名先注册、完整定义用到才加载,几十个服务器也不挤占上下文。安全原话:「先确认你信任每个服务器再连接」,会抓取外部内容的服务器可能带来 prompt injection 风险。截至 2026-07-17。Claude Code Docs · MCP — MCP is the open standard wiring external tools and data into Claude Code: implementing a Jira issue and opening a PR, querying PostgreSQL, updating a template from Figma designs posted in Slack, and drafting Gmail invites are the docs' own examples. Adding: claude mcp add with --transport http / sse (remote services) or stdio (a local process, its launch command after --); the /mcp panel shows connection status and signs in to remote servers needing OAuth 2.0. Scopes: local (default, stored in ~/.claude.json, yours and this project only), project (.mcp.json checked into version control, team-shared, requiring your approval before first use; claude mcp reset-project-choices resets), user (all your projects). Tool search is on by default: tool names register upfront and full definitions load on use, so dozens of servers don't crowd the context. The security line verbatim: 'Verify you trust each server before connecting it' — servers that fetch external content can expose you to prompt injection risk. As of 2026-07-17.Like CLAUDE.md and subagents, MCP configuration is layered; the answer depends on who the wire belongs to.1注 1Note 1Claude Code Docs · MCP —— MCP 是开放标准,把外部工具与数据源接给 Claude Code:实现 Jira issue 并开 PR、查 PostgreSQL、按 Slack 里的 Figma 稿改模板、起草 Gmail 邀请等都是文档自己举的例子。接入:claude mcp add,--transport http / sse(远程服务)或 stdio(本地进程,-- 后接启动命令);/mcp 面板看连接状态、给需要 OAuth 2.0 的远程服务器登录。作用域:local(默认,存 ~/.claude.json,只属于你和当前项目)、project(写 .mcp.json 进版本库,团队共享,首次使用前要你批准,claude mcp reset-project-choices 可重置)、user(你的所有项目)。tool search 默认开启:工具名先注册、完整定义用到才加载,几十个服务器也不挤占上下文。安全原话:「先确认你信任每个服务器再连接」,会抓取外部内容的服务器可能带来 prompt injection 风险。截至 2026-07-17。Claude Code Docs · MCP — MCP is the open standard wiring external tools and data into Claude Code: implementing a Jira issue and opening a PR, querying PostgreSQL, updating a template from Figma designs posted in Slack, and drafting Gmail invites are the docs' own examples. Adding: claude mcp add with --transport http / sse (remote services) or stdio (a local process, its launch command after --); the /mcp panel shows connection status and signs in to remote servers needing OAuth 2.0. Scopes: local (default, stored in ~/.claude.json, yours and this project only), project (.mcp.json checked into version control, team-shared, requiring your approval before first use; claude mcp reset-project-choices resets), user (all your projects). Tool search is on by default: tool names register upfront and full definitions load on use, so dozens of servers don't crowd the context. The security line verbatim: 'Verify you trust each server before connecting it' — servers that fetch external content can expose you to prompt injection risk. As of 2026-07-17.
作用域Scope
存在哪Stored in
适合Right for
local(默认) (default)
~/.claude.json,只属于你 + 这个项目, you + this project only
实验性接线、带私人凭据的服务器Experiments, servers with private credentials
project
.mcp.json,进版本库, checked into the repo
全队共用的工单、数据库接线Team-shared tracker and database wiring
user
你的所有项目All your projects
你走到哪用到哪的个人工具Personal tools that follow you everywhere
project 层是团队分发的正道:一份 .mcp.json 提交进仓库,全队 clone 下来就有同一套接线。配套的安全阀值得注意:来自 .mcp.json 的服务器首次使用前要你亲自批准 —— 仓库不能替你决定接什么;批错了,claude mcp reset-project-choices 重来。1注 1Note 1Claude Code Docs · MCP —— MCP 是开放标准,把外部工具与数据源接给 Claude Code:实现 Jira issue 并开 PR、查 PostgreSQL、按 Slack 里的 Figma 稿改模板、起草 Gmail 邀请等都是文档自己举的例子。接入:claude mcp add,--transport http / sse(远程服务)或 stdio(本地进程,-- 后接启动命令);/mcp 面板看连接状态、给需要 OAuth 2.0 的远程服务器登录。作用域:local(默认,存 ~/.claude.json,只属于你和当前项目)、project(写 .mcp.json 进版本库,团队共享,首次使用前要你批准,claude mcp reset-project-choices 可重置)、user(你的所有项目)。tool search 默认开启:工具名先注册、完整定义用到才加载,几十个服务器也不挤占上下文。安全原话:「先确认你信任每个服务器再连接」,会抓取外部内容的服务器可能带来 prompt injection 风险。截至 2026-07-17。Claude Code Docs · MCP — MCP is the open standard wiring external tools and data into Claude Code: implementing a Jira issue and opening a PR, querying PostgreSQL, updating a template from Figma designs posted in Slack, and drafting Gmail invites are the docs' own examples. Adding: claude mcp add with --transport http / sse (remote services) or stdio (a local process, its launch command after --); the /mcp panel shows connection status and signs in to remote servers needing OAuth 2.0. Scopes: local (default, stored in ~/.claude.json, yours and this project only), project (.mcp.json checked into version control, team-shared, requiring your approval before first use; claude mcp reset-project-choices resets), user (all your projects). Tool search is on by default: tool names register upfront and full definitions load on use, so dozens of servers don't crowd the context. The security line verbatim: 'Verify you trust each server before connecting it' — servers that fetch external content can expose you to prompt injection risk. As of 2026-07-17.The project scope is how teams distribute: one .mcp.json committed to the repo, and everyone who clones gets the same wiring. Note the safety valve that comes with it: servers from .mcp.jsonrequire your personal approval before first use — a repository can't decide your hookups for you; approved wrongly, claude mcp reset-project-choices starts over.1注 1Note 1Claude Code Docs · MCP —— MCP 是开放标准,把外部工具与数据源接给 Claude Code:实现 Jira issue 并开 PR、查 PostgreSQL、按 Slack 里的 Figma 稿改模板、起草 Gmail 邀请等都是文档自己举的例子。接入:claude mcp add,--transport http / sse(远程服务)或 stdio(本地进程,-- 后接启动命令);/mcp 面板看连接状态、给需要 OAuth 2.0 的远程服务器登录。作用域:local(默认,存 ~/.claude.json,只属于你和当前项目)、project(写 .mcp.json 进版本库,团队共享,首次使用前要你批准,claude mcp reset-project-choices 可重置)、user(你的所有项目)。tool search 默认开启:工具名先注册、完整定义用到才加载,几十个服务器也不挤占上下文。安全原话:「先确认你信任每个服务器再连接」,会抓取外部内容的服务器可能带来 prompt injection 风险。截至 2026-07-17。Claude Code Docs · MCP — MCP is the open standard wiring external tools and data into Claude Code: implementing a Jira issue and opening a PR, querying PostgreSQL, updating a template from Figma designs posted in Slack, and drafting Gmail invites are the docs' own examples. Adding: claude mcp add with --transport http / sse (remote services) or stdio (a local process, its launch command after --); the /mcp panel shows connection status and signs in to remote servers needing OAuth 2.0. Scopes: local (default, stored in ~/.claude.json, yours and this project only), project (.mcp.json checked into version control, team-shared, requiring your approval before first use; claude mcp reset-project-choices resets), user (all your projects). Tool search is on by default: tool names register upfront and full definitions load on use, so dozens of servers don't crowd the context. The security line verbatim: 'Verify you trust each server before connecting it' — servers that fetch external content can expose you to prompt injection risk. As of 2026-07-17.
— III
能接,不等于该接'Can Connect' Is Not 'Should Connect'.
现在说那条更要紧的线。每接一个服务器,你都在扩大两样东西:它能读到的范围(这些数据从此可能进入对话与上下文),和它能动到的范围(工具是能执行动作的)。文档把丑话说在前面:先确认你信任每个服务器再连接;而会抓取外部内容的服务器,还可能带来 prompt injection 风险 —— 它替你读回来的网页或工单里,可能藏着写给模型看的指令。1注 1Note 1Claude Code Docs · MCP —— MCP 是开放标准,把外部工具与数据源接给 Claude Code:实现 Jira issue 并开 PR、查 PostgreSQL、按 Slack 里的 Figma 稿改模板、起草 Gmail 邀请等都是文档自己举的例子。接入:claude mcp add,--transport http / sse(远程服务)或 stdio(本地进程,-- 后接启动命令);/mcp 面板看连接状态、给需要 OAuth 2.0 的远程服务器登录。作用域:local(默认,存 ~/.claude.json,只属于你和当前项目)、project(写 .mcp.json 进版本库,团队共享,首次使用前要你批准,claude mcp reset-project-choices 可重置)、user(你的所有项目)。tool search 默认开启:工具名先注册、完整定义用到才加载,几十个服务器也不挤占上下文。安全原话:「先确认你信任每个服务器再连接」,会抓取外部内容的服务器可能带来 prompt injection 风险。截至 2026-07-17。Claude Code Docs · MCP — MCP is the open standard wiring external tools and data into Claude Code: implementing a Jira issue and opening a PR, querying PostgreSQL, updating a template from Figma designs posted in Slack, and drafting Gmail invites are the docs' own examples. Adding: claude mcp add with --transport http / sse (remote services) or stdio (a local process, its launch command after --); the /mcp panel shows connection status and signs in to remote servers needing OAuth 2.0. Scopes: local (default, stored in ~/.claude.json, yours and this project only), project (.mcp.json checked into version control, team-shared, requiring your approval before first use; claude mcp reset-project-choices resets), user (all your projects). Tool search is on by default: tool names register upfront and full definitions load on use, so dozens of servers don't crowd the context. The security line verbatim: 'Verify you trust each server before connecting it' — servers that fetch external content can expose you to prompt injection risk. As of 2026-07-17.Now the line that matters more. Every server you add widens two things: what it can read (data that may now enter conversations and context), and what it can act on (tools execute). The docs say the ugly part upfront: verify you trust each server before connecting — and a server that fetches external content can expose you to prompt injection, because the page or ticket it reads back for you may carry instructions written for the model.1注 1Note 1Claude Code Docs · MCP —— MCP 是开放标准,把外部工具与数据源接给 Claude Code:实现 Jira issue 并开 PR、查 PostgreSQL、按 Slack 里的 Figma 稿改模板、起草 Gmail 邀请等都是文档自己举的例子。接入:claude mcp add,--transport http / sse(远程服务)或 stdio(本地进程,-- 后接启动命令);/mcp 面板看连接状态、给需要 OAuth 2.0 的远程服务器登录。作用域:local(默认,存 ~/.claude.json,只属于你和当前项目)、project(写 .mcp.json 进版本库,团队共享,首次使用前要你批准,claude mcp reset-project-choices 可重置)、user(你的所有项目)。tool search 默认开启:工具名先注册、完整定义用到才加载,几十个服务器也不挤占上下文。安全原话:「先确认你信任每个服务器再连接」,会抓取外部内容的服务器可能带来 prompt injection 风险。截至 2026-07-17。Claude Code Docs · MCP — MCP is the open standard wiring external tools and data into Claude Code: implementing a Jira issue and opening a PR, querying PostgreSQL, updating a template from Figma designs posted in Slack, and drafting Gmail invites are the docs' own examples. Adding: claude mcp add with --transport http / sse (remote services) or stdio (a local process, its launch command after --); the /mcp panel shows connection status and signs in to remote servers needing OAuth 2.0. Scopes: local (default, stored in ~/.claude.json, yours and this project only), project (.mcp.json checked into version control, team-shared, requiring your approval before first use; claude mcp reset-project-choices resets), user (all your projects). Tool search is on by default: tool names register upfront and full definitions load on use, so dozens of servers don't crowd the context. The security line verbatim: 'Verify you trust each server before connecting it' — servers that fetch external content can expose you to prompt injection risk. As of 2026-07-17.接线前过三问,比接完再后悔便宜:这条数据真需要直读吗 —— 一次性的贴进来更快,反复要的才值得接;只读够不够 —— 能查库和能改库是两个半径,从只读开始;写操作有没有闸 —— 危险动作配 ask 级权限规则或第 7 章的 PreToolUse hook,让「能写」不等于「随时会写」。Three questions before wiring beat regret after: does this data truly need direct reading — one-offs are faster pasted, only the recurring earns a wire; is read-only enough — querying and mutating a database are two radii, start read-only; is there a gate on writes — put ask-level permission rules or a chapter-7 PreToolUse hook on dangerous actions, so 'can write' never means 'writes whenever.'
— IV
什么时候接:第三次复制的时候When to Wire: The Third Time You Copy.
回到触发律,和 skill 的「第三次重打」同构:当你第三次从同一个系统复制数据贴进对话 —— 工单、报错、面板读数 —— 那个系统就该接进来了。3注 3Note 3Claude Code Docs · Extend Claude Code —— 接 MCP 的触发时机:当你反复从另一个系统的页面把数据复制进对话(工单、监控面板),就该把那个系统接成 MCP 服务器。截至 2026-07-17。Claude Code Docs · Extend Claude Code — the trigger for MCP: when you keep copying data into chat from another system's pages (a tracker, a monitoring dashboard), connect that system as an MCP server. As of 2026-07-17.一次性的资料,贴进来仍然最快;每周都在搬的,才值得一条线。这也是「编排台」的接线逻辑:第 5 章给了你人手,这一章给他们素材 —— 派出去的 subagent 能自己去读工单、查报错,你连转述都省了。Back to the trigger law, isomorphic to the skill chapter's 'third retype': the third time you copy data from the same system into chat — a ticket, an error, a dashboard reading — that system has earned its wire.3注 3Note 3Claude Code Docs · Extend Claude Code —— 接 MCP 的触发时机:当你反复从另一个系统的页面把数据复制进对话(工单、监控面板),就该把那个系统接成 MCP 服务器。截至 2026-07-17。Claude Code Docs · Extend Claude Code — the trigger for MCP: when you keep copying data into chat from another system's pages (a tracker, a monitoring dashboard), connect that system as an MCP server. As of 2026-07-17. One-off material is still fastest pasted; what you haul weekly deserves a line. This is the console's wiring logic too: chapter 5 gave you hands, this chapter feeds them material — a delegated subagent reads the ticket and checks the error itself, sparing you even the retelling.动手 · 接第一条线,按信任梯度来:Hands-on · wire your first line, up the trust gradient:
01
挑你每周复制最多的那个系统Pick the system you copy from most
工单、报错监控或数据库,选一个。有顺手 CLI 的先考虑 CLI;没有,claude mcp add 接上,/mcp 确认连通。Tracker, error monitor, or database — pick one. With a good CLI, consider the CLI first; otherwise claude mcp add it and confirm in /mcp.
02
只读用一周,再谈写Run read-only for a week before any writes
让它查、让它读,观察它把数据用得对不对;一周后再决定要不要放开写动作,放开的每一个都配上弹窗。Let it query and read; watch whether it uses the data correctly. Decide on writes a week later — and give every write you enable its own prompt.
03
值得全队的,升到 project 层Promote what the team needs to project scope
把这条线用 --scope project 写进 .mcp.json 提交 —— 每个队友 clone 即得,首次使用时各自批准。Re-add it with --scope project so .mcp.json carries it — every teammate gets it on clone and approves it themselves on first use.
上下文不该靠你搬运,
该自己长进来.
Context shouldn't be hauled by you —
it should grow in on its own.
Aklman Library
— 讨论Discussion
讨论Discussion.
评论区初始化中…Initializing comments…
01 / 01
没有匹配结果No matches.
换个关键词,或按 Esc 回到页面Try another keyword, or press Esc to return