CodeReview.MCP
0.4.0
See the version list below for details.
dotnet tool install --global CodeReview.MCP --version 0.4.0
dotnet new tool-manifest
dotnet tool install --local CodeReview.MCP --version 0.4.0
#tool dotnet:?package=CodeReview.MCP&version=0.4.0
nuke :add-package CodeReview.MCP --version 0.4.0
π REBUSS.Pure β Token-Efficient AI Code Review for Azure DevOps
Stop sending entire repositories to AI.
Use only what matters: diff + changed files from your Pull Request.
π‘ What is this?
REBUSS.Pure is a lightweight MCP server that enables AI agents (GitHub Copilot, ChatGPT, Claude):
- π analyze Azure DevOps Pull Requests
- π access only changed files
- π§ perform code review & self-review
- β‘ use minimal tokens (no full repo scan)
π― Why this exists
Typical AI workflows:
- β load entire repo
- β waste tokens
- β produce noisy results
This tool:
- β works on diff only
- β loads files on demand
- β enables incremental AI reasoning
π designed for real-world large repositories
π§ Core idea
Instead of sending everything to the model:
β full repo β LLM
You get:
LLM β MCP β only needed data
β¨ Key Features
- πΉ Azure DevOps Pull Request integration
- πΉ Diff-based AI context (token efficient)
- πΉ Local self-review (no network required)
- πΉ No repo cloning needed
- πΉ Incremental data access
- πΉ Ready-to-use review prompts
- πΉ Works with any MCP-compatible agent
- πΉ Authentication via Azure CLI or PAT
- πΉ Auto-detects VS Code and Visual Studio
π Security & Privacy
Your source code never leaves your machine.
REBUSS.Pure runs as a local process on your workstation. It does not upload, store, or relay your code to any external service. The MCP server acts as a controlled gateway between your AI agent and the data it actually needs:
- Local processing only β the server runs on
localhost; no outbound code transmission occurs. - Minimal data exposure β the AI model receives only diffs and metadata, never the full repository.
- Azure DevOps stays yours β when fetching PR data, requests go directly to your organization's Azure DevOps APIs using your credentials. No intermediary services are involved.
- Offline self-review β local review (
#self-review) operates entirely without network access. Git operations run against your local repository; nothing is sent anywhere. - No telemetry, no tracking β the server collects zero usage data and phones home to nobody.
In short: REBUSS.Pure gives AI agents read-only, scoped access to exactly the context they need β and nothing more. Your intellectual property stays where it belongs.
π Compared to typical AI workflows
| Feature | REBUSS.Pure | Typical approach |
|---|---|---|
| Context size | Minimal | Huge |
| Token usage | Low | High |
| Setup | 1 command | Complex |
| Signal quality | High | Noisy |
| Data privacy | Code stays local | Full repo sent to AI |
β‘ Quick Start
1. Install
Option A β .NET global tool (recommended)
dotnet tool install -g CodeReview.MCP
Option B - PowerShell
irm https://raw.githubusercontent.com/rebuss/CodeReview.MCP/master/install.ps1 | iex
Option C - Bash
curl -fsSL https://raw.githubusercontent.com/rebuss/CodeReview.MCP/master/install.sh | bash
2. Initialize in your repo
cd /path/to/your/repo
rebuss-pure init
This will:
- β detect your IDE (VS Code β
.vscode/mcp.json, Visual Studio β.vs/mcp.json) - β generate MCP server configuration
- β copy review prompts to
.github/prompts/ - β authenticate via Azure CLI (opens browser for login)
3. Review a Pull Request
In Copilot / AI chat:
123 #review-pr
Where 123 is the Azure DevOps Pull Request ID.
4. Self-review local changes
#self-review
Works offline β no Azure DevOps connection required.
π Technical Reference
CLI Commands
rebuss-pure init
Initializes MCP configuration in the current Git repository.
# Default β uses Azure CLI for authentication
rebuss-pure init
# With a Personal Access Token
rebuss-pure init --pat <your-pat>
What it does:
- Finds the Git repository root
- Authenticates (Azure CLI or PAT)
- Detects IDEs and writes
mcp.jsonto the appropriate directory - Copies prompt files to
.github/prompts/
IDE detection logic:
| Markers found | Config written to |
|---|---|
.vscode/ or *.code-workspace only |
.vscode/mcp.json |
.vs/ or *.sln only |
.vs/mcp.json |
| Both or neither | Both locations |
Server mode (launched automatically by MCP client)
The MCP client starts the server via the generated mcp.json. You can also start it manually:
rebuss-pure --repo /path/to/repo [--pat <token>] [--org <org>] [--project <project>] [--repository <repo-name>]
| Argument | Description |
|---|---|
--repo |
Path to the local Git repository |
--pat |
Personal Access Token for Azure DevOps |
--org |
Azure DevOps organization name (auto-detected from Git remote if omitted) |
--project |
Azure DevOps project name (auto-detected if omitted) |
--repository |
Azure DevOps repository name (auto-detected if omitted) |
Authentication
REBUSS.Pure uses a chained authentication strategy. It tries each method in order and uses the first one that succeeds:
1. Personal Access Token (PAT) β explicit config (highest priority)
Provide via CLI:
rebuss-pure init --pat <your-pat>
Or create appsettings.Local.json next to the server executable:
{
"AzureDevOps": {
"PersonalAccessToken": "<your-pat-here>"
}
}
How to create a PAT:
- Go to
https://dev.azure.com/<your-org>/_usersSettings/tokens - Click + New Token
- Select scope: Code (Read)
- Copy the token
2. Cached token (automatic)
Tokens acquired via Azure CLI are cached locally at:
%LOCALAPPDATA%\REBUSS.Pure\config.json (Windows)
~/.local/share/REBUSS.Pure/config.json (Linux/macOS)
Bearer tokens are refreshed automatically when expired.
3. Azure CLI (recommended for interactive use)
If no PAT is configured and no valid cached token exists, the server acquires a token via:
az account get-access-token --resource 499b84ac-1321-427f-aa17-267ca6975798
If Azure CLI is not installed:
- During
rebuss-pure init, the tool offers to install it automatically - Manual install: https://aka.ms/install-azure-cli
4. Error (no auth available)
If none of the above methods work, the server returns a clear error message instructing you to run az login or configure a PAT.
Note: Local self-review (
get_local_files,get_local_file_diff) works without any authentication.
Configuration
appsettings.json
Located next to the server executable. All fields are optional β auto-detected from Git remote when not specified.
{
"AzureDevOps": {
"OrganizationName": "",
"ProjectName": "",
"RepositoryName": "",
"PersonalAccessToken": ""
}
}
appsettings.Local.json
Same structure as above. Overrides appsettings.json. Excluded from Git via .gitignore. Use this for secrets like PATs.
Environment variables
All settings can be overridden via environment variables:
AzureDevOps__OrganizationName=myorg
AzureDevOps__ProjectName=myproject
AzureDevOps__RepositoryName=myrepo
AzureDevOps__PersonalAccessToken=mytoken
Auto-detection
When OrganizationName, ProjectName, or RepositoryName are not configured, the server automatically detects them from the origin Git remote URL (both HTTPS and SSH formats are supported).
MCP Tools Reference
PR Review Tools (require Azure DevOps authentication)
| Tool | Description |
|---|---|
get_pr_metadata(prNumber) |
Returns PR title, author, state, branches, stats, commit SHAs, description |
get_pr_files(prNumber) |
Returns classified list of changed files with per-file stats and review priority |
get_pr_diff(prNumber, [format]) |
Returns the complete diff for all files in the PR. Use for small PRs |
get_file_diff(prNumber, path, [format]) |
Returns the diff for a single file. Preferred for large PRs |
get_file_content_at_ref(path, ref) |
Returns full file content at a specific commit/branch/tag |
Local Self-Review Tools (no authentication needed)
| Tool | Description |
|---|---|
get_local_files([scope]) |
Lists locally changed files with classification metadata |
get_local_file_diff(path, [scope]) |
Returns structured diff for a single locally changed file |
Scopes for local tools:
| Scope | Description |
|---|---|
working-tree (default) |
All uncommitted changes (staged + unstaged) vs HEAD |
staged |
Only staged (indexed) changes vs HEAD |
<branch-name> |
All commits on current branch not yet merged into <branch-name> |
Review Workflows
PR Review
get_pr_metadata(prNumber)
β get_pr_files(prNumber)
β get_file_diff(prNumber, path) β per file, minimal tokens
β get_file_content_at_ref(path, ref) β only when diff is insufficient
Self-Review
get_local_files(scope)
β get_local_file_diff(path, scope) β per file
Prompts
After running rebuss-pure init, you get:
.github/prompts/
βββ review-pr.md
βββ self-review.md
These prompts instruct the AI agent on the review workflow. You can customize them to:
- enforce team coding standards
- adjust review priorities
- change the default self-review scope (default:
staged)
Logging
Server logs are written to daily-rotated files:
%LOCALAPPDATA%\REBUSS.Pure\server-yyyy-MM-dd.log (Windows)
~/.local/share/REBUSS.Pure/server-yyyy-MM-dd.log (Linux/macOS)
Logs older than 3 days are automatically cleaned up.
Troubleshooting
"AUTHENTICATION REQUIRED" error
Run az login and restart your IDE, or configure a PAT in appsettings.Local.json.
MCP tools not available in AI chat
- Ensure
rebuss-pure initcompleted successfully - Check that
.vscode/mcp.jsonor.vs/mcp.jsonexists - Restart your IDE or reload the MCP client
Azure DevOps organization/project not detected
If your Git remote uses a non-standard format, specify explicitly:
rebuss-pure --repo . --org myorg --project myproject --repository myrepo
Or configure in appsettings.Local.json:
{
"AzureDevOps": {
"OrganizationName": "myorg",
"ProjectName": "myproject",
"RepositoryName": "myrepo"
}
}
Token expired / 203 HTML redirect
The server automatically invalidates stale tokens and retries via Azure CLI. If the issue persists, re-authenticate:
az login
π License
MIT
π€ Author
MichaΕ Korbecki
Creator of REBUSS ecosystem
https://github.com/rebuss/CodeReview.MCP
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.