Skip to main content
Glama
MatanYemini

Bitbucket MCP

by MatanYemini

Bitbucket MCP

Ein Model Context Protocol (MCP)-Server zur Integration mit Bitbucket Cloud und Server-APIs. Dieser MCP-Server ermöglicht KI-Assistenten wie Cursor die Interaktion mit Ihren Bitbucket-Repositories, Pull Requests und anderen Ressourcen.

Sicherheit geht vor

Dies ist ein sicheres und verantwortungsvolles Paket – es werden keine DELETE-Operationen verwendet, sodass kein Risiko eines Datenverlusts besteht. Jeder Pull Request wird mit CodeQL analysiert, um die Sicherheit des Codes zu gewährleisten.

CodeQL GitHub-Repository Lizenz: MIT npm-Version

Related MCP server: Bitbucket MCP Server

Überblick

Schauen Sie sich das offizielle npm-Paket an. Dieser Server implementiert den Model Context Protocol-Standard, um KI-Assistenten Zugriff auf Bitbucket-Daten und -Operationen zu ermöglichen. Es enthält Tools für:

  • Auflisten und Abrufen von Repositories

  • Abrufen von Repository-Details

  • Abrufen von Pull Requests

  • Und mehr...

Installation

Verwendung von NPX (empfohlen)

Am einfachsten lässt sich dieser MCP-Server über NPX verwenden. Dadurch können Sie ihn ausführen, ohne ihn global zu installieren:

# Run with environment variables
BITBUCKET_URL="https://bitbucket.org/your-workspace" \
BITBUCKET_USERNAME="your-username" \
BITBUCKET_PASSWORD="your-app-password" \
npx -y bitbucket-mcp@latest

Manuelle Installation

Alternativ können Sie es global oder als Teil Ihres Projekts installieren:

# Install globally
npm install -g bitbucket-mcp

# Or install in your project
npm install bitbucket-mcp

Führen Sie es dann mit folgendem Befehl aus:

# If installed globally
BITBUCKET_URL="https://bitbucket.org/your-workspace" \
BITBUCKET_USERNAME="your-username" \
BITBUCKET_PASSWORD="your-app-password" \
bitbucket-mcp

# If installed in your project
BITBUCKET_URL="https://bitbucket.org/your-workspace" \
BITBUCKET_USERNAME="your-username" \
BITBUCKET_PASSWORD="your-app-password" \
npx bitbucket-mcp

Konfiguration

Umgebungsvariablen

Konfigurieren Sie den Server mit den folgenden Umgebungsvariablen:

Variable

Beschreibung

Erforderlich

BITBUCKET_URL

Bitbucket-Basis-URL (z. B. „ https://bitbucket.org/your-workspace “)

Ja

BITBUCKET_USERNAME

Ihr Bitbucket-Benutzername

Ja*

BITBUCKET_PASSWORD

Ihr Bitbucket-App-Passwort

Ja*

BITBUCKET_TOKEN

Ihr Bitbucket-Zugriffstoken (Alternative zu Benutzername/Passwort)

NEIN

BITBUCKET_WORKSPACE

Zu verwendender Standardarbeitsbereich, wenn nicht angegeben

NEIN

* Es müssen entweder BITBUCKET_TOKEN oder sowohl BITBUCKET_USERNAME als auch BITBUCKET_PASSWORD angegeben werden.

Erstellen eines Bitbucket-App-Passworts

  1. Melden Sie sich bei Ihrem Bitbucket-Konto an

  2. Gehen Sie zu Persönliche Einstellungen > App-Passwörter

  3. Erstellen Sie ein neues App-Passwort mit den folgenden Berechtigungen:

    • Repositories: Lesen

    • Pull Requests: Lesen, Schreiben

  4. Kopieren Sie das generierte Passwort und verwenden Sie es als Umgebungsvariable BITBUCKET_PASSWORD

Integration mit Cursor

So integrieren Sie diesen MCP-Server mit Cursor:

  1. Cursor öffnen

  2. Gehen Sie zu Einstellungen > Erweiterungen

  3. Klicken Sie auf „Model Context Protocol“

  4. Fügen Sie eine neue MCP-Konfiguration hinzu:

"bitbucket": {
  "command": "npx",
  "env": {
    "BITBUCKET_URL": "https://bitbucket.org/your-workspace",
    "BITBUCKET_USERNAME": "your-username",
    "BITBUCKET_PASSWORD": "your-app-password"
  },
  "args": ["-y", "bitbucket-mcp@latest"]
}
  1. Speichern der Konfiguration

  2. Verwenden Sie den Befehl "/bitbucket" im Cursor, um auf Bitbucket-Repositorys und Pull-Anfragen zuzugreifen

Verwenden eines lokalen Builds mit Cursor

Wenn Sie lokal entwickeln und Ihre Änderungen testen möchten:

"bitbucket-local": {
  "command": "node",
  "env": {
    "BITBUCKET_URL": "https://bitbucket.org/your-workspace",
    "BITBUCKET_USERNAME": "your-username",
    "BITBUCKET_PASSWORD": "your-app-password"
  },
  "args": ["/path/to/your/local/bitbucket-mcp/dist/index.js"]
}

Verfügbare Tools

Dieser MCP-Server bietet Tools für die Interaktion mit Bitbucket-Repositories und Pull Requests. Nachfolgend finden Sie eine umfassende Liste der verfügbaren Operationen:

Repository-Operationen

listRepositories

Listet Repositories in einem Arbeitsbereich auf.

Parameter:

  • workspace (optional): Name des Bitbucket-Arbeitsbereichs

  • limit (optional): Maximale Anzahl der zurückzugebenden Repositories

getRepository

Ruft Details zu einem bestimmten Repository ab.

Parameter:

  • workspace : Name des Bitbucket-Arbeitsbereichs

  • repo_slug : Repository-Slug

Pull Request-Vorgänge

getPullRequests

Ruft Pull Requests für ein Repository ab.

Parameter:

  • workspace : Name des Bitbucket-Arbeitsbereichs

  • repo_slug : Repository-Slug

  • state (optional): Status der Pull-Anfrage ( OPEN , MERGED , DECLINED , SUPERSEDED )

  • limit (optional): Maximale Anzahl der zurückzugebenden Pull Requests

createPullRequest

Erstellt eine neue Pull-Anfrage.

Parameter:

  • workspace : Name des Bitbucket-Arbeitsbereichs

  • repo_slug : Repository-Slug

  • title : Pull-Request-Titel

  • description : Pull-Request-Beschreibung

  • sourceBranch : Name des Quellzweigs

  • targetBranch : Name des Zielzweigs

  • reviewers (optional): Liste der Benutzernamen der Gutachter

getPullRequest

Ruft Details zu einer bestimmten Pull-Anfrage ab.

Parameter:

  • workspace : Name des Bitbucket-Arbeitsbereichs

  • repo_slug : Repository-Slug

  • pull_request_id : Pull-Request-ID

updatePullRequest

Aktualisiert eine Pull-Anfrage.

Parameter:

  • workspace : Name des Bitbucket-Arbeitsbereichs

  • repo_slug : Repository-Slug

  • pull_request_id : Pull-Request-ID

  • Verschiedene optionale Update-Parameter (Titel, Beschreibung usw.)

getPullRequestActivity

Ruft das Aktivitätsprotokoll für eine Pull-Anfrage ab.

Parameter:

  • workspace : Name des Bitbucket-Arbeitsbereichs

  • repo_slug : Repository-Slug

  • pull_request_id : Pull-Request-ID

approvePullRequest

Genehmigt eine Pull-Anfrage.

Parameter:

  • workspace : Name des Bitbucket-Arbeitsbereichs

  • repo_slug : Repository-Slug

  • pull_request_id : Pull-Request-ID

unapprovePullRequest

Entfernt eine Genehmigung aus einer Pull-Anfrage.

Parameter:

  • workspace : Name des Bitbucket-Arbeitsbereichs

  • repo_slug : Repository-Slug

  • pull_request_id : Pull-Request-ID

declinePullRequest

Lehnt eine Pull-Anfrage ab.

Parameter:

  • workspace : Name des Bitbucket-Arbeitsbereichs

  • repo_slug : Repository-Slug

  • pull_request_id : Pull-Request-ID

  • message (optional): Grund für die Ablehnung

mergePullRequest

Führt eine Pull-Anfrage zusammen.

Parameter:

  • workspace : Name des Bitbucket-Arbeitsbereichs

  • repo_slug : Repository-Slug

  • pull_request_id : Pull-Request-ID

  • message (optional): Merge-Commit-Nachricht

  • strategy (optional): Merge-Strategie ( merge-commit , squash , fast-forward )

requestChanges

Fordert Änderungen an einer Pull-Anfrage an.

Parameter:

  • workspace : Name des Bitbucket-Arbeitsbereichs

  • repo_slug : Repository-Slug

  • pull_request_id : Pull-Request-ID

removeChangeRequest

Entfernt eine Änderungsanforderung aus einer Pull-Anforderung.

Parameter:

  • workspace : Name des Bitbucket-Arbeitsbereichs

  • repo_slug : Repository-Slug

  • pull_request_id : Pull-Request-ID

Pull Request-Kommentarvorgänge

getPullRequestComments

Listet Kommentare zu einer Pull-Anfrage auf.

Parameter:

  • workspace : Name des Bitbucket-Arbeitsbereichs

  • repo_slug : Repository-Slug

  • pull_request_id : Pull-Request-ID

createPullRequestComment

Erstellt einen Kommentar zu einer Pull-Anfrage.

Parameter:

  • workspace : Name des Bitbucket-Arbeitsbereichs

  • repo_slug : Repository-Slug

  • pull_request_id : Pull-Request-ID

  • content : Kommentarinhalt

  • inline (optional): Inline-Kommentarinformationen

getPullRequestComment

Ruft einen bestimmten Kommentar zu einer Pull-Anfrage ab.

Parameter:

  • workspace : Name des Bitbucket-Arbeitsbereichs

  • repo_slug : Repository-Slug

  • pull_request_id : Pull-Request-ID

  • comment_id : Kommentar-ID

updatePullRequestComment

Aktualisiert einen Kommentar zu einer Pull-Anfrage.

Parameter:

  • workspace : Name des Bitbucket-Arbeitsbereichs

  • repo_slug : Repository-Slug

  • pull_request_id : Pull-Request-ID

  • comment_id : Kommentar-ID

  • content : Aktualisierter Kommentarinhalt

deletePullRequestComment

Löscht einen Kommentar zu einer Pull-Anfrage.

Parameter:

  • workspace : Name des Bitbucket-Arbeitsbereichs

  • repo_slug : Repository-Slug

  • pull_request_id : Pull-Request-ID

  • comment_id : Kommentar-ID

resolveComment

Löst einen Kommentarthread zu einer Pull-Anfrage auf.

Parameter:

  • workspace : Name des Bitbucket-Arbeitsbereichs

  • repo_slug : Repository-Slug

  • pull_request_id : Pull-Request-ID

  • comment_id : Kommentar-ID

reopenComment

Öffnet einen aufgelösten Kommentarthread zu einer Pull-Anfrage erneut.

Parameter:

  • workspace : Name des Bitbucket-Arbeitsbereichs

  • repo_slug : Repository-Slug

  • pull_request_id : Pull-Request-ID

  • comment_id : Kommentar-ID

Pull Request-Diff-Operationen

getPullRequestDiff

Ruft den Diff für eine Pull-Anfrage ab.

Parameter:

  • workspace : Name des Bitbucket-Arbeitsbereichs

  • repo_slug : Repository-Slug

  • pull_request_id : Pull-Request-ID

getPullRequestDiffStat

Ruft die Diff-Statistiken für eine Pull-Anfrage ab.

Parameter:

  • workspace : Name des Bitbucket-Arbeitsbereichs

  • repo_slug : Repository-Slug

  • pull_request_id : Pull-Request-ID

getPullRequestPatch

Ruft den Patch für eine Pull-Anfrage ab.

Parameter:

  • workspace : Name des Bitbucket-Arbeitsbereichs

  • repo_slug : Repository-Slug

  • pull_request_id : Pull-Request-ID

Pull Request-Task-Vorgänge

getPullRequestTasks

Listet Aufgaben in einer Pull-Anfrage auf.

Parameter:

  • workspace : Name des Bitbucket-Arbeitsbereichs

  • repo_slug : Repository-Slug

  • pull_request_id : Pull-Request-ID

createPullRequestTask

Erstellt eine Aufgabe für eine Pull-Anfrage.

Parameter:

  • workspace : Name des Bitbucket-Arbeitsbereichs

  • repo_slug : Repository-Slug

  • pull_request_id : Pull-Request-ID

  • content : Aufgabeninhalt

  • comment (optional): Kommentar-ID, die der Aufgabe zugeordnet werden soll

  • pending (optional): Ob die Aufgabe aussteht

getPullRequestTask

Ruft eine bestimmte Aufgabe für eine Pull-Anfrage ab.

Parameter:

  • workspace : Name des Bitbucket-Arbeitsbereichs

  • repo_slug : Repository-Slug

  • pull_request_id : Pull-Request-ID

  • task_id : Aufgaben-ID

updatePullRequestTask

Aktualisiert eine Aufgabe bei einer Pull-Anfrage.

Parameter:

  • workspace : Name des Bitbucket-Arbeitsbereichs

  • repo_slug : Repository-Slug

  • pull_request_id : Pull-Request-ID

  • task_id : Aufgaben-ID

  • content (optional): Aktualisierter Aufgabeninhalt

  • state (optional): Aktualisierter Aufgabenstatus

deletePullRequestTask

Löscht eine Aufgabe in einer Pull-Anfrage.

Parameter:

  • workspace : Name des Bitbucket-Arbeitsbereichs

  • repo_slug : Repository-Slug

  • pull_request_id : Pull-Request-ID

  • task_id : Aufgaben-ID

Andere Pull Request-Operationen

getPullRequestCommits

Listet Commits zu einem Pull Request auf.

Parameter:

  • workspace : Name des Bitbucket-Arbeitsbereichs

  • repo_slug : Repository-Slug

  • pull_request_id : Pull-Request-ID

getPullRequestStatuses

Listet Commit-Status für eine Pull-Anfrage auf.

Parameter:

  • workspace : Name des Bitbucket-Arbeitsbereichs

  • repo_slug : Repository-Slug

  • pull_request_id : Pull-Request-ID

Entwicklung

Voraussetzungen

  • Node.js 18 oder höher

  • npm oder yarn

Aufstellen

# Clone the repository
git clone https://github.com/MatanYemini/bitbucket-mcp.git
cd bitbucket-mcp

# Install dependencies
npm install

# Build the project
npm run build

# Run in development mode
npm run dev

Lizenz

Dieses Projekt ist unter der MIT-Lizenz lizenziert – Einzelheiten finden Sie in der Datei LICENSE .

Available Tools

3 tools
getPullRequestsD
ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of pull requests to return
repo_slugYesRepository slug
stateNoPull request state
workspaceYesBitbucket workspace name

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

getRepositoryD
ParametersJSON Schema
NameRequiredDescriptionDefault
repo_slugYesRepository slug
workspaceYesBitbucket workspace name

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

listRepositoriesD
ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of repositories to return
workspaceNoBitbucket workspace name

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 3 tool updatesv1.0.0
    • First observedgetPullRequests
    • First observedgetRepository
    • First observedlistRepositories

TDQS

D1.6/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: getPullRequests retrieves pull requests, getRepository fetches a specific repository, and listRepositories lists all repositories. There is no overlap or ambiguity between these operations.

Naming Consistency4/5

The tools follow a consistent verb_noun pattern (getPullRequests, getRepository, listRepositories), but there is a minor deviation in verb choice between 'get' and 'list'. This is still highly readable and predictable.

Tool Count2/5

With only 3 tools, the server feels thin for a Bitbucket integration, lacking essential operations like creating or updating repositories, managing pull requests (e.g., create, merge), or handling issues. The scope is incomplete for typical version control workflows.

Completeness1/5

The tool surface is severely incomplete for a Bitbucket server, missing core CRUD operations (e.g., create_repository, update_pull_request, delete_branch) and lifecycle management. Agents will face dead ends when trying to perform basic tasks like modifying repositories or pull requests.

Maintenance

ActivityInactive
ResponsivenessUnresponsive

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MatanYemini/bitbucket-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server