Cover image
bitbucket-server-mcp-server
Public

bitbucket-server-mcp-server

Try Now
2025-01-28

3 years

Works with Finder

1

Github Watches

4

Github Forks

3

Github Stars

Bitbucket Server MCP

MCP (Model Context Protocol) server for Bitbucket Server Pull Request management. This server provides tools and resources to interact with the Bitbucket Server API through the MCP protocol.

smithery badge Bitbucket Server MCP server

Requirements

  • Node.js >= 16

Installation

Installing via Smithery

To install Bitbucket Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @garc33/bitbucket-server-mcp-server --client claude

Manual Installation

npm install

Build

npm run build

Features

The server provides the following tools for Bitbucket Server integration:

create_pull_request

Creates a new pull request.

Parameters:

  • project: Bitbucket project key (defaults to BITBUCKET_DEFAULT_PROJECT if set)
  • repository (required): Repository slug
  • title (required): PR title
  • description: PR description
  • sourceBranch (required): Source branch name
  • targetBranch (required): Target branch name
  • reviewers: Array of reviewer usernames

get_pull_request

Retrieves detailed information about a specific pull request.

Parameters:

  • project: Bitbucket project key (defaults to BITBUCKET_DEFAULT_PROJECT if set)
  • repository (required): Repository slug
  • prId (required): Pull request ID

merge_pull_request

Merges a pull request.

Parameters:

  • project: Bitbucket project key (defaults to BITBUCKET_DEFAULT_PROJECT if set)
  • repository (required): Repository slug
  • prId (required): Pull request ID
  • message: Merge commit message
  • strategy: One of:
    • merge-commit (default)
    • squash
    • fast-forward

decline_pull_request

Declines a pull request.

Parameters:

  • project: Bitbucket project key (defaults to BITBUCKET_DEFAULT_PROJECT if set)
  • repository (required): Repository slug
  • prId (required): Pull request ID
  • message: Reason for declining

add_comment

Adds a comment to a pull request.

Parameters:

  • project: Bitbucket project key (defaults to BITBUCKET_DEFAULT_PROJECT if set)
  • repository (required): Repository slug
  • prId (required): Pull request ID
  • text (required): Comment text
  • parentId: Parent comment ID for replies

get_diff

Retrieves the diff for a pull request.

Parameters:

  • project: Bitbucket project key (defaults to BITBUCKET_DEFAULT_PROJECT if set)
  • repository (required): Repository slug
  • prId (required): Pull request ID
  • contextLines: Number of context lines (default: 10)

get_reviews

Fetches the review history of a pull request, including approvals and reviews.

Parameters:

  • project: Bitbucket project key (defaults to BITBUCKET_DEFAULT_PROJECT if set)
  • repository (required): Repository slug
  • prId (required): Pull request ID

Dependencies

  • @modelcontextprotocol/sdk - SDK for MCP protocol implementation
  • axios - HTTP client for API requests
  • winston - Logging framework

Configuration

The server requires configuration in the VSCode MCP settings file. Here's a sample configuration:

{
  "mcpServers": {
    "bitbucket": {
      "command": "node",
      "args": ["/path/to/bitbucket-server/build/index.js"],
      "env": {
        "BITBUCKET_URL": "https://your-bitbucket-server.com",
        // Authentication (choose one):
        // Option 1: Personal Access Token
        "BITBUCKET_TOKEN": "your-access-token",
        // Option 2: Username/Password
        "BITBUCKET_USERNAME": "your-username",
        "BITBUCKET_PASSWORD": "your-password",
        // Optional: Default project
        "BITBUCKET_DEFAULT_PROJECT": "your-default-project"
      }
    }
  }
}

Environment Variables

  • BITBUCKET_URL (required): Base URL of your Bitbucket Server instance
  • Authentication (one of the following is required):
    • BITBUCKET_TOKEN: Personal access token
    • BITBUCKET_USERNAME and BITBUCKET_PASSWORD: Basic authentication credentials
  • BITBUCKET_DEFAULT_PROJECT: Default project key to use when not specified in tool calls

Logging

The server logs all operations to bitbucket.log using Winston for debugging and monitoring purposes.

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Andris Teikmanis
  • Latvian GPT assistant for developing GPT applications

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Khalid kalib
  • Write professional emails

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • https://tovuti.be
  • Oede knorrepot die vasthoudt an de goeie ouwe tied van 't boerenleven

  • ANGEL LEON
  • A world class elite tech co-founder entrepreneur, expert in software development, entrepreneurship, marketing, coaching style leadership and aligned with ambition for excellence, global market penetration and worldy perspectives.

  • Gil kaminski
  • Make sure you are post-ready before you post on social media

  • apappascs
  • Discover the most comprehensive and up-to-date collection of MCP servers in the market. This repository serves as a centralized hub, offering an extensive catalog of open-source and proprietary MCP servers, complete with features, documentation links, and contributors.

  • ShrimpingIt
  • Micropython I2C-based manipulation of the MCP series GPIO expander, derived from Adafruit_MCP230xx

  • OffchainLabs
  • Go implementation of Ethereum proof of stake

  • huahuayu
  • A unified API gateway for integrating multiple etherscan-like blockchain explorer APIs with Model Context Protocol (MCP) support for AI assistants.

  • deemkeen
  • control your mbot2 with a power combo: mqtt+mcp+llm

  • zhaoyunxing92
  • 本项目是一个钉钉MCP(Message Connector Protocol)服务,提供了与钉钉企业应用交互的API接口。项目基于Go语言开发,支持员工信息查询和消息发送等功能。

  • pontusab
  • The Cursor & Windsurf community, find rules and MCPs

    Reviews

    2 (1)
    Avatar
    user_cwSUCFi2
    2025-04-16

    As a dedicated user of the bitbucket-server-mcp-server, I am extremely impressed with its capabilities. The seamless integration with Bitbucket and the efficient management of multiple projects make it an invaluable tool for developers. The user-friendly interface and comprehensive documentation by garc33 demonstrate a strong commitment to quality and user experience. Highly recommended!