list_projectsLABSCO SUMMARY
Review without the tab.
The read and write halves are cleanly separable: one environment variable takes the write tools off the surface, which is what makes this safe to hand to an agent or a CI job rather than only to yourself.
What it is
A Node MCP server for a self-hosted Bitbucket Server instance. It covers the pull request lifecycle plus the browsing you do around it: projects, repositories, branches, commits, file contents and code search.
What you get
- Finding the work:
list_projects,list_repositories,list_pull_requestsfiltered by state, author or direction, andget_dashboard_pull_requestsfor everything waiting on you - Reading a PR:
get_pull_request,get_diffwith a per-file line cap,get_reviews,get_activitiesfor the full timeline,get_commentswhen you want only the discussion - Acting on a PR:
create_pull_request,update_pull_request,approve_pull_request,unapprove_pull_request,merge_pull_requestwith a merge strategy,decline_pull_request - Review conversation:
add_comment,edit_comment,delete_comment,publish_reviewfor batched feedback - Code and files:
searchacross projects and repositories with an extension filter,get_file_contentincluding a line range for large files,browse_repositoryfor directory structure - Branches and history:
list_brancheswith default-branch detection,list_commitsfiltered by branch and author,delete_branch get_code_insightsfor CI/CD analysis reports and annotationsBITBUCKET_READ_ONLY=truefilters the write tools out of the surface entirely, leaving browsing, diffs, search and review reading
Requirements
Node.js >= 16, BITBUCKET_URL for your instance, and one credential: BITBUCKET_TOKEN, or BITBUCKET_USERNAME with BITBUCKET_PASSWORD. BITBUCKET_DEFAULT_PROJECT saves passing a project on every call, and any call can override it. BITBUCKET_CUSTOM_HEADERS adds headers to every request for Zero Trust tokens or proxies, and BITBUCKET_LOG_PATH moves the log off its default under your home directory.
Setup effort
Build from source — git clone https://github.com/garc33/bitbucket-server-mcp-server.git
USE CASES
Clearing the reviews waiting on you
Pull every PR across repositories where you are involved, read the diff, and approve or comment without switching repositories.
Reviewing a change properly before merging
Read the diff with a line cap so a generated file does not swamp the output, check who has already reviewed, then merge with the strategy you want.
Finding where a pattern lives across the org
Search code and filenames across projects, then read the exact lines from the files that matched.
Cleaning up after a release
List merged pull requests, list the branches, and delete the ones nothing points at any more.
Working out who changed something and why
Filter commits by branch and author, then read the pull request timeline that carried them.
Handing read-only access to an agent
Set the read-only flag and the write tools stop existing, so a mistaken call errors instead of changing a repository.
26 tools
Listed in project docs. Your client may show a different list.
list_repositoriescreate_pull_requestupdate_pull_requestget_pull_requestmerge_pull_requestdecline_pull_requestadd_commentget_diffget_reviewsget_activitiesget_commentssearchget_file_contentbrowse_repositorylist_pull_requestslist_brancheslist_commitsdelete_branchapprove_pull_requestunapprove_pull_requestedit_commentdelete_commentpublish_reviewget_code_insightsget_dashboard_pull_requestsBEFORE YOU INSTALL
What to know first
Tools you get
26 tools named in the project's documentation.
Requires
Node.js >= 16
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
You clone and build this one yourself.
Server setup
git clone https://github.com/garc33/bitbucket-server-mcp-server.git
cd bitbucket-server-mcp-server
npm install
npm run buildPoint your client's command at node with the absolute path to build/index.js, and set BITBUCKET_URL plus BITBUCKET_TOKEN (or BITBUCKET_USERNAME and BITBUCKET_PASSWORD) in its env
MCP Clients
VS Code
{
"servers": {
"bitbucket": {
"command": "node",
"args": [
"<YOUR_PATH_TO_BITBUCKET_SERVER>/build/index.js"
],
"env": {
"BITBUCKET_URL": "<YOUR_BITBUCKET_URL>",
"BITBUCKET_TOKEN": "<YOUR_BITBUCKET_TOKEN>",
"BITBUCKET_DEFAULT_PROJECT": "<YOUR_BITBUCKET_DEFAULT_PROJECT>"
}
}
}
}