@freelancercom/phabricator-mcp

中文文档
2.6.0发布于 2026/11/13MITTypeScriptES Module构建来源已验证近 30 天下载 2570

Phabricator Conduit API 的 MCP 服务器 - 管理任务、代码审查、寄存器等

中文使用文档
文档目录34 节
  1. 恒星历史
  2. 安装
  3. 克劳德代码( CLI)
  4. 代码( OpenAI CLI)
  5. 打开代码
  6. 带有 Claude 扩展的 VS 代码
  7. 光标
  8. GitHub 副驾驶( VS 代码)
  9. 升级
  10. 从 github:freelancer/phabricator-mcp
  11. 配置
  12. 建议: 允许只读工具权限
  13. 可用工具
  14. 任务管理( 管理器)
  15. 代码审查( 差异)
  16. 仓库( 分散)
  17. 用户
  18. 项目
  19. 粘贴
  20. 维基 (字典)
  21. 博客 (页)
  22. 交易
  23. 文件
  24. 建筑( Harbormaster)
  25. 代码所有权( Owners)
  26. 活动种子
  27. 聊天( 连线)
  28. 审计
  29. PHID 公用事业
  30. 服务器
  31. 使用量
  32. 发展
  33. 建筑
  34. 许可证

发泡器- mcp

一个 MCP(示范背景议定书) 将 Phabricator 的 Conduit API 包裹起来的服务器,使 MCP 客户端能够与 Phabricator 任务,代码审查,寄存器等交互.

恒星历史

Star History Chart

安装

克劳德代码( CLI)

claude mcp add --scope user phabricator -- npx @freelancercom/phabricator-mcp@latest

或环境变量(如果不使用 ~/.arcrc:

claude mcp add --scope user phabricator \
  -e PHABRICATOR_URL=https://phabricator.example.com \
  -e PHABRICATOR_API_TOKEN=api-xxxxx \
  -- npx @freelancercom/phabricator-mcp@latest

这个 --scope user 旗帜在全球安装服务器,使其在所有项目中都可以使用.

代码( OpenAI CLI)

添加到您的 Codex 配置( T)~/.codex/config.json:

{
  "mcpServers": {
    "phabricator": {
      "command": "npx",
      "args": ["@freelancercom/phabricator-mcp@latest"],
      "env": {
        "PHABRICATOR_URL": "https://phabricator.example.com",
        "PHABRICATOR_API_TOKEN": "api-xxxxxxxxxxxxx"
      }
    }
  }
}

打开代码

添加到您的打开代码配置( N)~/.config/opencode/config.json:

{
  "mcp": {
    "servers": {
      "phabricator": {
        "command": "npx",
        "args": ["@freelancercom/phabricator-mcp@latest"],
        "env": {
          "PHABRICATOR_URL": "https://phabricator.example.com",
          "PHABRICATOR_API_TOKEN": "api-xxxxxxxxxxxxx"
        }
      }
    }
  }
}

带有 Claude 扩展的 VS 代码

添加到您的 VS 代码 settings.json数字 :

{
  "claude.mcpServers": {
    "phabricator": {
      "command": "npx",
      "args": ["@freelancercom/phabricator-mcp@latest"],
      "env": {
        "PHABRICATOR_URL": "https://phabricator.example.com",
        "PHABRICATOR_API_TOKEN": "api-xxxxxxxxxxxxx"
      }
    }
  }
}

光标

添加到您的光标 MCP 配置( T)~/.cursor/mcp.json:

{
  "mcpServers": {
    "phabricator": {
      "command": "npx",
      "args": ["@freelancercom/phabricator-mcp@latest"],
      "env": {
        "PHABRICATOR_URL": "https://phabricator.example.com",
        "PHABRICATOR_API_TOKEN": "api-xxxxxxxxxxxxx"
      }
    }
  }
}

GitHub 副驾驶( VS 代码)

添加到您的 VS 代码 settings.json数字 :

{
  "github.copilot.chat.mcp.servers": {
    "phabricator": {
      "command": "npx",
      "args": ["@freelancercom/phabricator-mcp@latest"],
      "env": {
        "PHABRICATOR_URL": "https://phabricator.example.com",
        "PHABRICATOR_API_TOKEN": "api-xxxxxxxxxxxxx"
      }
    }
  }
}

升级

默认安装使用 @freelancercom/phabricator-mcp@latest,它告诉 npx 检查每次运行的更新。 无需采取行动.

如果按下特定版本(例如:. @freelancercom/[email protected])或省略了版本后缀,npx缓存了软件包而不会取出新版本. 要升级 :

npx clear-npx-cache

然后重新启动您的 MCP 客户端 .

从 github:freelancer/phabricator-mcp

如果您先前使用 GitHub URL 安装, 请更新您的配置以使用 npm 软件包 :

# Remove old server
claude mcp remove phabricator -s user

# Add new one
claude mcp add --scope user phabricator -- npx @freelancercom/phabricator-mcp@latest

JSON配置,替换 ["github:freelancer/phabricator-mcp"] 与 ["@freelancercom/phabricator-mcp@latest"] 在你的词.

配置

服务器自动读取配置 ~/.arcrc (创建者: 建筑学) (中文(简体) ). 已经设置的配置不需要额外的配置 arc。 。 。 .

或者设置环境变量(优先于 .arcrc:

  • PHABRICATOR_URL - Phabricator 实例 URL
  • PHABRICATOR_API_TOKEN - 管道API 信号

您可以从 Phabricator 实例中获取 API 令牌 : 设置 > 管道 API 键

默认情况下,Claude Code每次调用 Phabricator 工具时都会提示您许可. 建议允许将只读工具列表,使其运行而不提示,同时将写入操作(创建,编辑,评论)保存在一个确认步骤后.

添加到您的 ~/.claude/settings.json数字 :

{
  "permissions": {
    "allow": [
      "mcp__phabricator__phabricator_task_search",
      "mcp__phabricator__phabricator_task_status_search",
      "mcp__phabricator__phabricator_task_priority_search",
      "mcp__phabricator__phabricator_revision_search",
      "mcp__phabricator__phabricator_diff_search",
      "mcp__phabricator__phabricator_diff_raw",
      "mcp__phabricator__phabricator_revision_paths",
      "mcp__phabricator__phabricator_revision_inline_search",
      "mcp__phabricator__phabricator_repository_search",
      "mcp__phabricator__phabricator_commit_search",
      "mcp__phabricator__phabricator_repository_browse",
      "mcp__phabricator__phabricator_repository_file_content",
      "mcp__phabricator__phabricator_branch_search",
      "mcp__phabricator__phabricator_tag_search",
      "mcp__phabricator__phabricator_repository_file_history",
      "mcp__phabricator__phabricator_repository_code_search",
      "mcp__phabricator__phabricator_user_whoami",
      "mcp__phabricator__phabricator_user_search",
      "mcp__phabricator__phabricator_project_search",
      "mcp__phabricator__phabricator_column_search",
      "mcp__phabricator__phabricator_paste_search",
      "mcp__phabricator__phabricator_document_search",
      "mcp__phabricator__phabricator_blog_search",
      "mcp__phabricator__phabricator_blog_post_search",
      "mcp__phabricator__phabricator_file_search",
      "mcp__phabricator__phabricator_file_info",
      "mcp__phabricator__phabricator_buildable_search",
      "mcp__phabricator__phabricator_build_search",
      "mcp__phabricator__phabricator_build_target_search",
      "mcp__phabricator__phabricator_build_log_search",
      "mcp__phabricator__phabricator_build_plan_search",
      "mcp__phabricator__phabricator_owners_search",
      "mcp__phabricator__phabricator_feed_query",
      "mcp__phabricator__phabricator_conpherence_read",
      "mcp__phabricator__phabricator_audit_query",
      "mcp__phabricator__phabricator_phid_lookup",
      "mcp__phabricator__phabricator_phid_query",
      "mcp__phabricator__phabricator_transaction_search",
      "mcp__phabricator__phabricator_version"
    ]
  }
}

允许列表所有工具,包括写操作,使用 "mcp__phabricator__*" 换句话说.

可用工具

服务器会隐藏Phabricator无法服务的工具,例如Conference没有安装时的Conference工具. 它学会了Conduit从哪一种模式提供实例 conduit.query 并缓存列表 ~/.cache/phabricator-mcp/,所以以后开始 不要等Phabricator。 每个开始刷新背景中的缓存,如果列表有变化,例如升级后,服务器会告诉客户端其工具列表有变化. 在第一次启动时,服务器最多等待5秒的列表;如果得不到答案,每个工具都会被列出.

任务管理( 管理器)

工具说明
phabricator_task_search带有过滤器的搜索任务( 状态、 受让人、 项目等)
phabricator_task_create创建新任务
phabricator_task_edit编辑现有任务,包括其到期日
phabricator_task_add_comment在任务中添加注释
phabricator_task_status_search列出实例上所有可用的任务状态
phabricator_task_priority_search列出实例中所有可用的任务优先级

phabricator_task_edit是因为 dueDate 设置 Freelancer 的 Phabricator 扩展的截止日期域( )maniphest:deadline 内 phabricator_task_search(单位:千美元) YYYY-MM-DD 与全年相接的日期,在您的 Phabricator 时区中读作当天的开始; null 将取去. 也接受一个时代,但只复制一个从 maniphest:deadline.epoch:计算出来的一天很容易在另一个时区被淘汰. 一个没有这个字段的Phabricator,或者带有无法通过Conduit设置的扩展版本,拒绝整个编辑(Phabricator)has invalid type "maniphest:deadline"),而改变无.

代码审查( 差异)

工具说明
phabricator_revision_search搜索代码审查修订
phabricator_revision_edit编辑修订(接受、仅接受选定的审查者、拒绝、放弃、增加审查者、评论等)
phabricator_revision_inline_comment创建一个线条或字符范围的内置注释草案,可选择使用建议编辑,或对已公布的线条回复
phabricator_revision_inline_search列出修改后与侧面、 范围、 建议编辑和 Done 状态的内置评论
phabricator_revision_inline_publish将您的内置评论草稿作为一次评论发布, 如“ 提交” 在网络 UI 中
phabricator_revision_inline_done选中或取消选中内置注释中的“ 完成 ”
phabricator_revision_inline_edit替换文本并建议编辑您的内置注释草稿
phabricator_revision_inline_delete删除您的内置注释草稿
phabricator_diff_raw通过 ID 获取 diff/ patch 的原始 diff 内容
phabricator_diff_search搜索 diffs( 修订版中的代码更改快照)
phabricator_revision_paths获取修改后的文件路径列表

这个 phabricator_revision_inline_* 工具调用 differential.inline.* 管道方法,Phabricator不载运。 没有他们, phabricator_revision_inline_comment 仍然通过创建平线注释 differential.createinline,但这些草案不能通过Conduit发布. 答复(replyToInlineID)需要一个支持他们的扩展版本;一个年长的人拒绝呼叫(does not define these parameters: 'replyToInlineID'),并创造出一无所有.

phabricator_revision_edit是因为 acceptAs 仅代表审查者接受所列内容,如网页UI的"接受为"复选框所示: ["self"] 为您单独接受, 绝不为您所属的组, 而投影或包 PHIDs 添加这些组 . action: "accept" 为所属的每个群体接受;两者不能合并. acceptAs 需要 Freelancer 的 Phabricator 扩展名 accept.as 交易); 一个Phabricator, 不拒绝整个编辑( P)has invalid type "accept.as"),而改变无.

仓库( 分散)

工具说明
phabricator_repository_search搜索仓库
phabricator_commit_search搜索承诺
phabricator_repository_browse浏览仓库目录树
phabricator_repository_file_content从仓库读取文件的文本, 全部或按行范围读取
phabricator_branch_search在仓库中列出分支
phabricator_tag_search在仓库中列出标签
phabricator_repository_file_history获取文件路径的历史
phabricator_repository_code_search在仓库中搜索( grep) 文件内容
phabricator_repository_edit创建或编辑扩散寄存器

用户

工具说明
phabricator_user_whoami获取当前认证用户
phabricator_user_search搜索用户

项目

工具说明
phabricator_project_search搜索项目
phabricator_project_edit创建或编辑工程
phabricator_column_search搜索工作板列

粘贴

工具说明
phabricator_paste_search搜索粘贴
phabricator_paste_create创建粘贴
phabricator_paste_edit编辑已存在的粘贴

维基 (字典)

工具说明
phabricator_document_search搜索维基文档
phabricator_document_create创建新维基文档
phabricator_document_edit编辑维基文档标题或内容
phabricator_document_add_comment在维基文档中添加注释

博客 (页)

工具说明
phabricator_blog_search搜索 Phame 博客
phabricator_blog_edit创建或编辑 Phame 博客
phabricator_blog_post_search搜索博客文章
phabricator_blog_post_create创建新博客帖
phabricator_blog_post_edit编辑已存在的博客文章
phabricator_blog_post_add_comment在博客文章中添加注释

交易

工具说明
phabricator_transaction_search在任何对象上搜索交易(评论、状态变化等)
phabricator_transaction_comment_edit替换您关于任何对象的已发表评论的文本

phabricator_transaction_comment_edit 呼唤 transaction.comment.edit Conduit 方法, 存储 Phabricator 不发运; 服务器将工具隐藏在一个实例上而不发运它 .

文件

工具说明
phabricator_file_upload上传一个文件,并获取一个ID,以便通过 {F<id>}
phabricator_file_search搜索文件
phabricator_file_info获取文件元数据( 名称、 大小、 MIME 类型、 URI)

建筑( Harbormaster)

工具说明
phabricator_buildable_search搜索可建设备(有建筑物的修订版/承诺)
phabricator_build_search搜索构建(CI/构建结果)
phabricator_build_target_search搜索构建目标(个人构建步骤)
phabricator_build_log_search搜索构建日志( 构建步骤输出)
phabricator_build_command向港务长报告建设状况(通过、失败、工作)
phabricator_build_plan_search搜索构建计划(CI管道配置)

代码所有权( Owners)

工具说明
phabricator_owners_search搜索代码所有权软件包

活动种子

工具说明
phabricator_feed_query查询活动种子(最近的任务更新、修改、承诺等)

聊天( 连线)

工具说明
phabricator_conpherence_create创建一个新的聊天室/线索,由您作为参与者
phabricator_conpherence_edit编辑聊天室( 重命名、 管理参与者)
phabricator_conpherence_read从聊天线索读取信件
phabricator_conpherence_send发送消息到聊天线索

审计

工具说明
phabricator_audit_query搜索承诺审计请求

PHID 公用事业

工具说明
phabricator_phid_lookup按名称查找 PHID( 如“ T123 ” 、 “ @ 用户名 ” )
phabricator_phid_query获取 PHID 的详细信息

服务器

工具说明
phabricator_version获取运行中的 phabricator- mcp 服务器的版本

使用量

一旦连接起来, 请您的AI助手用自然语言执行 Phabricator 任务 :

任务

  • "展示我的任务"
  • 在工程后端创建名为“ Fix 登录错误” 的任务
  • "增加给T12345的评语,称"修补工作已经做好审查准备"
  • "结束任务 T12345"
  • "有什么定制的字段可以用于事件任务?"
  • "在T12345上设置起步日期和根源类别"
  • "确定到期日为T12345至2026年11月20日"
  • "让T456成为T123的子任务"
  • "装入这个截图 并添加到T789的描述"

代码审查

  • "露出我的露天潜水艇"
  • "D6789状态如何"
  • "审查D6789的代码变化"
  • "Add @alice 作为D6789的审查员"
  • "接受D6789" (中文(简体) )
  • "接受D6789只为我自己,不为我的团队"
  • "对D6789中src/index.ts 第42行的内在评论"
  • "为D6789的src/config.ts 第10-12行建议编辑,然后发表我的评论"
  • " 重写我对D6789中的src/config.ts的内在评论稿,并删除12行的"
  • "解决D6789未解决的内在评论"
  • 回答D6789的内在评论 问我一个问题,然后发表

仓库和构建

  • "在后端显示src/config.ts的内容"
  • "在主回放中浏览/sc目录"
  • "这栋建筑是经过D6789吗?"
  • "给我看D6789的建筑日志"
  • "谁拥有/src/auth/中的代码"

搜索( L)

  • "找到用户约翰多"
  • 搜索名下有后端的项目
  • "搜捕作者的虱子"
  • "寻找T123和D456"
  • "给我看关于D6789的评论"
  • "在T12345上我最后的评语中解答"

维基粘贴( P)

  • "寻找关于部署的维基页面"
  • "用这个错误日志创建粘贴"

博客

  • 搜索博客文章
  • "在工程博客上创建名为"Q1更新"的新博客草案"
  • J42的博客
  • "添加评论到J15的博客"

根据您的请求自动调用合适的工具 .

发展

git clone https://github.com/freelancer/phabricator-mcp.git
cd phabricator-mcp
npm install
npm run build
npm test
npm run dev  # watch mode

见 捐款额 在打开拉动请求前, 如何对照真实的 Phabricator 检查更改 .

建筑

  • src/index.ts - 入境点,带有Stdio运输的MCP服务器
  • src/config.ts - 配置装载器(阅读) ~/.arcrc (原始内容存档于2018-10-21) (中文(简体) )
  • src/client/conduit.ts - Phabricator Conduit API 客户端
  • src/tools/*.ts - 每个Phabricator应用程序的工具实施

许可证

麻省理工学院

版本与发布记录

@freelancercom/phabricator-mcp 共发布 32 个版本,首次发布于 2026/02/16;过去 12 个月发布了 32 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
2.6.0latest2026/11/132 天前
2.5.02026/11/096 天前
2.4.02026/11/069 天前
2.3.02026/11/0411 天前
2.2.02026/10/2620 天前
2.1.02026/10/161 个月前

关于 @freelancercom/phabricator-mcp 的常见问题

@freelancercom/phabricator-mcp 是什么?

Phabricator Conduit API 的 MCP 服务器 - 管理任务、代码审查、寄存器等

如何安装 @freelancercom/phabricator-mcp?

在项目目录运行 npm install @freelancercom/phabricator-mcp,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 phabricator-mcp,可以用 npx phabricator-mcp 直接运行。

@freelancercom/phabricator-mcp 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@freelancercom/phabricator-mcp 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@freelancercom/phabricator-mcp 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=18.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@freelancercom/phabricator-mcp 可以商用吗?

@freelancercom/phabricator-mcp 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@freelancercom/phabricator-mcp 的下载量有多少?

根据 npm 官方下载统计,@freelancercom/phabricator-mcp 在 2026/10/16 – 2026/11/14 这 30 天内被下载 2,570 次,日均约 86 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@freelancercom/phabricator-mcp 还在维护吗?

最新版本 2.6.0 发布于 2026/11/13(2 天前);至今共发布 32 个版本,其中过去 12 个月发布了 32 个;首次发布于 2026/02/16。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。