Skip to main content
Glama
README.md
# MCP Bitbucket Review Server

This is an MCP server for LLMs to use capabilities of bitbucket to it's code review workflows.

## Installation

> [!IMPORTANT]  
> You need python 3.10 or above for this to work.

Install from pip:

```bash
pip install mcp-bitbucket-review
```

## Configuration in Cursor

1.  Go to `File` -> `Preferences` -> `Cursor Settings` -> `MCP & Integrations`.

2.  Add a new MCP server.

3.  Add the bitbucket server MCP from the following to the mcpServers object of mcp.json:
    ```jsonc
    {
        "mcpServers": {
            // ... your rest of the MCP servers
            "bitbucket": {
                "command": "mcp-bitbucket-review-server",
                "env": {
                    "BITBUCKET_EMAIL": "YOUR_BITBUCKET_EMAIL",
                    "BITBUCKET_API_TOKEN": "YOUR_BITBUCKET_API_TOKEN"
                }
            }
        }
    }

4.  Save the settings.

## Usage sample

Open new chat and give following prompt:

> Review pull request <YOUR_PULL_REQUEST_URL>


## Code Review Checklist

You can provide a custom code review checklist to be used during the review process. The checklist is read from a file and can have both general guidelines and guidelines specific to each repository.

### Checklist file structure

The checklist file is a plain text file with sections for each repository. A section starts with the repository name in square brackets (e.g., `[my-repo]`). A special section named `[general]` can be used for guidelines that apply to all repositories.

Here is an example of a checklist file:

```
[general]
Ensure code is well-documented.
Check for any commented-out code that should be removed.

[my-awesome-repo]
Follow the "Awesome Repo" coding style.
Make sure to update the `awesome-spec.json` file.

[another-repo]
All new features must be covered by integration tests.
```

### Configuration

To use the checklist, you need to set the `BITBUCKET_CODE_REVIEW_CHECKLIST` environment variable to the absolute path of your checklist file.

You can add this to your `mcp.json` configuration file:

```jsonc
{
    "mcpServers": {
        // ... your rest of the MCP servers
        "bitbucket": {
            "command": "mcp-bitbucket-review-server",
            "env": {
                // ... other environment variables
                "BITBUCKET_CODE_REVIEW_CHECKLIST": "C:\\path\\to\\your\\checklist.txt"
            }
        }
    }
}
```

## Get API token from bitbucket

1. Go to https://id.atlassian.com/manage-profile/security/api-tokens

2. Click on button labelled `Create API token with scopes`

3. Give scopes and store the API token. Make sure you give the following scopes to the API token:
    ```
    read:pullrequest:bitbucket
    write:pullrequest:bitbucket
    read:repository:bitbucket
    ```

Happy coding!

TDQS

A3.7/5.0

Scored across 5 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: credentials, diff, checklist, PR details, and URL parsing. No overlap or ambiguity.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern with underscores, e.g., get_bitbucket_pr_diff, parse_bitbucket_pr_url. No mixing of conventions.

Tool Count4/5

With 5 tools, the set is slightly minimal but still reasonable for focused Bitbucket PR-related tasks. Could include more operations like listing PRs.

Completeness3/5

The tools cover credential retrieval, diff, review guidelines, PR details, and URL parsing, but lack essential CRUD operations like creating or updating PRs, listing PRs, or commenting.

Maintenance

ActivityInactive
ResponsivenessNo issues