devops-mcp 1.0.0__tar.gz → 1.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. {devops_mcp-1.0.0/src/devops_mcp.egg-info → devops_mcp-1.1.0}/PKG-INFO +34 -7
  2. {devops_mcp-1.0.0 → devops_mcp-1.1.0}/README.md +33 -6
  3. {devops_mcp-1.0.0 → devops_mcp-1.1.0}/pyproject.toml +3 -4
  4. {devops_mcp-1.0.0 → devops_mcp-1.1.0}/src/devops_mcp/client.py +20 -0
  5. {devops_mcp-1.0.0 → devops_mcp-1.1.0}/src/devops_mcp/models.py +449 -0
  6. {devops_mcp-1.0.0 → devops_mcp-1.1.0}/src/devops_mcp/server.py +2 -0
  7. devops_mcp-1.1.0/src/devops_mcp/tools/advanced_security.py +291 -0
  8. devops_mcp-1.1.0/src/devops_mcp/tools/discovery.py +129 -0
  9. {devops_mcp-1.0.0 → devops_mcp-1.1.0}/src/devops_mcp/tools/pipelines.py +62 -1
  10. {devops_mcp-1.0.0 → devops_mcp-1.1.0}/src/devops_mcp/tools/pull_requests.py +202 -0
  11. devops_mcp-1.1.0/src/devops_mcp/tools/repositories.py +441 -0
  12. {devops_mcp-1.0.0 → devops_mcp-1.1.0}/src/devops_mcp/tools/work_items.py +100 -0
  13. {devops_mcp-1.0.0 → devops_mcp-1.1.0/src/devops_mcp.egg-info}/PKG-INFO +34 -7
  14. {devops_mcp-1.0.0 → devops_mcp-1.1.0}/src/devops_mcp.egg-info/SOURCES.txt +2 -0
  15. {devops_mcp-1.0.0 → devops_mcp-1.1.0}/tests/test_auth_lock_timeout.py +0 -1
  16. {devops_mcp-1.0.0 → devops_mcp-1.1.0}/tests/test_build_url.py +0 -1
  17. {devops_mcp-1.0.0 → devops_mcp-1.1.0}/tests/test_paginate_results.py +0 -1
  18. {devops_mcp-1.0.0 → devops_mcp-1.1.0}/tests/test_request_with_retry.py +0 -1
  19. {devops_mcp-1.0.0 → devops_mcp-1.1.0}/tests/test_token_cache.py +0 -4
  20. devops_mcp-1.0.0/src/devops_mcp/tools/repositories.py +0 -182
  21. {devops_mcp-1.0.0 → devops_mcp-1.1.0}/LICENSE +0 -0
  22. {devops_mcp-1.0.0 → devops_mcp-1.1.0}/setup.cfg +0 -0
  23. {devops_mcp-1.0.0 → devops_mcp-1.1.0}/src/devops_mcp/__init__.py +0 -0
  24. {devops_mcp-1.0.0 → devops_mcp-1.1.0}/src/devops_mcp/_app.py +0 -0
  25. {devops_mcp-1.0.0 → devops_mcp-1.1.0}/src/devops_mcp/tools/__init__.py +0 -0
  26. {devops_mcp-1.0.0 → devops_mcp-1.1.0}/src/devops_mcp.egg-info/dependency_links.txt +0 -0
  27. {devops_mcp-1.0.0 → devops_mcp-1.1.0}/src/devops_mcp.egg-info/entry_points.txt +0 -0
  28. {devops_mcp-1.0.0 → devops_mcp-1.1.0}/src/devops_mcp.egg-info/requires.txt +0 -0
  29. {devops_mcp-1.0.0 → devops_mcp-1.1.0}/src/devops_mcp.egg-info/top_level.txt +0 -0
  30. {devops_mcp-1.0.0 → devops_mcp-1.1.0}/tests/test_create_pull_request_work_item_linking.py +0 -0
  31. {devops_mcp-1.0.0 → devops_mcp-1.1.0}/tests/test_model_validation.py +0 -0
  32. {devops_mcp-1.0.0 → devops_mcp-1.1.0}/tests/test_smoke.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: devops-mcp
3
- Version: 1.0.0
3
+ Version: 1.1.0
4
4
  Summary: An MCP server for interacting with Azure DevOps
5
5
  Author: Ryan James
6
6
  License-Expression: MIT
@@ -251,7 +251,7 @@ Add to `.vscode/mcp.json` in your project root. Note: `.vscode/mcp.json` is giti
251
251
 
252
252
  ## Tools
253
253
 
254
- **31 tools** across 4 domains. Tools marked with a gate are only registered when the corresponding env flag is set.
254
+ **46 tools** across 6 domains. Tools marked with a gate are only registered when the corresponding env flag is set.
255
255
 
256
256
  | Gate | Meaning |
257
257
  |---|---|
@@ -259,7 +259,7 @@ Add to `.vscode/mcp.json` in your project root. Note: `.vscode/mcp.json` is giti
259
259
  | `write` | Registered only when `AZDO_ALLOW_WRITE=true`. |
260
260
  | `delete` | Registered only when `AZDO_ALLOW_DELETE=true`. |
261
261
 
262
- ### Pipelines (7 tools)
262
+ ### Pipelines (8 tools)
263
263
 
264
264
  | Tool | Gate | Description |
265
265
  |---|---|---|
@@ -270,16 +270,21 @@ Add to `.vscode/mcp.json` in your project root. Note: `.vscode/mcp.json` is giti
270
270
  | `devops_list_run_logs` | default | List log metadata for a build by `buildId` |
271
271
  | `devops_get_run_log_content` | default | Get plain-text content of a specific log; use `start_line`/`end_line` to slice large logs |
272
272
  | `devops_list_build_artifacts` | default | List artifacts produced by a build |
273
+ | `devops_run_pipeline` | write | Trigger a new pipeline run; optionally override branch, template parameters, or queue-time variables |
273
274
 
274
- ### Repositories (3 tools)
275
+ ### Repositories (7 tools)
275
276
 
276
277
  | Tool | Gate | Description |
277
278
  |---|---|---|
278
279
  | `devops_list_repositories` | default | List Git repositories in a project |
279
280
  | `devops_get_repository` | default | Get details of a specific repository |
280
281
  | `devops_list_branches` | default | List branches in a repository |
282
+ | `devops_get_file_content` | default | Get the text content of a file; supports optional `branch` or `commit_id`; binary files return an error |
283
+ | `devops_list_repository_items` | default | Browse files and folders; control depth with `recursion_level` (`oneLevel`, `full`, etc.) |
284
+ | `devops_list_commits` | default | List commits with optional filters for branch, author, and date range |
285
+ | `devops_get_commit` | default | Get details of a specific commit; set `change_count` to include changed file paths |
281
286
 
282
- ### Pull Requests (14 tools)
287
+ ### Pull Requests (17 tools)
283
288
 
284
289
  | Tool | Gate | Description |
285
290
  |---|---|---|
@@ -287,6 +292,9 @@ Add to `.vscode/mcp.json` in your project root. Note: `.vscode/mcp.json` is giti
287
292
  | `devops_list_pull_requests` | default | List pull requests with optional filters (status, branch, creator, reviewer, labels) |
288
293
  | `devops_create_pull_request` | write | Create a new pull request, optionally linking work items |
289
294
  | `devops_update_pull_request` | write | Update title, description, status, draft state, target branch, auto-complete, or completion options |
295
+ | `devops_complete_pull_request` | write | Complete (merge) a pull request — irreversible; confirm merge strategy and source-branch deletion first to avoid unwanted merge type or history loss |
296
+ | `devops_abandon_pull_request` | write | Abandon a pull request without merging |
297
+ | `devops_vote_pull_request` | write | Cast a reviewer vote (10 approve, 5 approve with suggestions, 0 reset, -5 waiting, -10 reject) |
290
298
  | `devops_tag_pull_request` | write | Add labels/tags to a pull request |
291
299
  | `devops_link_work_items_to_pull_request` | write | Link Azure Boards work items to a pull request |
292
300
  | `devops_list_pull_request_threads` | default | List comment threads on a pull request |
@@ -298,7 +306,7 @@ Add to `.vscode/mcp.json` in your project root. Note: `.vscode/mcp.json` is giti
298
306
  | `devops_list_pull_request_iterations` | default | List a pull request's iterations (push history) |
299
307
  | `devops_get_pull_request_changes` | default | List changed files for a PR iteration (path + change type) |
300
308
 
301
- ### Work Items (7 tools)
309
+ ### Work Items (9 tools)
302
310
 
303
311
  | Tool | Gate | Description |
304
312
  |---|---|---|
@@ -309,11 +317,30 @@ Add to `.vscode/mcp.json` in your project root. Note: `.vscode/mcp.json` is giti
309
317
  | `devops_update_work_item` | write | Update fields on an existing work item |
310
318
  | `devops_add_work_item_comment` | write | Add a comment to a work item |
311
319
  | `devops_update_work_item_comment` | write | Update an existing work item comment |
320
+ | `devops_list_work_item_types` | default | List work item types (e.g., Bug, Task, Epic) and their reference names |
321
+ | `devops_list_work_item_fields` | default | List field definitions for a work item type or all fields in the process |
322
+
323
+ ### Discovery (2 tools)
324
+
325
+ | Tool | Gate | Description |
326
+ |---|---|---|
327
+ | `devops_list_projects` | default | List projects in an organization; use when project name is unknown |
328
+ | `devops_list_teams` | default | List teams in a project; supports `mine=true` to filter to the authenticated user's teams |
329
+
330
+ ### Advanced Security (3 tools)
331
+
332
+ Requires GitHub Advanced Security for Azure DevOps (GHAzDo) to be enabled on the repository.
333
+
334
+ | Tool | Gate | Description |
335
+ |---|---|---|
336
+ | `devops_list_advanced_security_alerts` | default | List security alerts for a repository; filter by `alert_type` (`secret`, `dependency`, `code`), state, severity, rule, tool, or branch |
337
+ | `devops_get_advanced_security_alert` | default | Get a single alert by ID. `expand=validationFingerprint` can return secret values in cleartext — leave unset unless needed |
338
+ | `devops_update_advanced_security_alert` | write | Dismiss, re-activate, or mark an alert fixed; dismissing requires a dismissal reason |
312
339
 
313
340
  ---
314
341
 
315
342
  ## API Reference
316
343
 
317
- All tools use the [Azure DevOps REST API](https://learn.microsoft.com/en-us/rest/api/azure/devops/). Pipeline, repository, work item read tools, and the PR comment-thread and diff tools use **v7.1**. The remaining pull request tools (get/list/create/update/tag/link) and work item write operations use **v7.2-preview**.
344
+ All tools use the [Azure DevOps REST API](https://learn.microsoft.com/en-us/rest/api/azure/devops/). Pipeline, repository, and discovery tools use **v7.1**. Work item schema tools (`devops_list_work_item_types`, `devops_list_work_item_fields`) use **v7.1**. PR tools (get/list/create/update/tag/link) and work item write operations use **v7.2-preview**. Advanced Security alert tools use **v7.2-preview.1** on the `advsec.dev.azure.com` host.
318
345
 
319
346
  **Note:** `run_id` and `build_id` share the same numeric value — a Pipelines API `run_id` is identical to the Build API `buildId` for the same run. This enables cross-API calls (e.g., use `devops_list_run_logs` to get log IDs, then `devops_get_run_log_content` with the same `build_id`).
@@ -223,7 +223,7 @@ Add to `.vscode/mcp.json` in your project root. Note: `.vscode/mcp.json` is giti
223
223
 
224
224
  ## Tools
225
225
 
226
- **31 tools** across 4 domains. Tools marked with a gate are only registered when the corresponding env flag is set.
226
+ **46 tools** across 6 domains. Tools marked with a gate are only registered when the corresponding env flag is set.
227
227
 
228
228
  | Gate | Meaning |
229
229
  |---|---|
@@ -231,7 +231,7 @@ Add to `.vscode/mcp.json` in your project root. Note: `.vscode/mcp.json` is giti
231
231
  | `write` | Registered only when `AZDO_ALLOW_WRITE=true`. |
232
232
  | `delete` | Registered only when `AZDO_ALLOW_DELETE=true`. |
233
233
 
234
- ### Pipelines (7 tools)
234
+ ### Pipelines (8 tools)
235
235
 
236
236
  | Tool | Gate | Description |
237
237
  |---|---|---|
@@ -242,16 +242,21 @@ Add to `.vscode/mcp.json` in your project root. Note: `.vscode/mcp.json` is giti
242
242
  | `devops_list_run_logs` | default | List log metadata for a build by `buildId` |
243
243
  | `devops_get_run_log_content` | default | Get plain-text content of a specific log; use `start_line`/`end_line` to slice large logs |
244
244
  | `devops_list_build_artifacts` | default | List artifacts produced by a build |
245
+ | `devops_run_pipeline` | write | Trigger a new pipeline run; optionally override branch, template parameters, or queue-time variables |
245
246
 
246
- ### Repositories (3 tools)
247
+ ### Repositories (7 tools)
247
248
 
248
249
  | Tool | Gate | Description |
249
250
  |---|---|---|
250
251
  | `devops_list_repositories` | default | List Git repositories in a project |
251
252
  | `devops_get_repository` | default | Get details of a specific repository |
252
253
  | `devops_list_branches` | default | List branches in a repository |
254
+ | `devops_get_file_content` | default | Get the text content of a file; supports optional `branch` or `commit_id`; binary files return an error |
255
+ | `devops_list_repository_items` | default | Browse files and folders; control depth with `recursion_level` (`oneLevel`, `full`, etc.) |
256
+ | `devops_list_commits` | default | List commits with optional filters for branch, author, and date range |
257
+ | `devops_get_commit` | default | Get details of a specific commit; set `change_count` to include changed file paths |
253
258
 
254
- ### Pull Requests (14 tools)
259
+ ### Pull Requests (17 tools)
255
260
 
256
261
  | Tool | Gate | Description |
257
262
  |---|---|---|
@@ -259,6 +264,9 @@ Add to `.vscode/mcp.json` in your project root. Note: `.vscode/mcp.json` is giti
259
264
  | `devops_list_pull_requests` | default | List pull requests with optional filters (status, branch, creator, reviewer, labels) |
260
265
  | `devops_create_pull_request` | write | Create a new pull request, optionally linking work items |
261
266
  | `devops_update_pull_request` | write | Update title, description, status, draft state, target branch, auto-complete, or completion options |
267
+ | `devops_complete_pull_request` | write | Complete (merge) a pull request — irreversible; confirm merge strategy and source-branch deletion first to avoid unwanted merge type or history loss |
268
+ | `devops_abandon_pull_request` | write | Abandon a pull request without merging |
269
+ | `devops_vote_pull_request` | write | Cast a reviewer vote (10 approve, 5 approve with suggestions, 0 reset, -5 waiting, -10 reject) |
262
270
  | `devops_tag_pull_request` | write | Add labels/tags to a pull request |
263
271
  | `devops_link_work_items_to_pull_request` | write | Link Azure Boards work items to a pull request |
264
272
  | `devops_list_pull_request_threads` | default | List comment threads on a pull request |
@@ -270,7 +278,7 @@ Add to `.vscode/mcp.json` in your project root. Note: `.vscode/mcp.json` is giti
270
278
  | `devops_list_pull_request_iterations` | default | List a pull request's iterations (push history) |
271
279
  | `devops_get_pull_request_changes` | default | List changed files for a PR iteration (path + change type) |
272
280
 
273
- ### Work Items (7 tools)
281
+ ### Work Items (9 tools)
274
282
 
275
283
  | Tool | Gate | Description |
276
284
  |---|---|---|
@@ -281,11 +289,30 @@ Add to `.vscode/mcp.json` in your project root. Note: `.vscode/mcp.json` is giti
281
289
  | `devops_update_work_item` | write | Update fields on an existing work item |
282
290
  | `devops_add_work_item_comment` | write | Add a comment to a work item |
283
291
  | `devops_update_work_item_comment` | write | Update an existing work item comment |
292
+ | `devops_list_work_item_types` | default | List work item types (e.g., Bug, Task, Epic) and their reference names |
293
+ | `devops_list_work_item_fields` | default | List field definitions for a work item type or all fields in the process |
294
+
295
+ ### Discovery (2 tools)
296
+
297
+ | Tool | Gate | Description |
298
+ |---|---|---|
299
+ | `devops_list_projects` | default | List projects in an organization; use when project name is unknown |
300
+ | `devops_list_teams` | default | List teams in a project; supports `mine=true` to filter to the authenticated user's teams |
301
+
302
+ ### Advanced Security (3 tools)
303
+
304
+ Requires GitHub Advanced Security for Azure DevOps (GHAzDo) to be enabled on the repository.
305
+
306
+ | Tool | Gate | Description |
307
+ |---|---|---|
308
+ | `devops_list_advanced_security_alerts` | default | List security alerts for a repository; filter by `alert_type` (`secret`, `dependency`, `code`), state, severity, rule, tool, or branch |
309
+ | `devops_get_advanced_security_alert` | default | Get a single alert by ID. `expand=validationFingerprint` can return secret values in cleartext — leave unset unless needed |
310
+ | `devops_update_advanced_security_alert` | write | Dismiss, re-activate, or mark an alert fixed; dismissing requires a dismissal reason |
284
311
 
285
312
  ---
286
313
 
287
314
  ## API Reference
288
315
 
289
- All tools use the [Azure DevOps REST API](https://learn.microsoft.com/en-us/rest/api/azure/devops/). Pipeline, repository, work item read tools, and the PR comment-thread and diff tools use **v7.1**. The remaining pull request tools (get/list/create/update/tag/link) and work item write operations use **v7.2-preview**.
316
+ All tools use the [Azure DevOps REST API](https://learn.microsoft.com/en-us/rest/api/azure/devops/). Pipeline, repository, and discovery tools use **v7.1**. Work item schema tools (`devops_list_work_item_types`, `devops_list_work_item_fields`) use **v7.1**. PR tools (get/list/create/update/tag/link) and work item write operations use **v7.2-preview**. Advanced Security alert tools use **v7.2-preview.1** on the `advsec.dev.azure.com` host.
290
317
 
291
318
  **Note:** `run_id` and `build_id` share the same numeric value — a Pipelines API `run_id` is identical to the Build API `buildId` for the same run. This enables cross-API calls (e.g., use `devops_list_run_logs` to get log IDs, then `devops_get_run_log_content` with the same `build_id`).
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "devops-mcp"
3
- version = "1.0.0"
3
+ version = "1.1.0"
4
4
  description = "An MCP server for interacting with Azure DevOps"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -69,9 +69,8 @@ target-version = "py310"
69
69
 
70
70
  [tool.ruff.lint]
71
71
  # I = isort-compatible import ordering (stdlib -> third-party -> local).
72
- # Scoped to rules that pass cleanly across the repo; broader rule sets
73
- # (E, W, F, etc.) are deferred to avoid a repo-wide src/ refactor.
74
- select = ["I"]
72
+ # F = Pyflakes: undefined names, unused imports/variables, f-string issues.
73
+ select = ["I", "F"]
75
74
 
76
75
  [tool.ruff.lint.per-file-ignores]
77
76
  # src/ pre-dates this gate; import order there is deferred to avoid a
@@ -202,6 +202,26 @@ def build_url(organization: str, project: str, path: str) -> str:
202
202
  return f"https://dev.azure.com/{enc_org}/{enc_project}/_apis/{enc_path}"
203
203
 
204
204
 
205
+ def build_org_url(organization: str, path: str) -> str:
206
+ """Build a percent-encoded Azure DevOps REST API URL at organization level (no project segment)."""
207
+ enc_org = quote(organization, safe="")
208
+ enc_path = quote(path, safe="/")
209
+ return f"https://dev.azure.com/{enc_org}/_apis/{enc_path}"
210
+
211
+
212
+ def build_advsec_url(organization: str, project: str, path: str) -> str:
213
+ """Build a percent-encoded Advanced Security REST URL on advsec.dev.azure.com.
214
+
215
+ Same encoding contract as build_url (org/project encoded with safe="",
216
+ multi-segment path with safe="/"), but targets the advsec host that serves
217
+ the GHAzDo alerts API instead of dev.azure.com.
218
+ """
219
+ enc_org = quote(organization, safe="")
220
+ enc_project = quote(project, safe="")
221
+ enc_path = quote(path, safe="/")
222
+ return f"https://advsec.dev.azure.com/{enc_org}/{enc_project}/_apis/{enc_path}"
223
+
224
+
205
225
  def build_params(**kwargs) -> dict:
206
226
  """Build a params dict with the API version, filtering out None values."""
207
227
  params = {"api-version": API_VERSION}