Skip to main content
All connectors
qbash Connectors / Azure DevOps

Azure DevOps MCP serverand Python AI tasks

qbash hosts a Azure DevOps MCP server you can use in Claude, ChatGPT, Codex, Cursor, Grok Bot and Muse. Developers use qbash Tasks to write cloud-hosted Python functions that pair Azure DevOps with models such as Claude and GPT.

Add the qbash MCP

Use Azure DevOps from Claude Code, Codex, Cursor and other MCP clients. Connect Azure DevOps in qbash, and your agent can work with its data and build Tasks that call it.

claude mcp add --transport http qbash https://mcp.qbash.com/mcp

Then run /mcp in Claude Code and sign in with qbash.

  • List the projects in your organization
  • List the Git repositories in a project
  • List commits on a branch, filtered by author or date range
  • Read a file's content at a branch, tag or commit
  • List pull requests by status, creator, reviewer or target branch
  • Read a pull request's description, reviewers, votes and merge status
Read the docs

Write a Azure DevOps task in Python

A qbash Task is a Python function hosted in the cloud. Python is the runtime and defines the process, and built-in inline prompts run on leading models such as Claude, GPT, Gemini and Grok.

Run a Task on a schedule, from an HTTP request or when a connected app sends an event. Your agents and chat tools call it over MCP.

Each run is logged with its inputs and results, and you can turn data logging off for any Task. Every Task has version control, and each run is locked to the version it ran.

Summarise why a pipeline run failed

A last step in your pipeline that runs only on failure posts the project and build ID to the Task's webhook. The Task reads the build timeline and an inline prompt explains which steps failed and why.

main.py
build_id = qbash.inputs.get("build_id")
if build_id:
timeline = qbash.integrations.azure_devops.get_build_timeline(
project=qbash.inputs.get("project"),
build_id=build_id,
)
failed = [record for record in timeline["records"] if record["result"] == "failed"]
summary = qbash.ai.run_prompt(
slug="azure-devops-build-failure",
variables={"failed_steps": json.dumps(failed)},
)
qbash.output(summary)
else:
qbash.output("No build_id in this request.")
Sample get_build_timeline response
{
"id": "8f2b5e3a-9c41-4d6b-a1e7-3c0d9b2f6e14",
"changeId": 41,
"records": [
{
"id": "a1d3c6e2-0b4f-5e8a-9c7d-1f2e3a4b5c6d",
"parentId": null,
"type": "Stage",
"name": "Build",
"state": "completed",
"result": "succeeded",
"errorCount": 0,
"warningCount": 1,
"issues": [],
"log": null
},
{
"id": "b2e4d7f3-1c5a-6f9b-0d8e-2a3b4c5d6e7f",
"parentId": "c3f5e8a4-2d6b-7a0c-1e9f-3b4c5d6e7f80",
"type": "Task",
"name": "Run unit tests",
"state": "completed",
"result": "failed",
"errorCount": 2,
"warningCount": 0,
"issues": [
{
"type": "error",
"category": "General",
"message": "PaymentsApi.Tests.RefundServiceTests.Refund_exceeding_capture_is_rejected: Expected status 422 but found 500."
},
{
"type": "error",
"category": "General",
"message": "Process completed with exit code 1."
}
],
"log": {
"id": 14,
"type": "Container",
"url": "https://dev.azure.com/example-org/Payments/_apis/build/builds/20417/logs/14"
}
},
{
"id": "d4a6f9b5-3e7c-8b1d-2f0a-4c5d6e7f8091",
"parentId": "c3f5e8a4-2d6b-7a0c-1e9f-3b4c5d6e7f80",
"type": "Task",
"name": "Publish test results",
"state": "completed",
"result": "succeeded",
"errorCount": 0,
"warningCount": 0,
"issues": [],
"log": {
"id": 15,
"type": "Container",
"url": "https://dev.azure.com/example-org/Payments/_apis/build/builds/20417/logs/15"
}
}
]
}

Custom MCP server

Build a custom MCP server with Azure DevOps

Create a hosted MCP server that combines Azure DevOps tools with your other connectors, Tasks and memory folders. You choose each tool it exposes, so a server can share Azure DevOps reads with write tools left off.

Share the server with your team, and each person adds it to the client they already use.

How to set it up

  1. Connect Azure DevOps on the qbash Connectors page.
  2. Create an MCP server and add the Azure DevOps tools you want to share.
  3. Paste the server URL into your client. It connects with OAuth or an access token.

Azure DevOps MCP questions

Does Azure DevOps have an official MCP server?

Microsoft runs a remote Azure DevOps MCP server, generally available since August 2026, at mcp.dev.azure.com/{organization}, and publishes a local server you run yourself. The remote server signs in with Microsoft Entra, and Microsoft's GA notice says ChatGPT, Claude and Cursor cannot connect to it yet. qbash puts Azure DevOps on one URL with your other connectors that those clients can use, and the same methods run in Python Tasks.

What does the Azure DevOps connector need to connect?

A personal access token for your organization, or a Microsoft Entra sign-in. A PAT with read scopes on Build, Code and Work Items covers the read methods. Pull request comments need Code read and write, work item changes need Work Items read and write, and starting a pipeline run needs Build read and execute.

Can the Azure DevOps MCP server comment on pull requests?

The create_pull_request_thread method posts a comment on a pull request, either on the whole change or on one line of a file. Other writes create pull requests and work items, update work items and start pipeline runs.

Build a Azure DevOps task

Write it in Python with AI steps, or describe it to your coding agent through the qbash MCP.