Logo di Bitbucket MCP Server

Bitbucket MCP Server

Community
pdogra1299

MCP Server for interacting with BitBucket API

Autorepdogra1299
Repositorybitbucket-mcp-server
LinguaTypeScript
Fork
26
Stelle
28
Strumenti disponibili
0
Tipo di trasportostdio
Categorie
LicenzaMIT
Link
  • Collega gli strumenti ai flussi di lavoro IA

    Bitbucket MCP Server mette a disposizione funzionalità MCP utilizzabili da client e agenti IA compatibili.

  • 0 strumenti disponibili

    Esplora le azioni richiamabili qui sotto, con nomi e descrizioni quando forniti dal server.

  • Configurazione pronta da copiare

    Usa gli esempi di installazione per configurare questo server nel tuo client MCP preferito.

  • Indicatori di interesse open source

    28 stelle e 26 fork nel repository collegato.

Bitbucket MCP Server

npm version License: MIT

MCP server for Bitbucket — built for AI coding agents that need to work with remote repositories as if they were local clones: grep-fast code search, windowed file reads, compact token-efficient responses, and a transport layer that never trips Bitbucket's rate limits.

Supports Bitbucket Server / Data Center (primary target) and Bitbucket Cloud.

Why v3

v2v3
Content search in a repo1 listing + up to 3,000 file GETs1 archive call cold, 0–1 calls warm
Search completenesssilently partial under server throttlingcomplete, with every cap reported
PR diff tokensper-line JSON (~4× larger)raw unified diff
Read a 100-line window2 calls, full file transferred1 call, window only
Blame a window of a huge fileup to 100 calls1 call
Rate-limit safetynone (burst → 429/403)client-side pacing sized to DC's limiter
Tools3325 (~30% less definition context)

Measured on a live Data Center instance: a repeated content search went from 519 API calls / ~7s (finding 1 of 8 real matches under burst throttling) to 0 API calls / 24ms finding all 8. Full design and verified API research: REVAMP_PLAN.md.

Tools (25)

Search (search) — Server/DC only

  • grep — search file contents with full regex, any branch, like ripgrep on a local clone. One archive download per repo+commit, streamed in constant memory, cached in-process, freshness-checked every call (responses carry as_of <commit>). Omit query for filename-only glob listing. Modes: content, files, count; glob, path, context, case_insensitive, max_results.
  • search_code — index-backed exact-term search across a whole project in one call (default branch only, case-insensitive, no regex, files <512 KiB, ~1000-result window). Best for cross-repo identifier lookups; use grep for everything else.
  • search_repositories — find repos by name/description.

Pull requests (pr_core)

  • get_pull_request — metadata + reviewer status + merge info in 1 call; include_comments / include_file_changes (default true), include_tasks, comment_limit. Returns version for follow-up mutations.
  • list_pull_requests — repo-scoped; omit repository (Server) for your PRs across all repos in one call (role filter).
  • create_pull_request, update_pull_request, merge_pull_request, decline_pull_request — all mutations accept version from a prior read (saves a fetch; auto-refetch + retry once on 409 conflicts).

Comments & tasks (pr_comments)

  • add_comment — general, threaded reply, inline (file_path + line_number, or code_snippet auto-resolution), code suggestion, or task (severity: "BLOCKER", Server). Attachments upload via the attachments param (Server).
  • manage_comment — edit / delete / resolve / reopen / to_task / to_comment on any comment or task, one call with version.

Review (pr_review)

  • get_pull_request_diff — raw unified diff text; scope with file_path (server-side), include_patterns/exclude_patterns, context_lines, ignore_whitespace.
  • set_review_status — APPROVED / NEEDS_WORK / UNAPPROVED (mutually exclusive; one call).

Commits (commits)

  • list_pr_commits, list_branch_commits (server-side since-rev/merges filters; bounded page-walk for client-side author/until/search), get_commit_detail (unified diff, or detail: "files" for the changed-file list without bodies).

Branches (branches)

  • list_branches, get_branch (branch + its PRs), delete_branch (expected_head skips the lookup call).

Files (files)

  • get_file_content — windowed server-side: start_line/line_count transfer only that window (≤5000 lines/call). full_content / negative start_line for whole-file or tail reads.
  • get_file_blame — commit-span blame for a line window in 1 call (Server).
  • list_directory_content — paginated, compact.

Attachments (attachments, Server) / Discovery (discovery)

  • manage_attachments (download capped, delete), list_projects, list_repositories.

Output conventions

  • Bulk content (diffs, files, grep results) is plain text, not JSON-escaped strings; lists are compact JSON without pretty-printing. Dates are ISO-8601.
  • Content-derived responses carry as_of <commit> so the agent knows exactly which state it saw.
  • Truncation is never silent — every cap produces an explicit warning with continuation guidance (next_start, "narrow the glob", etc.).
  • Mutable entities include version, so mutations don't need a re-read.

Installation

Using npx (recommended)

json
{
  "mcpServers": {
    "bitbucket": {
      "command": "npx",
      "args": ["-y", "@nexus2520/bitbucket-mcp-server"],
      "env": {
        "BITBUCKET_USERNAME": "your.username",
        "BITBUCKET_TOKEN": "your-http-access-token",
        "BITBUCKET_BASE_URL": "https://bitbucket.yourcompany.com"
      }
    }
  }
}

For Bitbucket Cloud use BITBUCKET_APP_PASSWORD instead of BITBUCKET_TOKEN (and omit BITBUCKET_BASE_URL).

Credential walkthroughs: Cloud app password · Server/DC HTTP token.

From source

bash
git clone https://github.com/pdogra1299/bitbucket-mcp-server.git
cd bitbucket-mcp-server
npm install && npm run build
# point your MCP config at: node <repo>/build/index.js

Configuration

Every numeric policy is environment-tunable — nothing is hard-coded. The full table lives in src/config/index.ts (CONFIG_REFERENCE). The ones that matter most:

VariableDefaultPurpose
BITBUCKET_RATE_LIMIT_RPS5Client-side sustained request rate (DC's per-user refill is 5/s). 0 disables pacing — set this if your account has an admin rate-limit exemption
BITBUCKET_RATE_LIMIT_BURST50Burst capacity (DC's server bucket is 60)
BITBUCKET_GLOBAL_MAX_CONCURRENCY8Max in-flight requests across all tools
BITBUCKET_SNAPSHOT_MAX_MB256In-memory grep cache budget. 0 = pure streaming (no retention, still 2 calls per search)
BITBUCKET_SNAPSHOT_MAX_FILE_KB2048Files larger than this are scanned but not cached
BITBUCKET_REF_RESOLVE_TTL_MS15000Branch→SHA freshness memo; 0 = validate on every single call
BITBUCKET_STREAM_ABORT_MB2048Abort archive scans past this many extracted MB (falls back to bounded per-file scan)
BITBUCKET_HTTP_TIMEOUT_MS30000Per-request timeout
BITBUCKET_TOOL_GROUPSallComma-separated groups to expose (validated, enforced at dispatch, fails closed)

The grep engine's guarantees

  • Memory-bounded: the archive is streamed, never buffered whole; the cache is a hard byte budget with LRU eviction and content-hash dedup across branches. Worst case = budget + a few MB transient.
  • Fresh: every query re-resolves the branch head; a moved branch can never serve stale results. Merges/deletes made through this server invalidate immediately.
  • Complete: cache limits never reduce scan coverage — oversized files are still scanned; only true binaries are skipped, and they're counted in the output.

Rate limiting

All requests flow through a token bucket sized to Bitbucket DC's per-user limiter, so 429s are avoided rather than retried-after. If your instance throttles hard anyway, the error message says exactly what to do — the durable fix is asking a Bitbucket admin for a rate-limit exemption for the service account (Admin → Rate limiting → Exemptions), then setting BITBUCKET_RATE_LIMIT_RPS=0.

Migrating from v2

Removed tools and their v3 equivalents (same capabilities, fewer tools):

v2v3
find_in_filesgrep with query
search_filesgrep without query (use glob)
list_pr_tasksget_pull_request + include_tasks: true
create_pr_taskadd_comment + severity: "BLOCKER"
update_pr_taskmanage_comment action: "edit"
delete_pr_task, delete_commentmanage_comment action: "delete"
set_pr_task_statusmanage_comment action: "resolve" / "reopen"
convert_pr_itemmanage_comment action: "to_task" / "to_comment"
set_pr_approvalset_review_status status: "APPROVED" / "UNAPPROVED"

Update Claude Code permission allowlists (mcp__bitbucket__*) accordingly. Diff tools now return unified diff text instead of per-line JSON — line numbers come from @@ headers. Full details in CHANGELOG.md.

Development

bash
npm run build   # tsc → build/
npm test        # build + node --test (unit + snapshot-engine tests)

Architecture: src/config (all policy) · src/core (transport, snapshot engine, caches) · src/handlers (tool logic) · src/tools (definitions, guards, registry) · src/formatting (compact output) · src/types (single barrel).

License

MIT

Installazione

TypingMind
{
  "mcpServers": {
    "bitbucket-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@nexus2520/bitbucket-mcp-server"
      ],
      "env": {
        "BITBUCKET_USERNAME": "<BITBUCKET_USERNAME>"
      }
    }
  }
}

Usa MCP Bitbucket MCP Server con più modelli IA

TypingMind collega gli strumenti MCP a livello di area di lavoro: una volta connesso Bitbucket MCP Server, puoi usarlo con diversi modelli IA in TypingMind, senza configurarlo separatamente per ogni modello. Questa integrazione MCP viene eseguita localmente sul tuo dispositivo tramite il connettore MCP di TypingMind.

Guida alla configurazione del connettore locale

Usa questo metodo quando il server MCP deve accedere a file locali, app o risorse private sul tuo computer.

1

Apri le impostazioni MCP

In TypingMind, vai su Impostazioni, Impostazioni avanzate, poi su Model Context Protocol e scegli Configura MCP.

  1. Apri TypingMind nel tuo browser.
  2. Fai clic sull'icona Impostazioni.
  3. Vai a Impostazioni avanzate.
  4. Apri la sezione Model Context Protocol.
  5. Fai clic su Configura MCP e scegli Questo dispositivo.
Schermata di configurazione del connettore MCP di TypingMind con Questo dispositivo selezionato
2

Esegui il comando del connettore

Scegli Questo dispositivo, copia il comando da TypingMind ed eseguilo nel terminale. Lascia il processo in esecuzione mentre usi MCP.

  1. Copia il comando di configurazione mostrato da TypingMind.
  2. Apri Terminale su macOS o Windows Terminal su Windows.
  3. Incolla ed esegui il comando.
  4. Conferma l'installazione del pacchetto se il terminale ti chiede di procedere.
  5. Tieni aperta la finestra del terminale con il processo in esecuzione mentre usi gli strumenti MCP.
3

Aggiungi Bitbucket MCP Server come server

Quando lo stato del connettore è Pronto, fai clic su Modifica server e incolla la configurazione del server MCP.

  1. Attendi che lo stato del connettore sia Pronto.
  2. Fai clic su Modifica server.
  3. Incolla la configurazione del server MCP di Bitbucket MCP Server.
  4. Salva l'elenco dei server.
  5. Aggiorna per verificare che il connettore sia ancora pronto.
Impostazioni MCP di TypingMind con un server attivo e il pulsante Modifica server
{
  "mcpServers": {
    "bitbucket-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@nexus2520/bitbucket-mcp-server"
      ]
    }
  }
}
4

Usa la connessione con diversi modelli

Salva l'elenco dei server, apri Plugin, abilita gli strumenti MCP di Bitbucket MCP Server, poi seleziona un modello IA supportato in TypingMind e usa gli strumenti in chat o assegnali a un agente IA.

  1. Apri la pagina Plugin in TypingMind.
  2. Abilita gli strumenti MCP di Bitbucket MCP Server.
  3. Avvia una chat e scegli il modello IA che vuoi usare.
  4. Usa gli strumenti MCP in chat o assegnali a un agente IA.
  5. Passa a un altro modello IA quando serve, senza riconnettere MCP.
Chat di TypingMind che usa gli strumenti MCP abilitati con un modello IA selezionato
Puoi usare Bitbucket MCP Server per aiutarmi con questa attività?
Bitbucket MCP Server
Certo. Ho letto.
Ecco cosa ho trovato con Bitbucket MCP Server.

Domande frequenti

A cosa serve il server MCP Bitbucket MCP Server?

Bitbucket MCP Server è un server MCP che consente ai client IA compatibili di accedere a strumenti e informazioni di contesto esterni. In TypingMind puoi aggiungere questo server MCP una sola volta e rendere disponibili i suoi strumenti nella tua area di lavoro IA.

Posso usare Bitbucket MCP Server MCP con più modelli IA in TypingMind?

Sì. TypingMind collega gli strumenti MCP a livello di area di lavoro, quindi puoi usare Bitbucket MCP Server con diversi modelli IA come Claude, ChatGPT, Gemini o altri modelli che hai configurato in TypingMind, senza dover configurare il server MCP separatamente per ogni modello.

Perché usare il connettore MCP Bitbucket MCP Server con TypingMind?

TypingMind è una delle migliori interfacce per chattare con gli LLM perché riunisce più modelli IA, prompt, plugin, agenti IA, chiavi API e strumenti MCP in un'unica area di lavoro. Collegando Bitbucket MCP Server, puoi usare i suoi strumenti MCP con i tuoi modelli preferiti e mantenere organizzato il tuo flusso di lavoro in chat su TypingMind.

Come collego Bitbucket MCP Server MCP a TypingMind?

Bitbucket MCP Server funziona tramite il connettore MCP locale di TypingMind. È la soluzione ideale quando il server MCP deve accedere a file locali, app desktop, strumenti da riga di comando o risorse private sul tuo computer.

Quali strumenti offre Bitbucket MCP Server MCP in TypingMind?

Bitbucket MCP Server mette a disposizione funzionalità MCP che puoi attivare dalla pagina Plugin di TypingMind e usare in chat o assegnare agli agenti IA.

Devo condividere le mie chiavi API con TypingMind per usare Bitbucket MCP Server MCP?

No. TypingMind privilegia il funzionamento in locale e ti permette di mantenere il controllo su fornitori di modelli, chiavi API, prompt e configurazione MCP. Se Bitbucket MCP Server richiede l'autenticazione, aggiungi le intestazioni, le impostazioni OAuth o la configurazione locale necessarie per quel server MCP quando crei la connessione.

Server MCP correlati

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇