azure devops mcp server

Local 2025-08-31 23:10:37 0

Integrates Cline with Azure DevOps services, enabling access to work items, repositories, and pull requests through configurable MCP tools.


smithery badge

This Model Context Protocol (MCP) server provides integration with Azure DevOps, allowing Cline to interact with Azure DevOps services.

Prerequisites

  • Node.js (v20 LTS or higher)
  • npm (comes with Node.js)
  • A Cline installation
  • Azure DevOps account with access tokens

Installation

Installing via Smithery

To install Azure DevOps Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @stefanskiasan/azure-devops-mcp-server --client claude

Manual Installation

  1. Clone this repository:

    git clone https://github.com/stefanskiasan/azure-devops-mcp-server.git
    cd azure-devops-mcp-server

  2. Install dependencies:

    npm install

  3. Build the server:

    npm run build

Note: The build output (build/ directory) is not included in version control. You must run the build command after cloning the repository.

Configuration

1. Get Azure DevOps Personal Access Token (PAT)

  1. Go to Azure DevOps and sign in
  2. Click on your profile picture in the top right
  3. Select "Security"
  4. Click "New Token"
  5. Give your token a name and select the required scopes:
  6. Code (read, write) - For Pull Request operations
  7. Work Items (read, write) - For Work Item management
  8. Build (read, execute) - For Pipeline operations
  9. Wiki (read, write) - For Wiki operations
  10. Project and Team (read) - For Project and Board information
  11. Copy the generated token

2. Configure Cline MCP Settings

Add the server configuration to your Cline MCP settings file:

  • For VSCode extension: %APPDATA%/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json
  • For Claude desktop app: %LOCALAPPDATA%/Claude/claude_desktop_config.json

Add the following configuration to the mcpServers object:

{
  "mcpServers": {
    "azure-devops": {
      "command": "node",
      "args": ["/absolute/path/to/azure-devops-server/build/index.js"],
      "env": {
        "AZURE_DEVOPS_ORG": "your-organization",
        "AZURE_DEVOPS_PAT": "your-personal-access-token",
        "AZURE_DEVOPS_PROJECT": "your-project-name"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

Replace the following values: - /absolute/path/to/azure-devops-server: The absolute path to where you cloned this repository - your-organization: Your Azure DevOps organization name - your-project-name: Your Azure DevOps project name - your-personal-access-token: The PAT you generated in step 1

Available Tools

Work Items

  • get_work_item: Get a work item by ID
  • list_work_items: Query work items using WIQL
  • create_work_item: Create a new work item (Bug, Task, User Story)
  • update_work_item: Update an existing work item

Boards

  • get_boards: Get available boards in the project

Pipelines

  • list_pipelines: List all pipelines in the project
  • trigger_pipeline: Execute a pipeline

Pull Requests

  • list_pull_requests: List pull requests
  • create_pull_request: Create a new pull request
  • update_pull_request: Update a pull request
  • get_pull_request: Get pull request details

Wiki

  • get_wikis: List all wikis in the project
  • get_wiki_page: Get a wiki page
  • create_wiki: Create a new wiki
  • update_wiki_page: Create or update a wiki page

Projects

  • list_projects: List all projects in the Azure DevOps organization

Verification

  1. Restart Cline (or VSCode) after adding the configuration
  2. The Azure DevOps MCP server should now be listed in Cline's capabilities
  3. You can verify the installation using the MCP Inspector:
    npm run inspector

Troubleshooting

  1. If the server isn't connecting:
  2. Check that the path in your MCP settings is correct
  3. Verify your Azure DevOps credentials
  4. Check the Cline logs for any error messages

  5. If you get authentication errors:

  6. Verify your PAT hasn't expired
  7. Ensure the PAT has all necessary scopes
  8. Double-check the organization and project names

  9. For other issues:

  10. Run the inspector tool to verify the server is working correctly
  11. Check the server logs for any error messages

Development

To modify or extend the server:

  1. Make your changes in the src directory
  2. Run npm run watch for development
  3. Build with npm run build when ready
  4. Test using the inspector: npm run inspector

License

MIT License - See LICENSE for details

[
  {
    "description": "Get work items by IDs",
    "inputSchema": {
      "properties": {
        "$expand": {
          "description": "Expand options (None=0, Relations=1, Fields=2, Links=3, All=4)",
          "enum": [
            0,
            1,
            2,
            3,
            4
          ],
          "type": "number"
        },
        "asOf": {
          "description": "As of a specific date (ISO 8601)",
          "format": "date-time",
          "type": "string"
        },
        "errorPolicy": {
          "description": "Error policy (Fail=1, Omit=2)",
          "enum": [
            1,
            2
          ],
          "type": "number"
        },
        "fields": {
          "description": "Fields to include (e.g., "System.Title", "System.State")",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "ids": {
          "description": "Work item IDs",
          "items": {
            "type": "number"
          },
          "type": "array"
        }
      },
      "required": [
        "ids"
      ],
      "type": "object"
    },
    "name": "get_work_item"
  },
  {
    "description": "List work items from a board",
    "inputSchema": {
      "properties": {
        "query": {
          "description": "WIQL query to filter work items",
          "type": "string"
        }
      },
      "required": [
        "query"
      ],
      "type": "object"
    },
    "name": "list_work_items"
  },
  {
    "description": "Create a new work item using JSON patch operations",
    "inputSchema": {
      "properties": {
        "document": {
          "description": "Array of JSON patch operations to apply",
          "items": {
            "properties": {
              "op": {
                "description": "The patch operation to perform",
                "enum": [
                  "add",
                  "remove",
                  "replace",
                  "move",
                  "copy",
                  "test"
                ],
                "type": "string"
              },
              "path": {
                "description": "The path for the operation (e.g., /fields/System.Title)",
                "type": "string"
              },
              "value": {
                "description": "The value for the operation"
              }
            },
            "required": [
              "op",
              "path"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "type": {
          "description": "Work item type (e.g., "Bug", "Task", "User Story")",
          "type": "string"
        }
      },
      "required": [
        "type",
        "document"
      ],
      "type": "object"
    },
    "name": "create_work_item"
  },
  {
    "description": "Update an existing work item using JSON patch operations",
    "inputSchema": {
      "properties": {
        "document": {
          "description": "Array of JSON patch operations to apply",
          "items": {
            "properties": {
              "op": {
                "description": "The patch operation to perform",
                "enum": [
                  "add",
                  "remove",
                  "replace",
                  "move",
                  "copy",
                  "test"
                ],
                "type": "string"
              },
              "path": {
                "description": "The path for the operation (e.g., /fields/System.Title)",
                "type": "string"
              },
              "value": {
                "description": "The value for the operation"
              }
            },
            "required": [
              "op",
              "path"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "id": {
          "description": "ID of the work item to update",
          "type": "number"
        }
      },
      "required": [
        "id",
        "document"
      ],
      "type": "object"
    },
    "name": "update_work_item"
  },
  {
    "description": "List available boards in the project",
    "inputSchema": {
      "properties": {
        "team": {
          "description": "Team name (optional)",
          "type": "string"
        }
      },
      "type": "object"
    },
    "name": "get_boards"
  },
  {
    "description": "List all wikis in the project",
    "inputSchema": {
      "properties": {},
      "type": "object"
    },
    "name": "get_wikis"
  },
  {
    "description": "Get a wiki page by path",
    "inputSchema": {
      "properties": {
        "includeContent": {
          "description": "Include page content (optional, defaults to true)",
          "type": "boolean"
        },
        "path": {
          "description": "Page path",
          "type": "string"
        },
        "version": {
          "description": "Version (optional, defaults to main)",
          "type": "string"
        },
        "wikiIdentifier": {
          "description": "Wiki identifier",
          "type": "string"
        }
      },
      "required": [
        "wikiIdentifier",
        "path"
      ],
      "type": "object"
    },
    "name": "get_wiki_page"
  },
  {
    "description": "Create a new wiki",
    "inputSchema": {
      "properties": {
        "mappedPath": {
          "description": "Mapped path (optional, defaults to /)",
          "type": "string"
        },
        "name": {
          "description": "Wiki name",
          "type": "string"
        },
        "projectId": {
          "description": "Project ID (optional, defaults to current project)",
          "type": "string"
        }
      },
      "required": [
        "name"
      ],
      "type": "object"
    },
    "name": "create_wiki"
  },
  {
    "description": "Create or update a wiki page",
    "inputSchema": {
      "properties": {
        "comment": {
          "description": "Comment for the update (optional)",
          "type": "string"
        },
        "content": {
          "description": "Page content in markdown format",
          "type": "string"
        },
        "path": {
          "description": "Page path",
          "type": "string"
        },
        "wikiIdentifier": {
          "description": "Wiki identifier",
          "type": "string"
        }
      },
      "required": [
        "wikiIdentifier",
        "path",
        "content"
      ],
      "type": "object"
    },
    "name": "update_wiki_page"
  },
  {
    "description": "List all projects in the Azure DevOps organization",
    "inputSchema": {
      "properties": {},
      "required": [],
      "type": "object"
    },
    "name": "list_projects"
  },
  {
    "description": "List all pipelines in the project",
    "inputSchema": {
      "properties": {
        "folder": {
          "description": "Filter pipelines by folder path (optional)",
          "type": "string"
        },
        "name": {
          "description": "Filter pipelines by name (optional)",
          "type": "string"
        }
      },
      "type": "object"
    },
    "name": "list_pipelines"
  },
  {
    "description": "Trigger a pipeline run",
    "inputSchema": {
      "properties": {
        "branch": {
          "description": "Branch to run the pipeline on (optional, defaults to default branch)",
          "type": "string"
        },
        "pipelineId": {
          "description": "Pipeline ID to trigger",
          "type": "number"
        },
        "variables": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Pipeline variables to override (optional)",
          "type": "object"
        }
      },
      "required": [
        "pipelineId"
      ],
      "type": "object"
    },
    "name": "trigger_pipeline"
  },
  {
    "description": "List all pull requests in the project",
    "inputSchema": {
      "properties": {
        "creatorId": {
          "description": "Filter by creator ID (optional)",
          "type": "string"
        },
        "repositoryId": {
          "description": "Filter by repository ID (optional)",
          "type": "string"
        },
        "status": {
          "description": "Filter by PR status (active, completed, abandoned)",
          "enum": [
            "active",
            "completed",
            "abandoned"
          ],
          "type": "string"
        }
      },
      "type": "object"
    },
    "name": "list_pull_requests"
  },
  {
    "description": "Create a new pull request",
    "inputSchema": {
      "properties": {
        "description": {
          "description": "Pull request description",
          "type": "string"
        },
        "repositoryId": {
          "description": "Repository ID",
          "type": "string"
        },
        "reviewers": {
          "description": "List of reviewer IDs (optional)",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "sourceRefName": {
          "description": "Source branch name (e.g. refs/heads/feature)",
          "type": "string"
        },
        "targetRefName": {
          "description": "Target branch name (e.g. refs/heads/main)",
          "type": "string"
        },
        "title": {
          "description": "Pull request title",
          "type": "string"
        }
      },
      "required": [
        "repositoryId",
        "sourceRefName",
        "targetRefName",
        "title"
      ],
      "type": "object"
    },
    "name": "create_pull_request"
  },
  {
    "description": "Update an existing pull request",
    "inputSchema": {
      "properties": {
        "description": {
          "description": "New description (optional)",
          "type": "string"
        },
        "mergeStrategy": {
          "description": "Merge strategy (optional)",
          "enum": [
            "squash",
            "rebase",
            "merge"
          ],
          "type": "string"
        },
        "pullRequestId": {
          "description": "Pull Request ID",
          "type": "number"
        },
        "status": {
          "description": "New status (active, abandoned, completed)",
          "enum": [
            "active",
            "abandoned",
            "completed"
          ],
          "type": "string"
        },
        "title": {
          "description": "New title (optional)",
          "type": "string"
        }
      },
      "required": [
        "pullRequestId"
      ],
      "type": "object"
    },
    "name": "update_pull_request"
  }
]