- Home
- MCP servers
- Bitbucket
Bitbucket
- javascript
1
GitHub Stars
javascript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"mcp-mirror-garc33_bitbucket-server-mcp-server": {
"command": "node",
"args": [
"/path/to/bitbucket-server/build/index.js"
],
"env": {
"BITBUCKET_URL": "https://your-bitbucket-server.com",
"BITBUCKET_TOKEN": "your-access-token",
"BITBUCKET_PASSWORD": "your-password",
"BITBUCKET_USERNAME": "your-username"
}
}
}
}You use this MCP server to manage Bitbucket Server pull requests by interacting with the Bitbucket Server API through the MCP protocol. It gives you programmatic control to create, inspect, update, and annotate pull requests, retrieve diffs and reviews, and manage comments directly from MCP clients.
How to use
You connect an MCP client to the Bitbucket MCP server to perform pull request operations programmatically. Use the client to create new pull requests, fetch details for existing ones, merge or decline PRs, add comments, retrieve diffs, and review histories. Each operation maps to a specific tool you can invoke via the MCP protocol. Ensure your client has access to the Bitbucket Server instance and that you provide the required project keys, repository slugs, and PR identifiers when invoking the tools.
Common usage patterns include creating a PR with a title and description from a feature branch to a target branch, adding reviewers, and then polling for reviews or approvals. You can also fetch the diff for review, attach comments to specific lines or threads, and apply a merge strategy when finalizing the PR. Use the tool names exactly as exposed by the MCP server to ensure the correct operation is invoked by your client.
How to install
Prerequisites: you need Node.js version 16 or newer installed on your machine.
Install dependencies for the MCP server project.
Build the server so it is ready to run.
Run the MCP server so it is reachable by your MCP client.
Configuration and usage notes
Configure the MCP server to start with the Bitbucket Server integration by providing the runtime command and environment variables. The example configuration below shows how to run the server as a local process using Node.js and a built index file. It also demonstrates the required connection details to Bitbucket Server and the supported authentication methods.
{
"mcpServers": {
"bitbucket": {
"command": "node",
"args": ["/path/to/bitbucket-server/build/index.js"],
"env": {
"BITBUCKET_URL": "https://your-bitbucket-server.com",
// Authentication (choose one):
// Option 1: Personal Access Token
"BITBUCKET_TOKEN": "your-access-token",
// Option 2: Username/Password
"BITBUCKET_USERNAME": "your-username",
"BITBUCKET_PASSWORD": "your-password"
}
}
}
}
Available tools
create_pull_request
Creates a new pull request in the specified project/repository with the given title, description, source branch, target branch, and optional reviewers.
get_pull_request
Retrieves detailed information for a specific pull request by project, repository, and PR ID.
merge_pull_request
Merges a pull request using a chosen strategy (merge-commit, squash, fast-forward) and optional merge message.
decline_pull_request
Declines a pull request with an optional decline message.
add_comment
Adds a comment to a pull request and supports replies through a parent comment ID.
get_diff
Retrieves the diff for a pull request, with configurable context lines.
get_reviews
Fetches the review history for a pull request, including approvals and reviews.