Bitbucket MCP

Bitbucket MCP

MCP server for Bitbucket Cloud, focused on pull-request review workflows

Category
Visit Server

README

bitbucket-mcp

English · Português (BR)

MCP server for Bitbucket Cloud, focused on the first pass of pull-request review. stdio transport, for use with Claude Code or Claude Desktop.

Why an API token (and not an app password)

Bitbucket Cloud app passwords have been in brownout since 2026-06-09 and are removed on 2026-07-28. This server uses an API token, and the HTTP Basic pair is email:token — the Bitbucket REST API requires the Atlassian account email, not the username. Using the username results in a silent 401.

1. Create the API token

  1. Bitbucket top bar → Settings → Atlassian account settings → Security.
  2. Create and manage API tokens → Create API token with scopes.
  3. Name it, set an expiry, and select Bitbucket as the app.
  4. Minimum scopes for PR review:
    • read:repository:bitbucket (read repositories, diffs, files)
    • read:pullrequest:bitbucket (read PRs and comments)
    • write:pullrequest:bitbucket (comment, approve, request changes)
  5. Copy the token (shown only once).

2. Install and build

npm install
npm run build

This generates dist/index.js (the server binary).

3. Configure in Claude Code

Add this to the project's .mcp.json (or to your global Claude Code config):

{
  "mcpServers": {
    "bitbucket": {
      "command": "node",
      "args": ["/absolute/path/to/bitbucket-mcp/dist/index.js"],
      "env": {
        "BITBUCKET_EMAIL": "your-email@domain.com",
        "BITBUCKET_API_TOKEN": "your_api_token",
        "BITBUCKET_WORKSPACE": "your_workspace"
      }
    }
  }
}

Alternative, via the CLI:

claude mcp add bitbucket \
  -e BITBUCKET_EMAIL=your-email@domain.com \
  -e BITBUCKET_API_TOKEN=your_api_token \
  -e BITBUCKET_WORKSPACE=your_workspace \
  -- node /absolute/path/to/bitbucket-mcp/dist/index.js

BITBUCKET_WORKSPACE is optional; if omitted, each tool must be given workspace explicitly.

Tools

Read (no side effects):

Tool Purpose
list_repositories Repositories in the workspace
list_pull_requests PRs by state (OPEN/MERGED/DECLINED/SUPERSEDED)
get_pull_request PR metadata (description, branches, reviewers, approvals)
get_pull_request_diff Unified diff — the basis for the review
get_pull_request_comments Existing comments (general and inline)
get_pull_request_commits PR commits
list_directory Lists the repo file tree at a commit/branch (explore the project)
get_file Contents of a file (default branch if commit is omitted)

Write (mutate state in Bitbucket):

Tool Purpose
add_pull_request_comment Comment on the PR; path + line together = inline
approve_pull_request Approve the PR
request_changes_pull_request Mark "request changes"

Security note

The token grants read/write access to the workspace's PRs. Treat it as a secret: keep it in an environment variable / secret manager, and never commit it. For a first-pass subagent that only suggests review without mutating anything, use a read-only scoped token — that way approve/comment fail on permission rather than relying on prompt discipline.

License

MIT © José Danilo

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured