A simple MCP server for adding pull request review functionality for users of bitbucket.
Project description
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:
pip install mcp-bitbucket-review
Configuration in Cursor
-
Go to
File->Preferences->Cursor Settings->MCP & Integrations. -
Add a new MCP server.
-
Add the bitbucket server MCP from the following to the mcpServers object of mcp.json:
{ "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" } } } } -
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:
{
"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
-
Go to https://id.atlassian.com/manage-profile/security/api-tokens
-
Click on button labelled
Create API token with scopes -
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!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_bitbucket_review-0.2.0.tar.gz.
File metadata
- Download URL: mcp_bitbucket_review-0.2.0.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
189f17ee07d6012162f0c297d39768dc495937ca5cc72c4eb0fb24da449699fc
|
|
| MD5 |
a90b816fe191ca027e9f79679262a513
|
|
| BLAKE2b-256 |
99c754a28bcd69fd93344cac1ca0670ba929f7cfdb90b227229836c315e74244
|
File details
Details for the file mcp_bitbucket_review-0.2.0-py3-none-any.whl.
File metadata
- Download URL: mcp_bitbucket_review-0.2.0-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce0ac6c72ebfbd43f21320811ee0aedda38562a91768d60f5f350e8303cbdda2
|
|
| MD5 |
bade242ed6a0131a43eaf000da1c092c
|
|
| BLAKE2b-256 |
7132e25bcc78f86e5507fe6a97a260e54577dd0f5680b25572f485554633e735
|