Phabricator MCP Server
Used for generating embeddings to enable semantic search over Phabricator tasks and revisions.
Provides tools for searching, creating, and managing Phabricator tasks and revisions, querying projects, users, and files, and performing semantic search over indexed content.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Phabricator MCP Serverfind open unbreak tasks"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Phabricator MCP Server
Standalone MCP server for Phabricator, kept outside the devel repo so hg stays clean.
Setup
Copy env file and fill credentials:
cp .env.example .env # Edit .env with your Phabricator API tokenInstall deps (already done in
venv):python3 -m venv venv ./venv/bin/pip install mcp requests python-dotenv
Related MCP server: Sentinel Core Agent
Run
./run.shOr manually:
source venv/bin/activate
python3 server.pyTools exposed
Phabricator API
search_tasks– query tasks by status / priority / assigned / textget_task– fetch a single task by ID with full description, media, and commentsget_task_comments– fetch only comments / transactions for a taskcreate_task– create a new maniphest taskedit_task– update an existing task or add a commentsearch_revisions– search differential revisionsget_revision– fetch a revision by IDget_revision_diff– fetch raw diff for a revisionget_unbreak_tasks– list open unbreak tasksget_projects– search Phab projectsget_project_members– list members of a projectsearch_users– search Phab usersget_file_info– get metadata for a file / image by PHIDquery_phids– resolve arbitrary PHIDs to objectsping– health-check connectivity
RAG (Semantic Search)
phab_search_rag– semantic search over indexed tasks and revisionsphab_ask– natural-language Q&A with source attribution
RAG Architecture
Phabricator API ChromaDB Vector Store
│ ▲
▼ │
┌─────────────┐ ┌─────────────┐ ┌──────────┐
│ Extractor │───▶│ Chunker │───▶│ Indexer │
│ (Conduit) │ │ (tiktoken) │ │(metadata)│
└─────────────┘ └─────────────┘ └──────────┘
▲
┌─────────────┐ ┌─────────────┐ │
│ Diff Parser │───▶│ Embedder │──────────┘
│(files/hunks)│ │(OpenAI 3-sm)│
└─────────────┘ └─────────────┘
Query Flow:
┌──────────┐ ┌──────────┐ ┌─────────┐ ┌──────────┐
│ User │───▶│ Embedder │───▶│ Search │───▶│ LLM │
│ Query │ │ (OpenAI) │ │(ChromaDB)│ │(Anthropic│
└──────────┘ └──────────┘ └─────────┘ │ Claude) │
└──────────┘Tech Stack
Embeddings: OpenAI
text-embedding-3-small(1536 dims)Vector DB: ChromaDB with cosine similarity + metadata filtering
LLM: Anthropic Claude Haiku for RAG synthesis
Chunking: tiktoken-based with 512-token chunks, 50-token overlap
Diff Metadata: Files changed, hunk context lines (function/class names)
RAG Setup
Add API keys to
.env:OPENAI_API_KEY=sk-... # Required for embeddings ANTHROPIC_API_KEY=sk-ant-... # Required for RAG Q&ARun the full index (one-time):
source venv/bin/activate python scripts/full_index.py~47K tasks + ~38K revisions = ~116M tokens
Cost: ~$2.32 (OpenAI embeddings)
Time: ~16 hours (fast mode) or ~30 hours (full mode)
Fast mode (recommended for first run):
python scripts/full_index.py --skip-comments --skip-diffsIndexes titles, descriptions, summaries only
~4–6x faster than full mode
Resume capability: re-run without flags later to enrich with comments/diffs
Test a subset first:
python scripts/full_index.py --task-limit 10 --rev-limit 10
Incremental Sync
After the initial index, run incremental sync to pick up new and modified tasks/revisions:
python scripts/incremental_sync.pyThis fetches only objects modified since the last sync (stored in last_sync.json) and updates the vector store. Use --dry-run to preview what would be synced without making changes.
Cron setup (daily sync)
# Add to crontab (crontab -e)
# Replace /path/to/mcp-phab with your project directory
0 2 * * * cd /path/to/mcp-phab && venv/bin/python scripts/incremental_sync.py >> /tmp/phab_sync.log 2>&1RAG Usage
Via MCP Tools
phab_search_rag(query="find bugs about email signups", limit=5)
phab_ask(query="What caused the AttributeError in matching filters?")Via CLI (direct Python)
python -c "
from rag.embedder import Embedder
from rag.indexer import Indexer
emb = Embedder()
idx = Indexer()
results = idx.search(emb.embed(['email signup bugs'])[0], limit=3)
for r in results:
print(r['metadata']['source_uri'], r['metadata']['title'])
"Claude Desktop config
Add to your Claude Desktop MCP settings (~/.config/claude/mcp-config.json or similar).
Replace /path/to/mcp-phab with your actual project directory and fill in your credentials:
{
"mcpServers": {
"phab": {
"command": "/path/to/mcp-phab/venv/bin/python3",
"args": ["/path/to/mcp-phab/server.py"],
"env": {
"PHABRICATOR_URL": "https://phabricator.example.com",
"PHABRICATOR_API_TOKEN": "your-api-token-here",
"TRANSPORT": "stdio"
}
}
}
}This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/palash018/Phab-MCP-RAG'
If you have feedback or need assistance with the MCP directory API, please join our Discord server