Get the FREE Ultimate OpenClaw Setup Guide →

bitbucket

MCP Server for interacting with BitBucket API

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio pdogra1299-bitbucket-mcp-server npx -y @nexus2520/bitbucket-mcp-server \
  --env BITBUCKET_USERNAME="your-username" \
  --env BITBUCKET_APP_PASSWORD="your-app-password"

How to use

This MCP server provides a suite of Bitbucket API tools grouped into logical capabilities such as PR management, code review, comments, tasks, commits, branches, file operations, search, and discovery. The server exposes 29 tools across groups like pr_core, pr_comments, pr_review, pr_tasks (Bitbucket Server only), commits, branches, files, search (Server only), and discovery. When running, you can selectively expose these tool groups by configuring BITBUCKET_TOOL_GROUPS, which helps optimize prompt token usage for your LLM. The Bitbucket MCP server supports both Bitbucket Cloud and Bitbucket Server, with behavior differences noted for server-only features and authentication requirements. Use the provided endpoints to fetch PR details, create or update PRs, manage comments and reviews, work with file contents, search code, and discover projects and repositories. If you need a focused workflow, configure BITBUCKET_TOOL_GROUPS to expose only the necessary tool groups (e.g., pr_core, pr_review, and files) to reduce token usage and latency.

How to install

Prerequisites:

  • Node.js and npm installed on your machine (check with node -v and npm -v).
  • Access to the internet to install the MCP server package.

From npm (recommended):

  1. Run the MCP server directly using npx (no local install required): Create a settings snippet like: { "mcpServers": { "bitbucket": { "command": "npx", "args": ["-y", "@nexus2520/bitbucket-mcp-server"], "env": { "BITBUCKET_USERNAME": "your-username", "BITBUCKET_APP_PASSWORD": "your-app-password" } } } }

From source:

  1. Clone or download this repository.
  2. Install dependencies: npm install
  3. Build the TypeScript code: npm run build

Additional notes

Authentication uses Bitbucket App Passwords. Ensure you supply your Bitbucket username and a generated app password (not your normal password). For Bitbucket Server deployments, use your full email address as the username and provide the appropriate BITBUCKET_BASE_URL if required by server tooling. You can control which tools are exposed to the LLM by setting BITBUCKET_TOOL_GROUPS to a comma-separated list of groups (e.g., pr_core,pr_review,files). If BITBUCKET_TOOL_GROUPS is not set, all applicable tools are exposed by default. When using Bitbucket Cloud, server-only tools are automatically hidden regardless of this setting. You can also configure the MCP wrapper to point to a built index.js when running from source by providing the absolute path in the mcpSettings.json like shown in the README.

Related MCP Servers

Sponsor this space

Reach thousands of developers