MCP ExplorerExplorer

Garc33 Bitbucket Server Mcp Server

@MCP-Mirroron 10 months ago
1 MIT
FreeCommunity
AI Systems
Mirror of https://github.com/garc33/bitbucket-server-mcp-server

Overview

What is Garc33 Bitbucket Server Mcp Server

garc33_bitbucket-server-mcp-server is a Model Context Protocol (MCP) server designed for managing pull requests in Bitbucket Server. It provides tools and resources to interact with the Bitbucket Server API using the MCP protocol.

Use cases

Use cases include automating the pull request creation process, integrating pull request management into CI/CD pipelines, facilitating code reviews by adding comments, and managing pull request merges and declines programmatically.

How to use

To use garc33_bitbucket-server-mcp-server, first ensure you have Node.js version 16 or higher installed. Then, install the necessary dependencies by running ‘npm install’. After installation, you can build the server with ‘npm run build’ and start using its features for pull request management.

Key features

Key features include creating new pull requests, retrieving pull request details, merging pull requests, declining pull requests, adding comments, and retrieving diffs for pull requests. Each feature requires specific parameters such as project key, repository slug, and pull request ID.

Where to use

garc33_bitbucket-server-mcp-server is primarily used in software development environments where Bitbucket Server is utilized for version control and collaboration. It is suitable for teams that need to manage pull requests efficiently.

Content

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.

Requirements

  • Node.js >= 16

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 (required): Bitbucket project key
  • 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 (required): Bitbucket project key
  • repository (required): Repository slug
  • prId (required): Pull request ID

merge_pull_request

Merges a pull request.

Parameters:

  • project (required): Bitbucket project key
  • 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 (required): Bitbucket project key
  • repository (required): Repository slug
  • prId (required): Pull request ID
  • message: Reason for declining

add_comment

Adds a comment to a pull request.

Parameters:

  • project (required): Bitbucket project key
  • 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 (required): Bitbucket project key
  • 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 (required): Bitbucket project key
  • 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:

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

Logging

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

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers