Postman 自动给 Claude Code、Codex、Cursor 装插件怎么查和卸载:本机实测 5 处痕迹(Postman 12.34)

导读:这两天 Hacker News 第一条是 Postman 桌面版"悄悄"给 AI 编程工具装插件。我翻了自己这台 Mac,发现 10 月 29 日 Postman 升级时,Claude Code、Codex、Cursor 三个工具都被装上了 Postman 插件,另外还多了一个 178MB 的 Postman CLI。这篇把本机找到的 5 处痕迹、一条只读自查脚本和每个工具的卸载命令整理出来。适用版本:Postman 桌面版 12.34.4、Claude Code 2.1.299、Codex CLI 0.151.0,macOS 15。


一、先说清楚:到底发生了什么

用白话讲:你打开或升级 Postman 桌面版,它会顺手检查电脑上装了哪些 AI 编程工具,然后把自己的插件装进去,事先没有弹窗问你。

这个"插件"里有三样东西:

组成 是什么 对你的影响
技能(Skill) 17 份 Postman 操作说明,AI 需要时加载 每个会话的提示词变长
启动钩子(SessionStart hook) 每次开新会话时自动执行的一段脚本 往会话里塞一段话:"做任何 API 相关的事之前先加载 Postman 的技能"
远程 MCP 服务 指向 https://mcp.postman.com/mcp 的工具连接 登录授权后,AI 能直接读写你的 Postman 工作区

不管它会怎样?短期不会出错,但有两个实际影响:

  • AI 的行为被改了:你让 Claude Code 写个接口、补个测试,它可能先去加载 Postman 的技能、建议你用 Postman 做 Mock,这不是你装的东西,却在影响结果
  • 团队里属于"工具链被第三方改动":公司要求 AI 工具的插件、MCP 都要审批的,这一下就绕过去了

什么时候该动它:电脑上装过 Postman 桌面版、同时用 Claude Code / Codex / Cursor 的,都值得花两分钟查一下。查完觉得插件有用可以留着,没用就卸。


二、事情经过

  • 2026-10-25,有用户在 Postman 的 GitHub 仓库提了 issue #14370,标题直接写了 SEVERE:桌面版自动给 Codex、Claude 装插件,安装器还尝试把自己的启动钩子标记为可信
  • 11-03,这件事上了 Hacker News 首页第一,帖子 截至 11-04 早上有 988 分、328 条评论
  • 11-03 晚,Postman 员工在 issue 里回复:把 CLI 和 AI 插件跟桌面版捆在一起,是因为很多用户自己装不好;下载页和更新流程里有说明;之后会把老用户的选择做得更明确,并检查 issue 里提到的钩子信任和会话启动行为

issue 作者给出的证据是 Postman 自己的日志、Codex 的配置文件和安装器源码。我对照着在自己机器上查了一遍,结果基本一致,下面是细节。


三、一条脚本先查本机

下面这段脚本只读不改,在 macOS 上直接跑。它查 5 个位置:Postman 日志、Claude Code、Codex、Cursor、Postman CLI。

bash 复制代码
#!/bin/bash
# 只读检查:Postman 有没有给本机的 AI 编程工具装插件(macOS)
LOG="$HOME/Library/Application Support/Postman/logs/main.log"

echo "== 1. Postman 日志里的自动安装记录"
if [ -f "$LOG" ]; then
  grep -h "autoInstall.plugin\|PostmanAgentPluginService~install" "$LOG" | cut -c1-200
else
  echo "没找到 $LOG"
fi

echo "== 2. Claude Code"
command -v claude >/dev/null && claude plugin list 2>/dev/null | grep -A3 "postman@" || echo "未发现"

echo "== 3. Codex"
grep -n 'postman' "$HOME/.codex/config.toml" 2>/dev/null || echo "config.toml 里没有 postman"
grep -n 'hooks.state."postman' "$HOME/.codex/config.toml" 2>/dev/null && echo "注意:Postman 的 hook 已被标记为可信"

echo "== 4. Cursor"
ls -d "$HOME/.cursor/plugins/local/postman" 2>/dev/null || echo "未发现"

echo "== 5. Postman CLI"
ls -l "$HOME/.local/bin/postman" 2>/dev/null || echo "未发现"

我这台机器的输出(日志行截断到 200 字符,用户目录换成了 ~):

text 复制代码
== 1. Postman 日志里的自动安装记录
[23285][1793237204030][main][info]["Main: autoInstall.plugin.fresh-download finished",{"outcome":"skipped-not-fresh","platform":"darwin","exposed":false}]
[23285][1793237436624][main][info]["PostmanAgentPluginService~install: script completed",{"source":"auto-existing-upgrade","results":["claude-code:installed","codex:installed","cursor:installed"],"ins
[23285][1793237436630][main][info]["Main: autoInstall.plugin.existing-user finished",{"outcome":"installed","platform":"darwin","exposed":true,"signedIn":true,"flagTimedOut":false,"useScript":true,"in
== 2. Claude Code
  ❯ postman@claude-plugins-official
    Version: 2.0.1
    Scope: user
    Status: ✔ enabled
== 3. Codex
209:[marketplaces.postman]
211:source = "https://github.com/postmanlabs/postman-plugin.git"
252:[plugins."postman@postman"]
== 4. Cursor
~/.cursor/plugins/local/postman
== 5. Postman CLI
-rwxr-xr-x  1 aiksyuan  staff  178023856 Oct 29 09:30 ~/.local/bin/postman

5 处全中。日志第二列是毫秒时间戳,换算一下:

bash 复制代码
# 日志里的 1793237436624 是毫秒,去掉后三位再转本地时间(macOS 的 date)
date -r 1793237436 '+%F %T'
# 输出:2026-10-29 09:30:36

几个字段的意思:

字段 值 含义
source auto-existing-upgrade 老用户升级时自动装,不是我点的
results claude-code、codex、cursor 都是 installed 三个工具都装上了
fresh-download 那行 skipped-not-fresh 新下载安装走另一条分支,我是老用户所以跳过
signedIn true 当时 Postman 是登录状态

⚠️ 脚本里 Claude Code 那一步会调用 claude plugin list,只是列出,不改配置。Codex 和 Cursor 只做 grep 和 ls。


四、逐个看装了什么

4.1 Claude Code:17 个技能 + 1 个启动钩子 + 1 个 MCP

claude plugin details 能看到一个插件的组成和"每个会话固定多花多少 token":

bash 复制代码
claude plugin details postman@claude-plugins-official

输出的关键部分:

text 复制代码
Postman (postman) 2.0.1
  Source: postman@claude-plugins-official

Component inventory
  Skills (17)  ai-readiness, api-discovery, api-documentation, api-engineer, ...
  Hooks (1)  SessionStart  (harness-only --- no model context cost)
  MCP servers (1)  postman  (tool schemas resolved at runtime; not counted)

Projected token cost
  Always-on:   ~1,897 tok   added to every session

有三点值得注意:

第一,它是从官方插件市场装的。 来源是 claude-plugins-official,也就是 Anthropic 官方插件市场里本来就有的 Postman 插件,安装时间 2026-10-29T01:28:54Z(北京时间 09:28),和 Postman 日志对得上。插件本身不是恶意代码,问题出在"谁替你点了安装"。

第二,启动钩子其实会往会话里塞内容。 details 里写的是 hook "no model context cost",但这个钩子的脚本会把一段 1214 字节的说明打印出来,Claude Code 会把 SessionStart 钩子的输出加进会话上下文。我这次开 Claude Code 会话时,启动信息里就能看到这段话,开头是:

text 复制代码
You have the Postman plugin.

Before responding to any non-trivial API engineering task --- designing, implementing,
mocking, testing, monitoring, documenting, or deploying an API or Postman Flow ---
load the `postman:api-engineer` skill and follow it.

翻译过来就是"做任何不简单的 API 工作之前,先加载 Postman 的技能照着做"。对一个天天写接口的 Java 后端来说,这个范围几乎覆盖了所有日常任务。所以实际每个会话多出来的不止 1,897 token,还要加上这段话。

第三,MCP 需要你自己授权才连得上。 插件里的 MCP 配置是:

json 复制代码
{
  "mcpServers": {
    "postman": {
      "type": "http",
      "url": "https://mcp.postman.com/mcp",
      "headers": {
        "X-Source": "postman-claude-code-plugin",
        "X-Plugin-Version": "2.0.1",
        "User-Agent": "postman-claude-code-plugin/2.0.1"
      }
    }
  }
}

我的 Claude Code 会话里这个服务显示为"需要认证",没授权就不会真的连上。HN 标题里说的"共享所有 API 数据",我没有在本机找到对应证据;能确认的是:一旦你在 /mcp 里完成授权,AI 就能通过它读写你 Postman 账号下的工作区,团队里有敏感接口集合的要注意这一点。

4.2 Codex:配置文件被加了两段

~/.codex/config.toml 里多了一个插件市场和一个启用的插件:

toml 复制代码
[marketplaces.postman]
source_type = "git"
source = "https://github.com/postmanlabs/postman-plugin.git"

[plugins."postman@postman"]
enabled = true

codex plugin list 显示的是 postman@postman installed, enabled 1.2.0,版本号和 Claude Code 那边的 2.0.1 不一样。

issue 作者那边还多了一段 [hooks.state."postman@postman:..."],带 trusted_hash,意思是 Postman 的启动钩子已被标记为可信,Codex 会直接执行它。我这台机器上没有这一段 ,hooks.state 下面只有我自己项目里的钩子。所以在我这里,Codex 遇到 Postman 的钩子时还是会先问我。我也在本机缓存的安装器源码里搜了 trusted 和 approve,没搜到,issue 里引用的是另一个提交,两边安装器版本可能不同。

4.3 Cursor:多了一个本地插件目录

bash 复制代码
ls ~/.cursor/plugins/local/postman/hooks
# 输出:codex-hooks.json  copilot-hooks.json  hooks.json  session-start  session-start-context.md  session-start.cmd

同一套插件文件复制了一份到 Cursor 的本地插件目录,里面带着同样的启动钩子和 MCP 配置。

4.4 Postman CLI:一个 178MB 的二进制

bash 复制代码
~/.local/bin/postman --version
# 输出:1.82.0

日志里 autoInstall.cli.existing-user 在 09:30:19 记录了 installed,比插件早 17 秒。如果你不在 CI 里跑 Postman 集合,这个文件用不上。


五、怎么卸载

⚠️ 下面的命令都用 --help 确认过参数,但我没有在自己机器上执行卸载 ,留着现场写这篇文章。卸之前建议先把 ~/.codex/config.toml 备份一份。

Claude Code

只想让它不生效,用 disable,以后还能 enable 回来:

bash 复制代码
# 停用,不删文件
claude plugin disable postman@claude-plugins-official

确定不要了就卸载:

bash 复制代码
# 卸载;--keep-data 可以保留 ~/.claude/plugins/data/ 下的数据目录,这里不需要
claude plugin uninstall postman@claude-plugins-official

卸完用 claude plugin list 确认列表里没有 postman@ 了,再开一个新会话,启动信息里不该再出现那段 "You have the Postman plugin."。

Codex

bash 复制代码
# 从配置和缓存里删掉插件
codex plugin remove postman@postman

# 再删掉 Postman 的插件市场,否则以后还能从这里装回来
codex plugin marketplace remove postman

卸完再 grep -n postman ~/.codex/config.toml,应该没有输出。

Cursor

Cursor 这边是一个本地目录,移到废纸篓就行:

bash 复制代码
# 移到废纸篓,不直接 rm,后悔还能找回来
mv ~/.cursor/plugins/local/postman ~/.Trash/postman-cursor-plugin

Postman CLI

不用的话同样移走:

bash 复制代码
mv ~/.local/bin/postman ~/.Trash/postman-cli

一次卸干净的官方命令

插件 README 里写了一个总开关,remove 会从所有检测到的工具里卸载:

bash 复制代码
# 据插件 README,未实测;npx 会先从 npm 下载这个包
npx @postman/postman-plugin remove

Postman 员工在 issue 里也说,可以在桌面版里卸载这些组件。我没在 Postman 界面里找过这个入口,用的话自己看一下设置页。


六、卸了会不会再装回来

这一点我没法确认。我这台机器上 10-29 之后 Postman 还开过(main.log 最后修改时间是 11-01),日志里没有第二次安装记录,但那时插件本来就装着,说明不了卸载后的情况。

稳妥的做法是卸载后,下次打开 Postman 再跑一遍第三节的脚本,或者只看日志:

bash 复制代码
# 只看最近的自动安装记录,有新的 installed 就说明又装回来了
grep "autoInstall.plugin" "$HOME/Library/Application Support/Postman/logs/main.log" | tail -3

如果又装回来了,就只能等 Postman 兑现"把选择做得更明确"的承诺,或者换掉 Postman。


七、团队里怎么管

个人卸掉就完了,团队要考虑的是"下一个工具也这么干怎么办"。我的建议是这三件事:

  1. 把第三节的脚本放进新人装机清单或定期巡检,查的是"AI 工具被装了什么",不只是 Postman。把 grep 的关键字换成你们没审批过的插件名就行
  2. 定期看一眼 claude plugin list 和 codex plugin list ,列表很短,30 秒看完。看到不认识的插件,先 claude plugin details <名字> 看它带了什么钩子和 MCP
  3. 重点盯 SessionStart 钩子和远程 MCP。技能只是说明文档,钩子能执行命令、能改 AI 的行为,远程 MCP 能把数据带出去,这两类插件进来前要过一遍

Claude Code 还支持用 deniedMcpServers 等托管配置在组织层面禁用指定的 MCP 服务,具体写法以官方文档为准,我没在本机配置过。


八、速查表

想做什么 命令
看 Postman 有没有自动装过 grep "autoInstall.plugin" ~/Library/Application\ Support/Postman/logs/main.log
Claude Code 装了哪些插件 claude plugin list
一个插件带了什么、每会话多少 token claude plugin details postman@claude-plugins-official
停用 / 卸载(Claude Code) claude plugin disable ... / claude plugin uninstall ...
Codex 装了哪些插件 codex plugin list
卸载(Codex) codex plugin remove postman@postman,再 codex plugin marketplace remove postman
Codex 钩子有没有被标为可信 grep -n 'hooks.state."postman' ~/.codex/config.toml
Cursor ls ~/.cursor/plugins/local/postman
Postman CLI ls -l ~/.local/bin/postman

九、常见问题

Q:插件本身有用吗?要不要留着?

如果你团队真在用 Postman 管接口集合、跑 Mock 和监控,插件能让 AI 直接操作这些东西,可以留着,但建议先 disable,需要时再 enable。平时只用 Postman 发几个请求调试的,这个插件用不上,每个会话还多一段提示词。

Q:Windows 上怎么查?

我没有 Windows 机器测。思路一样:找 Postman 的日志目录搜 autoInstall.plugin,再用 claude plugin list、codex plugin list 看插件列表,这两条命令跨平台。

Q:要不要干脆换掉 Postman?

issue 和 HN 评论里提得最多的替代是 Bruno(开源,集合存成本地文件,可以进 Git),也有人推荐 Insomnia。我没有实测这些工具的迁移,这里只列出名字。对后端来说,接口集合放进 Git、跟代码一起评审,这一点本身就有价值。

Q:只用 Postman 网页版,没装桌面版,会受影响吗?

这次的自动安装是桌面版在本机执行的脚本,日志也在桌面版目录里。只用网页版的,按第三节的脚本跑一遍,第 1 项会显示"没找到日志",其余几项正常应该都是"未发现"。


参考链接


你电脑上跑完第三节的脚本,5 项里中了几项?Codex 那边的钩子有没有被标成可信?评论区说说你的 Postman 版本和结果,我把不同版本的情况补进文章。

觉得有用的话点个赞、收个藏,转给团队里也在用 Postman 的同事。

相关推荐
ZzT1 小时前
AI-SDLC 实践 01|用好 Claude Code/Codex 提供的六种能力
ai编程·claude
一缕82年的清风4 小时前
智能体“自适应慢思考”的算力黑洞:当 Claude 5.5 与 GPT-6.1 Sol 陷入推理自旋,为什么高并发架构必须重构“认知预算熔断与快慢推测执行”?
gpt·claude·gemini
aiks_yuan21 小时前
如何降低 Claude Code 使用费用:同一个 Java 修 bug 任务实测 6 种设置,花费从 0.69 到 0.02 美元
claude
ZzT1 天前
AI-SDLC 实践 00|让 Coding Agent 参与整个项目周期:AI-SDLC 是什么、为什么要做
ai编程·claude
jerrywus1 天前
你还在手动seo? 那你可以试试claude-seo skill
agent·claude·seo
一缕82年的清风1 天前
智能体“自主决策”的虚假繁荣:当 Claude 5.5 与 GPT-6.1 深入生产,为什么顶级架构师都在重回“确定性状态机”?
gpt·claude
重生之我在番茄自学网安拯救世界2 天前
AI开发者日报 第2期 | Anthropic零 Rust 团队靠Claude重写核心 API,CPU 降 40–50%
人工智能·网络安全·大模型·ai编程·claude
一缕82年的清风2 天前
算力平民化神话破产:当推理成本暴降 90%,为什么生产级 Agentic 架构反而更贵更脆弱了?
gpt·claude
灵感__idea2 天前
Claude Code:能干活只是初级目标,再提10倍
ai编程·claude·cursor