- Home
- MCP servers
- Bitbucket
Bitbucket
- typescript
16
GitHub Stars
typescript
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": {
"pdogra1299-bitbucket-mcp-server": {
"command": "npx",
"args": [
"-y",
"@nexus2520/bitbucket-mcp-server"
],
"env": {
"BITBUCKET_TOKEN": "your-http-access-token",
"BITBUCKET_BASE_URL": "https://bitbucket.yourcompany.com",
"BITBUCKET_USERNAME": "your-username",
"BITBUCKET_APP_PASSWORD": "your-app-password"
}
}
}
}You can use this MCP server to interact with Bitbucket’s APIs for both Bitbucket Cloud and Bitbucket Server. It exposes a rich set of tools to manage pull requests, branches, files, code search, and more from your development environment through a consistent MCP interface.
How to use
You will run this MCP server as a local process or in your environment and configure your MCP client to talk to it. Use the server to retrieve PR details, list PRs, create or update PRs, add comments or reviews, manage branches and commits, search code and repositories, and obtain structured diffs. You can drive these operations by sending tool requests with the required arguments such as workspace, repository, and PR identifiers, then handling the structured results returned by the MCP server.
How to install
Prerequisites: you need Node.js and npm installed on your machine.
Choose an installation method from the following options. All examples below assume you want to run the MCP server locally and connect your MCP client to it.
Option A: Install and run via npx (recommended) with environment credentials for Bitbucket Cloud or Bitbucket Server.
{
"mcpServers": {
"bitbucket": {
"command": "npx",
"args": [
"-y",
"@nexus2520/bitbucket-mcp-server"
],
"env": {
"BITBUCKET_USERNAME": "your-username",
"BITBUCKET_APP_PASSWORD": "your-app-password"
}
}
}
}
For Bitbucket Server, the environment and base URL differ. Use Bitbucket credentials and the server URL.
{
"mcpServers": {
"bitbucket": {
"command": "npx",
"args": [
"-y",
"@nexus2520/bitbucket-mcp-server"
],
"env": {
"BITBUCKET_USERNAME": "your.email@company.com",
"BITBUCKET_TOKEN": "your-http-access-token",
"BITBUCKET_BASE_URL": "https://bitbucket.yourcompany.com"
}
}
}
}
Available tools
get_pull_request
Retrieve detailed information about a pull request including metadata, comments, and merge information.
list_pull_requests
List pull requests with optional filters such as state and author, with pagination support.
create_pull_request
Create new pull requests with title, source and destination branches, and optional description and reviewers.
update_pull_request
Update pull request details like title, description, reviewers, and destination branch.
add_comment
Add general or inline comments to pull requests, including replies and code suggestions.
merge_pull_request
Merge a pull request using available merge strategies.
list_pr_commits
List commits that are part of a pull request.
delete_branch
Delete a branch after merge with optional protection checks.
list_branches
List branches with filtering and pagination.
delete_branch
Delete branches with optional protection checks.
get_branch
Get detailed information about a branch, including associated PRs.
list_branch_commits
List commits in a branch with advanced filtering.
list_directory_content
List files and directories at a repository path.
search_files
Search for files by name or path pattern using glob patterns.
get_file_content
Get file content with smart truncation for large files.
search_code
Search code across repositories (Bitbucket Server only).
search_repositories
Search for repositories by name or description (Bitbucket Server only).
decline_pull_request
Decline/reject a pull request.
delete_comment
Delete a comment from a pull request.
list_pr_tasks
List tasks on a pull request (Bitbucket Server only).
create_pr_task
Create a new task on a pull request.
update_pr_task
Update an existing PR task.
mark_pr_task_done
Mark a PR task as done.
unmark_pr_task_done
Reopen a PR task.
delete_pr_task
Delete a PR task.
convert_comment_to_task
Convert a comment to a task.
convert_task_to_comment
Convert a task back to a comment.