AdoPRKit: The complete toolbox for Azure DevOps Pull Requests (MCP)
Project description
AdoPRKit
AdoPRKit is a Model Context Protocol (MCP) server that provides a complete toolbox for managing Azure DevOps Pull Requests. Designed for enterprise engineers who want a pragmatic, "zero thinking" set of tools for their agents.
Features
- Create PR: Create new pull requests with title, description, and linked work items.
- Get PR: Retrieve detailed information about a specific PR.
- List PRs: List PRs created by you (default) or where you are a reviewer.
- Update PR: Update PR details or perform actions (abandon, draft, publish, reactivate).
- Comments: Add and retrieve comments on PR threads.
- Diffs: View file diffs and changed files in a PR.
Roadmap & Known Limitations
Compared to standard tools like the GitHub MCP server, this ADO implementation has some missing features we plan to address:
- Inline Code Comments: Currently, comments are added to the PR thread generally. We need to support
threadContextto pin comments to specific files and lines.- Implementation Check: Use
threadContextwithfilePath,rightFileStart(line/offset), andrightFileEnd.
- Implementation Check: Use
- Rich Comments (Mentions & Work Items): The current tool only creates plain text comments. We need to support:
- Mentions:
@<User Name>(no special ID needed, just text). - Work Item Links:
#<Work Item ID>(automatically linked by ADO).
- Mentions:
- File Content Access: Currently, we can only view diffs. We need a tool to read the full content of any file in the repo (not just what changed) to provide better code reviews.
- Work Item Management: Basic linking exists, but full creation and management (CRUD) of Azure Boards Work Items is missing.
- Merge Strategies: Explicit support for merging PRs with specific strategies (squash, rebase) is not yet exposed via a tool.
- Voting on PRs: Add support for casting votes (Approve, Reject, etc.).
- Values: Approved (10), Approved with suggestions (5), No vote (0), Waiting for author (-5), Rejected (-10).
- API:
PATCH .../reviewersendpoint.
- Pipeline Status: Ability to check build/CI status checks on a PR.
- Implementation Check: Use
GET .../pullRequests/{id}/statusesto retrieve CI/Build status.
- Implementation Check: Use
Quick Start
Prerequisites
- Python 3.10+
- Azure DevOps Personal Access Token (PAT) with Code (Read & Write) and Pull Request Threads (Read & Write) scopes.
⚡️ Quick Start (No Install)
Run directly using uvx (part of uv):
uvx ado-pr-manager
📦 Installation
If you prefer installing it globally or in a venv:
pip install ado-pr-manager
# or
uv pip install ado-pr-manager
🛠️ Editor Configuration
Cursor
- Go to Cursor Settings > General > MCP.
- Click Add new MCP server.
- Select Command type.
- Name:
ado-pr-manager - Command:
uvx ado-pr-manager(orpython3 -m ado_pr_kit.serverif installed) - Add your Environment Variables (
AZDO_ORG_URL,AZDO_PAT, etc.) in the config.
VS Code
- Install the MCP Support extension.
- Edit your connection config (e.g.
.vscode/mcp.json):
{
"mcpServers": {
"ado-pr-manager": {
"command": "uvx",
"args": ["ado-pr-manager"],
"env": {
"AZDO_ORG_URL": "...",
"AZDO_PAT": "..."
}
}
}
}
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"ado-pr-manager": {
"command": "uvx",
"args": ["ado-pr-manager"],
"env": {
"AZDO_ORG_URL": "...",
"AZDO_PAT": "..."
}
}
}
}
🌐 Remote Usage (SSE)
To use this server with web-based MCP clients, you can deploy it as a remote SSE (Server-Sent Events) server.
- Entry Point:
ado_pr_kit.server_sse:app - Command:
uvicorn ado_pr_kit.server_sse:app --host 0.0.0.0 --port 8000 - Deployment:
- Railway/Render: Deploy this repo, set the Start Command to the above, and add your Environment Variables.
- Docker: Use the provided Dockerfile but override the entrypoint to run uvicorn.
Clients can then connect via SSE at https://your-app-url.com/sse.
🚀 Hosting
Since AdoPRKit is Docker-ready, you can deploy it anywhere.
Option 1: Render (Free Tier Available)
- Click the button below.
- Connect your GitHub repository.
- Add Environment Variables (
AZDO_ORG_URL,AZDO_PAT).
[!NOTE] Cold Start: Free-tier hosting (Render, Railway) may spin down after inactivity. The first request after idle may take 30-60 seconds.
Option 2: Railway
- Click the button below.
- Railway will detect the
Dockerfile. - Add variables in the "Variables" tab.
Option 3: Smithery
Built specifically for MCP.
Option 4: Self-Host (e.g., alongside LiteLLM)
If you have a customized server (like for LiteLLM), you can run this via Docker Compose.
- Copy the
docker-compose.ymlfrom this repo. - Run:
export AZDO_ORG_URL="https://dev.azure.com/myorg" export AZDO_PAT="your-pat" docker-compose up -d
- Your MCP server will be at
http://YOUR_SERVER_IP:8000/sse.
Development
-
Clone & Install:
git clone https://github.com/om-surushe/ado-pr-manager.git cd ado-pr-manager python3 -m venv .venv source .venv/bin/activate pip install -e .[dev]
-
Test:
pytest
Contributing
We welcome contributions! Please see CONTRIBUTING.md for details on how to submit pull requests, report issues, and contribute to the project.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ado_pr_kit-0.2.3.tar.gz.
File metadata
- Download URL: ado_pr_kit-0.2.3.tar.gz
- Upload date:
- Size: 92.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
893a9cc512f5ed99026cd72555a4786dc4f82c9e469a266724e55eb52f127838
|
|
| MD5 |
772c5298ae1ea7a3bc683bda74faacc4
|
|
| BLAKE2b-256 |
ada8c26a5efb2ec140b07d371d42709fc88a2f175af55f71021ad87543239c5f
|
File details
Details for the file ado_pr_kit-0.2.3-py3-none-any.whl.
File metadata
- Download URL: ado_pr_kit-0.2.3-py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
368b5992062bc81ce004e66b99a351ec9c884beaf331c518d0c2c45d3a13bc6d
|
|
| MD5 |
fa5004450c0c8d3b1dc57799e880e5ea
|
|
| BLAKE2b-256 |
50194b536b13ef3a34c50cf109edadcf2105eb4c59e890333491f6995e604782
|