Azure DevOps PR comment MCP
Project description
AdoReviewLens
Utilities for fetching active Azure DevOps PR comments via MCP interface.
Requirements
- Python 3.10+
- Azure DevOps Personal Access Token with Code (read) and Pull Requests (read)
Installation
Local development
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
cp .env.example .env
# edit .env with your AZDO_ORG_URL, AZDO_PAT, AZDO_PROJECT, AZDO_REPO
Alternatively, if you prefer uv:
uv venv
source .venv/bin/activate
uv pip install -e .
Running python -m ado_review_lens.cli --help will confirm the CLI is available.
CLI usage
source .venv/bin/activate
python -m ado_review_lens.cli --pr 123
python -m ado_review_lens.cli --url "https://dev.azure.com/org/project/_git/repo/pullrequest/123"
python -m ado_review_lens.cli --pr 123 --allow-cross-project
HTTP API server
source .venv/bin/activate
uvicorn ado_review_lens.api:app --reload
# POST /api/v1/pr/comments with JSON {"prId": 123}
MCP server
source .venv/bin/activate
python -m ado_review_lens.server
Use the resulting stdio endpoint with the Model Context Protocol client of your choice (e.g., Claude Desktop or MCP Inspector).
Installing via mcp
The official MCP tooling expects uv to be available:
uv tool install mcp
# Register the server with an MCP client (e.g., Claude Desktop)
uv run mcp install src/ado_review_lens/server.py --name "ADO Review Lens"
# Launch the MCP Inspector for interactive testing
uv run mcp dev src/ado_review_lens/server.py --with-editable .
The install command accepts -v KEY=value or -f .env flags if you want to supply Azure DevOps environment variables during registration.
Manual MCP client registration
Some MCP clients accept explicit stdio configurations:
{
"mcpServers": {
"ado-review-lens": {
"command": "python", // or "python3" or path to python interpreter
"args": [
"-m",
"ado_review_lens.server"
],
"env": {
"AZDO_ORG_URL": "https://dev.azure.com/<org>",
"AZDO_PAT": "<personal_access_token>",
"AZDO_PROJECT": "<default_project>",
"AZDO_REPO": "<default_repo>"
}
}
}
}
Merge this snippet with existing definitions as needed, then restart or refresh your client so it discovers the server.
Other MCP clients
The repository ships with a server.json definition describing the PyPI package and stdio transport. Any MCP-compatible client that accepts server.json entries can load the server by either:
- Copying
server.jsoninto the client’s configuration directory, or - Merging the
io.github.om-surushe/ado-review-lensentry into an existing MCP registry file.
The critical values to replicate are:
{
"name": "io.github.om-surushe/ado-review-lens",
"transport": {
"type": "stdio",
"command": ["python", "-m", "ado_review_lens.server"]
}
}
Ensure the environment variables required by Azure DevOps (PAT, org URL, project, repo) are set in the client before launching the server process.
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_review_lens-0.1.1.tar.gz.
File metadata
- Download URL: ado_review_lens-0.1.1.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16636678af8ac9ebcc47ca8cd005a1fa2ec3a0892da6617b611aa81a3de04284
|
|
| MD5 |
0d7da8a92fe0a846128c8ab2eba729a2
|
|
| BLAKE2b-256 |
cd9821ae7b0a28159fab9b1ba31913a40d2e5f7462bc2bae796636499edb4660
|
File details
Details for the file ado_review_lens-0.1.1-py3-none-any.whl.
File metadata
- Download URL: ado_review_lens-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
495ce9364e520b47e52961491b8d5861aa5516c9aca1ac977e38d8f06018945c
|
|
| MD5 |
d771279ea574bbb89578014339343f60
|
|
| BLAKE2b-256 |
4cf990758851c73b0cdc2f1c53e9db00e4386563eef1da6d20cdc9ca818d4be4
|