Get the FREE Ultimate OpenClaw Setup Guide →

phabricator

A robust Model Context Protocol (MCP) server for Phabricator API integration with comprehensive task and code review management

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio yushengauggie-phabricator-mcp-server python path/to/phabricator-mcp-server/start.py --mode http \
  --env PHABRICATOR_URL="https://example.com/api/" \
  --env PHABRICATOR_TOKEN="api-xxxxxxx"

How to use

This MCP server provides a Phabricator integration that enables AI assistants to manage tasks and perform code review actions directly against a Phabricator instance. It supports personal authentication via a user’s Phabricator API token as well as environment-based fallback tokens for shared service accounts. The server exposes 11 specialized tools across two domains: Task Management (view tasks, add comments, subscribe users) and Code Review (retrieve differential details, add comments, post inline feedback, and manage approvals). You can run the server with HTTP/SSE transport for production-grade usage or via stdio for direct MCP client integration. To use it, configure your MCP client with the target transport and supply authentication details (either personal token or environment-based token). The tools will return structured outputs including task metadata, comment threads, differential changes, and contextual code information to support AI-assisted workflows.

How to install

Prerequisites:

  • Python 3.8+
  • Access to a Phabricator instance with Conduit API enabled
  • A Phabricator API token (personal or via environment fallback)
  1. Clone the repository and navigate to the project root

    git clone https://github.com/YushengAuggie/phabricator-mcp-server.git cd phabricator-mcp-server

  2. Create and activate a Python virtual environment

    python3 -m venv venv source venv/bin/activate # Unix/macOS

    Windows: venv\Scripts\activate

  3. Install the package in editable mode (requirements are defined in setup.py / pyproject)

    pip install -e .

  4. Prepare authentication configuration (example using environment variables or a .env file)

    Environment variable approach (preferred for runtime environments)

    export PHABRICATOR_TOKEN=api-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx export PHABRICATOR_URL=https://your-phabricator-instance.com/api/

    Optional: create a .env fallback in the server directory

    PHABRICATOR_TOKEN=api-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

    PHABRICATOR_URL=https://your-phabricator-instance.com/api/

  5. Start the HTTP server (default port 8932) following the quickstart in the README

    python start.py --mode http

  6. (Alternative) Start the stdio server for direct MCP client integration

    python start.py --mode stdio

  7. Verify the server is reachable (for HTTP/SSE):

    curl http://localhost:8932/sse

Additional notes

Tips and caveats:

  • Personal tokens will attribute actions (comments, reviews) to your user by default; environment tokens use the service account name.
  • The server supports both HTTP/SSE transport and stdio transport; choose based on your deployment and client needs.
  • If authentication fails, double-check PHABRICATOR_TOKEN and PHABRICATOR_URL values. The server can be started with debugging enabled to surface environment-related issues.
  • For secure deployments, prefer environment-based tokens in a managed runtime (e.g., container or orchestrator) and avoid committing tokens to code or repos.
  • The MCP client configuration can specify per-tool authentication preferences where supported (e.g., some tools may accept an api_token parameter directly).
  • If you need to adjust the server port, set MCP_SERVER_PORT in the environment or .env fallback as documented in the README.
  • When using the HTTP/SSE transport, the server listens by default on http://localhost:8932; ensure your firewall rules allow traffic on that port in production.
  • For troubleshooting, test tokens directly against Phabricator’s API (e.g., user.whoami) to verify permissions before enabling in MCP.

Related MCP Servers

Sponsor this space

Reach thousands of developers