# Phabricator MCP

> Phabricator (Development Platform Conduit API) connects your AI agent directly to Phabricator's core services. You can search Maniphest tasks using complex filters, edit code revisions in Differential, and query repository data from Diffusion—all without leaving your IDE or chat client.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** phabricator, conduit-api, code-review, task-tracking, monorepo, devops

## Description

Phabricator Conduit API connects your AI agent straight into Phabricator's core services. You get direct access to Maniphest for managing tasks, Differential for handling code reviews, and Diffusion for inspecting repository history—all without ever leaving your IDE or chat client.

### Managing Tasks and Auditing Workflows

You can locate specific tasks by running `maniphest_search` with advanced filtering rules. If you need to see the full life cycle of a task, `maniphest_gettasktransactions` pulls every single piece of activity history into one chronological record. You'll use `user_whoami` to check your own profile details, and if you gotta look up another contributor, `user_search` finds their details on the platform.

When it comes time to move things along or fix something, you can either create a brand-new Maniphest task or update an existing one using `maniphest_edit`; this lets your agent change statuses or assign owners. It's basically complete control over the task lifecycle right from your chat client.

### Handling Code Reviews in Differential

Working with code revisions is simple. To look at old diff revisions, you run `differential_revision_search` to find relevant records. If you spot an error or a change that needs adjustment during the review process, `differential_revision_edit` lets your agent modify that specific code revision record directly.

### Inspecting Repository History with Diffusion

Diffusion gives you deep visibility into your code base. You first run `diffusion_repository_search` to list all available projects and repositories. Once you know which project you're dealing with, you can use `diffusion_commit_search` to track down specific commit IDs across those repositories.

## Tools

### differential_query
Queries historical code revisions stored in Differential (Legacy).

### differential_revision_edit
Creates or modifies a specific code revision record within Differential.

### differential_revision_search
Searches for relevant code revisions in Differential using filters.

### diffusion_commit_search
Searches for specific commit IDs across Diffusion repositories.

### diffusion_repository_search
Lists and searches available code repositories within Diffusion.

### maniphest_edit
Creates a new Maniphest task or updates an existing one (e.g., changing status or assigning an owner).

### maniphest_gettasktransactions
Retrieves the complete, chronological activity history for any given task.

### maniphest_search
Searches Maniphest tasks using advanced filtering rules and constraints.

### user_search
Finds details about other users who contribute to the platform.

### user_whoami
Gets basic profile information for the user who is currently logged into Phabricator.

## Prompt Examples

**Prompt:** 
```
Who is the currently authenticated Phabricator user?
```

**Response:** 
```
I've checked your credentials. You are currently logged in as 'dev_lead' (PHID-USER-1234567890).
```

**Prompt:** 
```
Search for all open tasks in Maniphest assigned to me.
```

**Response:** 
```
I found 3 open tasks assigned to you: T452 (Fix Auth Bug), T458 (Update Documentation), and T460 (Refactor Database). Would you like more details on any of these?
```

**Prompt:** 
```
Show me the recent history for task T101.
```

**Response:** 
```
Retrieving history for T101... The task was created by 'alice' 2 days ago, moved to 'In Progress' by 'bob' yesterday, and 'charlie' added a comment regarding the API specs 4 hours ago.
```

## Capabilities

### Search, Update, and Audit Tasks
Find specific Maniphest tasks based on complex criteria, create new tasks, update existing ones (status/owner), or retrieve a full history of any task's lifecycle.

### Manage Code Revisions
Query for code diff revisions in Differential and perform direct actions like requesting changes to the review.

### Inspect Repository History
Search across Diffusion repositories to find specific commits or list available project repositories.

### Identify Users and Contributors
Get details about the currently logged-in user or search for other people associated with tasks and code reviews.

## Use Cases

### The Stalled Feature Flag
A Project Lead notices a feature ticket (T901) hasn't moved in two weeks. They ask their agent: 'Show me the full transaction history for T901.' The agent runs `maniphest_gettasktransactions` and reports that the last activity was a comment on Friday, indicating no one has picked it up since.

### The Code Review Bottleneck
An Engineer needs to check if a dependency commit exists. They ask: 'Search for commits related to library X.' The agent runs `diffusion_commit_search` and provides the exact SHA hashes, allowing them to continue their work without needing access to the full Git UI.

### Updating Task Status Mid-Flow
A developer finishes a small bug fix. Instead of opening Phabricator and changing the status manually, they tell their agent: 'Mark T452 as ready for review.' The agent calls `maniphest_edit` and updates the task status immediately.

### Onboarding Context Check
A new team member needs to know who owns a certain module. They ask: 'Who is responsible for the Auth service?' The agent runs `user_search` to find key contributors, giving the team lead immediate names and IDs.

## Benefits

- Audit a task's full lifecycle. Instead of digging through multiple logs to see who changed what and when, use `maniphest_gettasktransactions` to get the entire history in one query.
- Keep your focus where it belongs: coding. You can update ticket status or assign ownership using `maniphest_edit` without ever leaving your IDE environment.
- Find code changes fast. Need to see if a specific commit exists? Run `diffusion_commit_search` to check the exact ID against all repositories instantly.
- Streamline reviews. Don't guess who worked on what. Use `differential_revision_search` to query and find related code revisions immediately.
- Know your user context. The `user_whoami` tool confirms exactly which account you are operating under, preventing accidental commits or status changes.
- Targeted searching saves time. Instead of manually filtering a massive task list, use complex filters with `maniphest_search` to find only 'open' tasks assigned to specific teams.

## How It Works

The bottom line is: you tell your AI client what dev data you need; it calls the API and brings back the result instantly.

1. First, subscribe to this server on Vinkius. You'll need your Phabricator Instance URL and a Conduit API Token.
2. Next, configure your AI client (Claude, Cursor, etc.) with those credentials. The connection establishes access to all exposed tools.
3. Finally, ask your agent to perform an action—like 'Find me the history for task T101'—and it uses the appropriate tool endpoint.

## Frequently Asked Questions

**How do I find an open task assigned to me using maniphest_search?**
You use `maniphest_search` with specific constraints. You need to pass filters like 'status=open' and 'assigned_to={user}' so the search engine knows exactly what you mean.

**Can I update a task status using maniphest_edit?**
Yes, that's one of its main jobs. You call `maniphest_edit` and tell it which task ID to change and the new status or owner you want.

**What is the difference between diffusion_repository_search and diffusion_commit_search?**
Repository search finds containers—the overall project space. Commit search digs deeper, finding specific snapshots (SHA hashes) within those projects.

**Which tool should I use to see who last worked on a task? Is it user_search or maniphest_gettasktransactions?**
Use `maniphest_gettasktransactions`. This tool gives the full timeline, showing which specific user made the last status change or comment.

**What credentials do I need to use `diffusion_repository_search`?**
You must provide a valid Phabricator Instance URL and a Conduit API Token. The token needs read permissions for the repository section; otherwise, the search will fail.

**How do I check my current credentials using `user_whoami`?**
The tool immediately returns your authenticated details, including your user ID and email. This confirms if your agent has permission to perform actions on your behalf.

**What format should I use for complex filters when calling `maniphest_search`?**
You must pass constraints using a structured dictionary or JSON payload. The API requires specific syntax keys for project IDs, status codes, and date ranges to function correctly.

**If I use `differential_revision_edit`, how does the system handle conflicting revisions?**
The server checks for existing conflicts and returns a dedicated error code. You'll need to manually resolve the conflict—often by merging changes—before re-attempting the edit via your AI client.

**Can I update the status of a Maniphest task using this server?**
Yes. You can use the `maniphest_edit` tool. You'll need to provide the task identifier (like T123) and a transaction object specifying the 'status' type and the desired value.

**How do I see the full history of changes for a specific task?**
Use the `maniphest_gettasktransactions` tool with the task ID (e.g., 'T123'). It will return a chronological list of all edits, comments, and status changes made to that task.

**Can I search for code revisions that are currently open?**
Absolutely. Use `differential_revision_search` and pass a constraint for statuses like 'open' or 'needs-review' to filter the results to active code reviews.