This Bitbucket Server MCP implementation, developed for managing pull requests in Bitbucket Server environments, provides a TypeScript-based interface for AI assistants to interact with Bitbucket Server's API. Built using the Model Context Protocol SDK, it offers tools for creating, retrieving, merging, and declining pull requests, as well as adding comments and fetching diffs. The implementation focuses on streamlining PR workflows, making it easier for AI models to assist in code review processes and PR management. It's particularly useful for development teams using Bitbucket Server who want to integrate AI assistance into their PR workflows, enabling more efficient code reviews, automated PR creation, and status updates without requiring deep knowledge of Bitbucket Server's API intricacies.
No reviews yet. Be the first to review!
Sign in to join the conversation
Discover and explore Bitbucket projects. Lists all accessible projects with their details. Parameters: limit (number, default: 25, max: 1000), start (number, default: 0)
Browse and discover repositories within specific projects or across all accessible projects. Parameters: project (optional), limit (number, default: 25, max: 1000), start (number, default: 0)
Propose code changes for review. Creates a new pull request to submit code changes. Parameters: project (optional), repository (required), title (required), description, sourceBranch (required), targetBranch (required), reviewers, sourceProject, sourceRepository, includeDefaultReviewers (default: true)
Safely update a pull request. Modify the title, description, or reviewers of an existing pull request. Parameters: project (optional), repository (required), prId (required), title, description, reviewers
Retrieves detailed pull request information including status, reviewers, commits, and all metadata. Parameters: project (optional), repository (required), prId (required)
Merges an approved pull request into the target branch. Parameters: project (optional), repository (required), prId (required), message, strategy (default: merge-commit)
Declines a pull request that should not be merged. Parameters: project (optional), repository (required), prId (required), message
Adds comments to pull requests for review feedback, discussions, and collaboration. Parameters: project (optional), repository (required), prId (required), text (required), parentId, state (default: OPEN)
Retrieves the code differences in the pull request. Parameters: project (optional), repository (required), prId (required), contextLines (default: 10), maxLinesPerFile
Fetches review history, approval status, and reviewer feedback for the pull request. No parameters.
Gets the complete activity timeline for a pull request including comments, reviews, commits, and other events. Parameters: project (optional), repository (required), prId (required)
Filters pull request activities to return only the comments. Parameters: project (optional), repository (required), prId (required)
Search across repositories using the Bitbucket search API. Parameters: query (required), project, repository, type, limit (default: 25, max: 100), start (default: 0)
Retrieve the content of specific files from repositories with support for large files through pagination. Parameters: project (optional), repository (required), filePath (required), branch, limit (default: 100, max: 1000), start (default: 0)
Browse files and directories in repositories to understand project organization. Parameters: project (optional), repository (required), path, branch, limit (default: 50)
List pull requests in a repository with filtering by state, author, and direction. Parameters: project (optional), repository (required), state (default: OPEN), author, direction, limit (default: 25, max: 1000), start (default: 0)
List branches in a repository with optional filtering. Parameters: project (optional), repository (required), filterText, limit (default: 25, max: 1000), start (default: 0)
List commits in a repository with optional branch and author filtering. Parameters: project (optional), repository (required), branch, author, limit (default: 25, max: 1000), start (default: 0)
Delete a branch from a repository. Parameters: project (optional), repository (required), branch (required)
Approve a pull request as the current authenticated user. Parameters: project (optional), repository (required), prId (required)
Remove your approval from a pull request. Parameters: project (optional), repository (required), prId (required)
Modify the text of a comment on a pull request. Parameters: project (optional), repository (required), prId (required), commentId (required), text (required), version (required)
Remove a comment from a pull request. Parameters: project (optional), repository (required), prId (required), commentId (required), version (required)
Publish all pending (draft) comments at once. Parameters: project (optional), repository (required), prId (required), commentText, participantStatus
Fetch Code Insights reports and their annotations for a pull request. Parameters: project (optional), repository (required), prId (required)
List pull requests across all repositories for the authenticated user. Parameters: state, role, participantStatus, order, closedSince, limit (default: 25), start (default: 0)