@freelancercom/phabricator-mcp

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

MCP server for Phabricator Conduit API - manage tasks, code reviews, repositories, and more

原始使用文档
文档目录34 节
  1. Star History
  2. Installation
  3. Claude Code (CLI)
  4. Codex (OpenAI CLI)
  5. opencode
  6. VS Code with Claude Extension
  7. Cursor
  8. GitHub Copilot (VS Code)
  9. Upgrading
  10. Migrating from github:freelancer/phabricator-mcp
  11. Configuration
  12. Recommended: Allow Read-Only Tool Permissions
  13. Available Tools
  14. Task Management (Maniphest)
  15. Code Reviews (Differential)
  16. Repositories (Diffusion)
  17. Users
  18. Projects
  19. Pastes
  20. Wiki (Phriction)
  21. Blogs (Phame)
  22. Transactions
  23. Files
  24. Builds (Harbormaster)
  25. Code Ownership (Owners)
  26. Activity Feed
  27. Chat (Conpherence)
  28. Audits
  29. PHID Utilities
  30. Server
  31. Usage
  32. Development
  33. Architecture
  34. License

phabricator-mcp

An MCP (Model Context Protocol) server that wraps Phabricator's Conduit API, enabling any MCP client to interact with Phabricator tasks, code reviews, repositories, and more.

Star History

Star History Chart

Installation

Claude Code (CLI)

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

Or with environment variables (if not using ~/.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

The --scope user flag installs the server globally, making it available in all projects.

Codex (OpenAI CLI)

Add to your Codex config (~/.codex/config.json):

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

opencode

Add to your opencode config (~/.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"
        }
      }
    }
  }
}

VS Code with Claude Extension

Add to your VS Code settings.json:

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

Cursor

Add to your Cursor MCP config (~/.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 Copilot (VS Code)

Add to your VS Code 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"
      }
    }
  }
}

Upgrading

The default install uses @freelancercom/phabricator-mcp@latest, which tells npx to check for updates on each run. No action needed.

If you pinned a specific version (e.g. @freelancercom/[email protected]) or omitted the version suffix, npx caches the package and won't pick up new versions. To upgrade:

npx clear-npx-cache

Then restart your MCP client.

Migrating from github:freelancer/phabricator-mcp

If you previously installed using the GitHub URL, update your config to use the npm package instead:

# Remove old server
claude mcp remove phabricator -s user

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

For JSON configs, replace ["github:freelancer/phabricator-mcp"] with ["@freelancercom/phabricator-mcp@latest"] in your args.

Configuration

The server automatically reads configuration from ~/.arcrc (created by Arcanist). No additional configuration is needed if you've already set up arc.

Alternatively, set environment variables (which take precedence over .arcrc):

  • PHABRICATOR_URL - Phabricator instance URL
  • PHABRICATOR_API_TOKEN - Conduit API token

You can get an API token from your Phabricator instance at: Settings > Conduit API Tokens

By default, Claude Code will prompt you for permission each time a Phabricator tool is called. It's recommended to allowlist the read-only tools so they run without prompts, while keeping write operations (create, edit, comment) behind a confirmation step.

Add to your ~/.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"
    ]
  }
}

To allowlist all tools including write operations, use "mcp__phabricator__*" instead.

Available Tools

The server hides tools that Phabricator cannot serve, such as the Conpherence tools when Conpherence is not installed. It learns which Conduit methods the instance offers from conduit.query and caches the list in ~/.cache/phabricator-mcp/, so later starts don't wait for Phabricator. Each start refreshes the cache in the background, and if the list has changed, for example after an upgrade, the server tells the client its tool list changed. On the first start the server waits up to 5 seconds for the list; if it gets no answer, every tool is listed.

Task Management (Maniphest)

ToolDescription
phabricator_task_searchSearch tasks with filters (status, assignee, project, etc.)
phabricator_task_createCreate a new task
phabricator_task_editEdit an existing task, including its due date
phabricator_task_add_commentAdd a comment to a task
phabricator_task_status_searchList all available task statuses on the instance
phabricator_task_priority_searchList all available task priorities on the instance

phabricator_task_edit's dueDate sets the Deadline field of Freelancer's Phabricator extension (maniphest:deadline in phabricator_task_search): a YYYY-MM-DD date with the full year, read as the start of that day in your Phabricator timezone; null removes it. An epoch is also accepted, but only to copy one back from maniphest:deadline.epoch: a computed one is easily a day out in another timezone. A Phabricator without that field, or with a version of the extension that cannot set it through Conduit, refuses the whole edit (has invalid type "maniphest:deadline") and changes nothing.

Code Reviews (Differential)

ToolDescription
phabricator_revision_searchSearch code review revisions
phabricator_revision_editEdit a revision (accept, accept for chosen reviewers only, reject, abandon, add reviewers, comment, etc.)
phabricator_revision_inline_commentCreate a draft inline comment on a line or character range, optionally with a suggested edit, or a threaded reply to a published one
phabricator_revision_inline_searchList a revision's inline comments with side, range, suggested edit and Done state
phabricator_revision_inline_publishPublish your draft inline comments as one review, like "Submit" in the web UI
phabricator_revision_inline_doneCheck or uncheck "Done" on an inline comment
phabricator_revision_inline_editReplace the text and suggested edit of your draft inline comment
phabricator_revision_inline_deleteDelete your draft inline comment
phabricator_diff_rawGet the raw diff/patch content for a diff by ID
phabricator_diff_searchSearch diffs (code change snapshots within a revision)
phabricator_revision_pathsGet the list of changed file paths for a revision

The phabricator_revision_inline_* tools call the differential.inline.* Conduit methods, which stock Phabricator does not ship. Without them, phabricator_revision_inline_comment still creates plain line comments through differential.createinline, but those drafts cannot be published through Conduit. Replies (replyToInlineID) need a version of the extension that supports them; an older one refuses the call (does not define these parameters: 'replyToInlineID') and creates nothing.

phabricator_revision_edit's acceptAs accepts on behalf of only the reviewers listed, as the web UI's "Accept as" checkboxes do: ["self"] accepts for you alone and never for a group you belong to, and project or package PHIDs add those groups. action: "accept" accepts for every group you belong to; the two cannot be combined. acceptAs needs Freelancer's Phabricator extension (the accept.as transaction); a Phabricator without it refuses the whole edit (has invalid type "accept.as") and changes nothing.

Repositories (Diffusion)

ToolDescription
phabricator_repository_searchSearch repositories
phabricator_commit_searchSearch commits
phabricator_repository_browseBrowse a repository directory tree
phabricator_repository_file_contentRead a file's text from a repository, whole or by line range
phabricator_branch_searchList branches in a repository
phabricator_tag_searchList tags in a repository
phabricator_repository_file_historyGet commit history for a file path
phabricator_repository_code_searchSearch (grep) file contents within a repository
phabricator_repository_editCreate or edit a Diffusion repository

Users

ToolDescription
phabricator_user_whoamiGet current authenticated user
phabricator_user_searchSearch users

Projects

ToolDescription
phabricator_project_searchSearch projects
phabricator_project_editCreate or edit a project
phabricator_column_searchSearch workboard columns

Pastes

ToolDescription
phabricator_paste_searchSearch pastes
phabricator_paste_createCreate a paste
phabricator_paste_editEdit an existing paste

Wiki (Phriction)

ToolDescription
phabricator_document_searchSearch wiki documents
phabricator_document_createCreate a new wiki document
phabricator_document_editEdit a wiki document title or content
phabricator_document_add_commentAdd a comment to a wiki document

Blogs (Phame)

ToolDescription
phabricator_blog_searchSearch Phame blogs
phabricator_blog_editCreate or edit a Phame blog
phabricator_blog_post_searchSearch blog posts
phabricator_blog_post_createCreate a new blog post
phabricator_blog_post_editEdit an existing blog post
phabricator_blog_post_add_commentAdd a comment to a blog post

Transactions

ToolDescription
phabricator_transaction_searchSearch transactions (comments, status changes, etc.) on any object
phabricator_transaction_comment_editReplace the text of your published comment on any object

phabricator_transaction_comment_edit calls the transaction.comment.edit Conduit method, which stock Phabricator does not ship; the server hides the tool on an instance without it.

Files

ToolDescription
phabricator_file_uploadUpload a file and get an ID for embedding in descriptions/comments via {F<id>}
phabricator_file_searchSearch for files
phabricator_file_infoGet file metadata (name, size, MIME type, URI)

Builds (Harbormaster)

ToolDescription
phabricator_buildable_searchSearch buildables (revisions/commits with builds)
phabricator_build_searchSearch builds (CI/build results)
phabricator_build_target_searchSearch build targets (individual build steps)
phabricator_build_log_searchSearch build logs (output from build steps)
phabricator_build_commandReport build status to Harbormaster (pass, fail, work)
phabricator_build_plan_searchSearch build plans (CI pipeline configurations)

Code Ownership (Owners)

ToolDescription
phabricator_owners_searchSearch code ownership packages

Activity Feed

ToolDescription
phabricator_feed_queryQuery the activity feed (recent task updates, revision changes, commits, etc.)

Chat (Conpherence)

ToolDescription
phabricator_conpherence_createCreate a new chat room/thread, with you as a participant
phabricator_conpherence_editEdit a chat room (rename, manage participants)
phabricator_conpherence_readRead messages from a chat thread
phabricator_conpherence_sendSend a message to a chat thread

Audits

ToolDescription
phabricator_audit_querySearch commit audit requests

PHID Utilities

ToolDescription
phabricator_phid_lookupLook up PHIDs by name (e.g., "T123", "@username")
phabricator_phid_queryGet details about PHIDs

Server

ToolDescription
phabricator_versionGet the version of the running phabricator-mcp server

Usage

Once connected, just ask your AI assistant to perform Phabricator tasks in natural language:

Tasks

  • "Show my assigned tasks"
  • "Create a task titled 'Fix login bug' in project Backend"
  • "Add a comment to T12345 saying the fix is ready for review"
  • "Close task T12345"
  • "What custom fields are available for incident tasks?"
  • "Set the start date and root cause category on T12345"
  • "Set the due date of T12345 to 20 November 2026"
  • "Make T456 a subtask of T123"
  • "Upload this screenshot and add it to the description of T789"

Code Reviews

  • "Show my open diffs"
  • "What's the status of D6789?"
  • "Review the code changes in D6789"
  • "Add @alice as a reviewer to D6789"
  • "Accept D6789"
  • "Accept D6789 for myself only, not for my team"
  • "Leave an inline comment on line 42 of src/index.ts in D6789"
  • "Suggest an edit for lines 10-12 of src/config.ts in D6789, then publish my review"
  • "Reword my draft inline comment on src/config.ts in D6789, and delete the one on line 12"
  • "Address the unresolved inline comments on D6789"
  • "Reply to the inline comments on D6789 that ask me a question, then publish"

Repositories & Builds

  • "Show me the contents of src/config.ts in repo Backend"
  • "Browse the /src directory in the main repo"
  • "Is the build passing on D6789?"
  • "Show me the build logs for D6789"
  • "Who owns the code in /src/auth/?"

Search & Lookup

  • "Find user john.doe"
  • "Search for projects with 'backend' in the name"
  • "Search commits by author alice"
  • "Look up T123 and D456"
  • "Show me the comments on D6789"
  • "Fix the typo in my last comment on T12345"

Wiki & Pastes

  • "Find wiki pages about deployment"
  • "Create a paste with this error log"

Blogs

  • "Search for blog posts about release notes"
  • "Create a new draft blog post titled 'Q1 Update' on the engineering blog"
  • "Publish blog post J42"
  • "Add a comment to blog post J15"

The appropriate tools are called automatically based on your request.

Development

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

See CONTRIBUTING.md for how to check a change against a real Phabricator before opening a pull request.

Architecture

  • src/index.ts - Entry point, MCP server with stdio transport
  • src/config.ts - Config loader (reads ~/.arcrc or env vars)
  • src/client/conduit.ts - Phabricator Conduit API client
  • src/tools/*.ts - Tool implementations per Phabricator application

License

MIT

版本与发布记录

@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 是什么?

MCP server for Phabricator Conduit API - manage tasks, code reviews, repositories, and more

如何安装 @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 和提交记录判断。