MCP.so
Sign In
Servers

Bitbucket MCP Server

@pdogra1299

MCP Server for interacting with BitBucket API

Overview

What is Bitbucket MCP Server?

A Model Context Protocol server that provides 29 tools for interacting with the Bitbucket API, supporting both Bitbucket Cloud and Bitbucket Server. It is designed for developers using AI assistants to manage pull requests, code reviews, branches, files, and code search.

How to use Bitbucket MCP Server?

Install via npx -y @nexus2520/bitbucket-mcp-server or from source. Configure the server in your MCP settings file with environment variables (BITBUCKET_USERNAME, BITBUCKET_APP_PASSWORD for Cloud; for Server additionally BITBUCKET_TOKEN and BITBUCKET_BASE_URL). Optionally set BITBUCKET_TOOL_GROUPS to expose only desired tool groups. Then invoke any of the 29 tools (e.g., get_pull_request, search_code).

Key features of Bitbucket MCP Server

  • 29 tools covering PRs, comments, attachments, reviews, tasks, commits, branches, files, search, and discovery.
  • Supports both Bitbucket Cloud and Bitbucket Server.
  • Tool group filtering reduces token usage by exposing only needed tools.
  • Bitbucket Cloud automatically hides server-only tools.
  • Structured diffs, inline comments, nested replies, and merge commit details.
  • Code search with index-backed search, file content search with regex, and repository search.

Use cases of Bitbucket MCP Server

  • Review pull requests, approve, request changes, and manage comments.
  • Explore repository code via file browsing, blame, and content search.
  • Manage branches: list, get details, and delete.
  • Search code across repositories with language/extension filters and regex.
  • Automate PR workflows: create, update, merge, and decline.

FAQ from Bitbucket MCP Server

How do I authenticate for Bitbucket Cloud?

Use BITBUCKET_USERNAME (your username, not email) and BITBUCKET_APP_PASSWORD (an app password with Account: Read, Repositories: Read/Write, Pull requests: Read/Write). You generate the app password at https://bitbucket.org/account/settings/app-passwords/.

What platforms does Bitbucket MCP Server support?

It supports both Bitbucket Cloud (bitbucket.org) and self-hosted Bitbucket Server. Some tools (attachments, tasks, blame, and code search) are available only for Bitbucket Server.

How can I reduce the number of tools sent to the LLM?

Set the environment variable BITBUCKET_TOOL_GROUPS to a comma-separated list of group names (e.g., pr_core,pr_review,files). Only tools in the listed groups will be exposed. This reduces token consumption.

Can I install Bitbucket MCP Server without npx?

Yes, you can clone the repository, run npm install, build with npm run build, and then point the MCP client at the built build/index.js file. Use the same environment variables.

What is the difference between search_code and find_in_files?

search_code uses Bitbucket Server's search index for fast exact‑term searches (no regex). find_in_files performs content search via file listing and raw‑content fan‑out, supporting full PCRE regex and working on languages or branches not covered by the index.

Tags

More from Version Control