Get the FREE Ultimate OpenClaw Setup Guide →

mcp-bitbucket

MCP server from evrimalacan/mcp-bitbucket-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio evrimalacan-mcp-bitbucket-server npx mcp-bitbucket-server@latest \
  --env BITBUCKET_URL="https://bitbucket.yourcompany.com" \
  --env BITBUCKET_TOKEN="your_personal_access_token"

How to use

This MCP server connects AI assistants to a Bitbucket Server instance, enabling natural language-driven interactions for tasks such as reviewing pull requests, managing repositories, and discovering users. It exposes a set of dedicated tools (an API surface) that allow you to fetch user profiles, list projects and repositories, inspect pull request changes and diffs, and add comments to PRs. Use it to query PRs needing review, retrieve PR activity, or comment inline on code changes, all through your MCP client. The server is authenticated with a Personal Access Token and configured with your Bitbucket Server URL, so ensure your token has the appropriate read/write permissions for the actions you intend to perform. In Claude or other MCP clients, you can add the server configuration and environment variables to enable seamless access to Bitbucket resources.

How to install

Prerequisites:

  • Node.js (recommended LTS) and npm installed on your machine
  • Access to a Bitbucket Server instance with a Personal Access Token

Install and run (from your terminal):

  1. Clone the repository: git clone https://github.com/evrimalacan/mcp-bitbucket-server.git cd mcp-bitbucket-server

  2. Install dependencies: npm install

  3. Build the project (if applicable): npm run build

  4. Run in development mode: npm run dev

  5. Alternatively, use the MCP via npx (as shown in the README): claude mcp add -s user
    bitbucket-server
    npx mcp-bitbucket-server@latest
    -e "BITBUCKET_URL=https://bitbucket.yourcompany.com"
    -e "BITBUCKET_TOKEN=your_personal_access_token"

Additional notes

Tips and common considerations:

  • Ensure your Bitbucket Personal Access Token has the required repository and project permissions for the actions you plan to perform (read vs. write for comments).
  • Set BITBUCKET_URL to the base URL of your Bitbucket Server instance, including the protocol (https://).
  • Store tokens securely; avoid hardcoding tokens in files. Use environment variables or secret managers where possible.
  • If you encounter authentication failures, re-check token scopes and that the token is active.
  • When configuring via MCP client JSON, the type should be 'stdio' to match standard MCP integration patterns.
  • The server exposes 11 MCP tools (under User Management, Projects & Repositories, PR Operations); explore the tool list to determine the right calls for your automation needs.

Related MCP Servers

Sponsor this space

Reach thousands of developers