Skip to main content
Glama
Bitbucket Server MCP

Bitbucket Server MCP

Bitbucket Server MCP

CI PyPI version Python License: MIT

An MCP (Model Context Protocol) server for Atlassian Bitbucket Server / Data Center (Enterprise). Provides 66 tools for reading and writing projects, repositories, branches, files, commits, pull requests, and code search — with opt-in gated deletion operations (disabled by default, see SECURITY.md.

Installation

pip install bitbucket-server-mcp

Or with uv:

uv pip install bitbucket-server-mcp

From source

git clone https://github.com/ManpreetShuann/bitbucket-server-mcp.git
cd bitbucket-server-mcp
uv sync

Via Docker (no local Python required)

cd bitbucket-server-mcp
docker build -t bitbucket-server-mcp .

Related MCP server: MCP Atlassian + Bitbucket

Prerequisites

  • Python 3.10+

  • Bitbucket Server 7.x+ with HTTP access tokens enabled

Configuration

Set two required environment variables (plus optional ones):

Variable

Required

Description

BITBUCKET_URL

Yes

Base URL of your Bitbucket Server (e.g., https://bitbucket.yourcompany.com). Must use HTTPS.

BITBUCKET_TOKEN

Yes

HTTP access token (create in Bitbucket > User Settings > HTTP Access Tokens)

BITBUCKET_LOG_LEVEL

No

Log level for stderr output: DEBUG, INFO, WARNING, ERROR (default: INFO)

BITBUCKET_ALLOW_DANGEROUS_DELETE

No

Set to 1 to enable Tier-1 delete tools (branch, tag, PR, comment, task, attachment)

BITBUCKET_ALLOW_DESTRUCTIVE_DELETE

No

Set to 1 to enable Tier-2 delete tools (project, repository). Requires BITBUCKET_ALLOW_DANGEROUS_DELETE=1

Integration

This server runs locally via stdio rather than as a hosted HTTP service. Running locally keeps your Bitbucket access token on your own machine, avoids exposing an authenticated API endpoint over the network, and removes the need to manage server infrastructure or TLS certificates.

Claude Code

Add to ~/.claude.json or project .claude/settings.json:

pip install bitbucket-server-mcp
{
  "mcpServers": {
    "bitbucket": {
      "command": "bitbucket-server-mcp",
      "env": {
        "BITBUCKET_URL": "https://bitbucket.yourcompany.com",
        "BITBUCKET_TOKEN": "your-token-here"
      }
    }
  }
}
{
  "mcpServers": {
    "bitbucket": {
      "command": "docker",
      "args": ["run", "--rm", "-i", "-e", "BITBUCKET_URL", "-e", "BITBUCKET_TOKEN", "bitbucket-server-mcp"],
      "env": {
        "BITBUCKET_URL": "https://bitbucket.yourcompany.com",
        "BITBUCKET_TOKEN": "your-token-here"
      }
    }
  }
}
git clone https://github.com/ManpreetShuann/bitbucket-server-mcp.git
cd bitbucket-server-mcp
uv sync
{
  "mcpServers": {
    "bitbucket": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/bitbucket-server-mcp", "bitbucket-server-mcp"],
      "env": {
        "BITBUCKET_URL": "https://bitbucket.yourcompany.com",
        "BITBUCKET_TOKEN": "your-token-here"
      }
    }
  }
}

GitHub Copilot (VS Code)

Add to .vscode/mcp.json in your workspace:

pip install bitbucket-server-mcp
{
  "servers": {
    "bitbucket": {
      "type": "stdio",
      "command": "bitbucket-server-mcp",
      "env": {
        "BITBUCKET_URL": "https://bitbucket.yourcompany.com",
        "BITBUCKET_TOKEN": "${input:bitbucket-token}"
      }
    }
  },
  "inputs": [
    {
      "type": "promptString",
      "id": "bitbucket-token",
      "description": "Bitbucket Server HTTP access token",
      "password": true
    }
  ]
}
{
  "servers": {
    "bitbucket": {
      "type": "stdio",
      "command": "docker",
      "args": ["run", "--rm", "-i", "-e", "BITBUCKET_URL", "-e", "BITBUCKET_TOKEN", "bitbucket-server-mcp"],
      "env": {
        "BITBUCKET_URL": "https://bitbucket.yourcompany.com",
        "BITBUCKET_TOKEN": "${input:bitbucket-token}"
      }
    }
  },
  "inputs": [
    {
      "type": "promptString",
      "id": "bitbucket-token",
      "description": "Bitbucket Server HTTP access token",
      "password": true
    }
  ]
}
git clone https://github.com/ManpreetShuann/bitbucket-server-mcp.git
cd bitbucket-server-mcp
uv sync
{
  "servers": {
    "bitbucket": {
      "type": "stdio",
      "command": "uv",
      "args": ["run", "--directory", "/path/to/bitbucket-server-mcp", "bitbucket-server-mcp"],
      "env": {
        "BITBUCKET_URL": "https://bitbucket.yourcompany.com",
        "BITBUCKET_TOKEN": "${input:bitbucket-token}"
      }
    }
  },
  "inputs": [
    {
      "type": "promptString",
      "id": "bitbucket-token",
      "description": "Bitbucket Server HTTP access token",
      "password": true
    }
  ]
}

OpenAI Codex

Add to ~/.codex/config.toml:

pip install bitbucket-server-mcp
[mcp_servers.bitbucket]
command = "bitbucket-server-mcp"
args = []

[mcp_servers.bitbucket.env]
BITBUCKET_URL = "https://bitbucket.yourcompany.com"
BITBUCKET_TOKEN = "your-token-here"

Or via CLI:

codex mcp add bitbucket \
  --env BITBUCKET_URL=https://bitbucket.yourcompany.com \
  --env BITBUCKET_TOKEN=your-token-here \
  -- bitbucket-server-mcp
[mcp_servers.bitbucket]
command = "docker"
args = ["run", "--rm", "-i", "-e", "BITBUCKET_URL", "-e", "BITBUCKET_TOKEN", "bitbucket-server-mcp"]

[mcp_servers.bitbucket.env]
BITBUCKET_URL = "https://bitbucket.yourcompany.com"
BITBUCKET_TOKEN = "your-token-here"

Or via CLI:

codex mcp add bitbucket \
  --env BITBUCKET_URL=https://bitbucket.yourcompany.com \
  --env BITBUCKET_TOKEN=your-token-here \
  -- docker run --rm -i -e BITBUCKET_URL -e BITBUCKET_TOKEN bitbucket-server-mcp
git clone https://github.com/ManpreetShuann/bitbucket-server-mcp.git
cd bitbucket-server-mcp
uv sync
[mcp_servers.bitbucket]
command = "uv"
args = ["run", "--directory", "/path/to/bitbucket-server-mcp", "bitbucket-server-mcp"]

[mcp_servers.bitbucket.env]
BITBUCKET_URL = "https://bitbucket.yourcompany.com"
BITBUCKET_TOKEN = "your-token-here"

Or via CLI:

codex mcp add bitbucket \
  --env BITBUCKET_URL=https://bitbucket.yourcompany.com \
  --env BITBUCKET_TOKEN=your-token-here \
  -- uv run --directory /path/to/bitbucket-server-mcp bitbucket-server-mcp

Tools (66 total)

Projects

Tool

Description

list_projects

List all projects (paginated)

get_project

Get project details by key

Repositories

Tool

Description

list_repositories

List repos in a project (paginated)

get_repository

Get repo details

create_repository

Create a new repo

Branches & Tags

Tool

Description

list_branches

List branches (paginated, filterable)

get_default_branch

Get default branch

create_branch

Create a branch from a start point

list_tags

List tags (paginated, filterable)

Files & Content

Tool

Description

browse_files

Browse directory/file tree at a path and revision

get_file_content

Get raw file content

list_files

List file paths in a directory

Commits

Tool

Description

list_commits

List commits (paginated, filterable by branch/path)

get_commit

Get commit details

get_commit_diff

Get diff for a commit

get_commit_changes

Get changed files for a commit

Pull Requests

Tool

Description

list_pull_requests

List PRs with state/direction/draft/title/participant filters (paginated)

get_pull_request

Get PR details

create_pull_request

Create a PR with reviewers (supports draft mode)

update_pull_request

Update PR title/description/reviewers/draft status

create_draft_pull_request

Create a PR in draft mode

publish_draft_pull_request

Publish a draft PR (mark as ready for review)

convert_to_draft

Convert an open PR back to draft

can_merge_pull_request

Check merge readiness (canMerge, conflicts, vetoes)

merge_pull_request

Merge a PR with optional strategy

decline_pull_request

Decline a PR

reopen_pull_request

Reopen a declined PR

approve_pull_request

Approve a PR

unapprove_pull_request

Remove your approval

request_changes_pull_request

Request changes on a PR

remove_change_request_pull_request

Remove your change request

list_pull_request_participants

List reviewers with roles and statuses

watch_pull_request

Subscribe as a watcher

unwatch_pull_request

Unsubscribe from watching

get_commit_message_suggestion

Get suggested commit message for merge

get_pull_request_diff

Get PR diff

get_pull_request_diff_stat

Get per-file change list (added/modified/deleted)

list_pull_request_commits

List commits in a PR

get_pull_request_activities

Get PR activity feed

list_pull_request_comments

List comments on a PR

get_pull_request_comment

Get a specific comment

add_pull_request_comment

Add a comment (general, inline, reply, or blocker task)

update_pull_request_comment

Edit a comment

resolve_pull_request_comment

Resolve a comment thread

reopen_pull_request_comment

Reopen a resolved thread

list_pull_request_tasks

List PR tasks

create_pull_request_task

Create a task (optionally linked to a comment)

get_pull_request_task

Get a specific task

update_pull_request_task

Update task content or state

Dashboard

Tool

Description

list_dashboard_pull_requests

List PRs visible to the authenticated user across all repos (paginated)

list_inbox_pull_requests

List PRs in the user's inbox needing review action (paginated)

Tool

Description

search_code

Search code across repos (requires Elasticsearch)

find_file

Find files by name or path pattern with wildcards

Users

Tool

Description

find_user

Search users by name, username, or email

Attachments

Tool

Description

get_attachment

Download an attachment by ID

get_attachment_metadata

Get attachment metadata

save_attachment_metadata

Create or update attachment metadata

Dangerous Delete (Tier-1, requires BITBUCKET_ALLOW_DANGEROUS_DELETE=1)

Tool

Description

delete_branch

Delete a branch (irreversible)

delete_tag

Delete a tag (irreversible)

delete_pull_request

Delete a PR and all its contents

delete_pull_request_comment

Delete a PR comment

delete_pull_request_task

Delete a PR task

delete_attachment

Delete an attachment

delete_attachment_metadata

Delete attachment metadata

Destructive Delete (Tier-2, requires both BITBUCKET_ALLOW_DANGEROUS_DELETE=1 and BITBUCKET_ALLOW_DESTRUCTIVE_DELETE=1)

Tool

Description

delete_project

Delete a project and all its repositories (irreversible)

delete_repository

Delete a repository and all its contents (irreversible)

Development

git clone https://github.com/ManpreetShuann/bitbucket-server-mcp.git
cd bitbucket-server-mcp
uv sync                # Install all dependencies (including dev)
uv run pytest -v       # Run tests
uv run ruff check src/ tests/   # Lint
uv run ruff format src/ tests/  # Format

See CONTRIBUTING.md for full development guidelines.

Pagination

All list tools accept start (default 0) and limit (default 25) parameters. Responses include isLastPage and nextPageStart for fetching subsequent pages.

Security

See SECURITY.md for our security policy and vulnerability reporting instructions.

License

MIT

Available Tools

57 tools
add_pull_request_commentA

Add a comment to a pull request. Supports general, inline (on a file/line), and reply comments.

Use severity='BLOCKER' to create a task/blocker comment.

Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. text: The comment text/body. severity: Optional severity - 'NORMAL' or 'BLOCKER' (creates a task). parent_comment_id: Optional parent comment ID to create a reply thread. file_path: Optional file path for an inline comment. line: Optional line number for an inline comment. line_type: Line type for inline comment: 'ADDED', 'REMOVED', or 'CONTEXT'. file_type: File type for inline comment: 'FROM' (old) or 'TO' (new).

Inputs: project_key (required), repo_slug (required), pr_id (required), text (required), +6 more. Returns: result

approve_pull_requestC

Approve a pull request as the authenticated user.

Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID.

Inputs: project_key (required), repo_slug (required), pr_id (required). Returns: result

browse_filesB

Browse the file tree of a repository at a given path and revision.

Args: project_key: The project key. repo_slug: The repository slug. path: Path within the repository to browse (empty for root). at: Optional branch name, tag, or commit ID (defaults to default branch). start: Page start index (default 0). limit: Number of results per page (default 25).

Inputs: project_key (required), repo_slug (required), path, at, +2 more. Returns: result

can_merge_pull_requestB

Check whether a pull request can be merged.

Returns merge readiness including canMerge status, conflicted state, and any vetoes.

Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID.

Inputs: project_key (required), repo_slug (required), pr_id (required). Returns: result

convert_to_draftA

Convert an open pull request back to draft mode.

The version parameter is required for optimistic locking. Get it from get_pull_request.

Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. version: Current version of the PR (required for optimistic locking).

Inputs: project_key (required), repo_slug (required), pr_id (required), version (required). Returns: result

create_branchB

Create a new branch in a repository.

Args: project_key: The project key. repo_slug: The repository slug. name: Name for the new branch. start_point: Commit ID or branch name to branch from.

Inputs: project_key (required), repo_slug (required), name (required), start_point (required). Returns: result

create_draft_pull_requestA

Create a new pull request in draft mode.

Draft PRs are not yet ready for review. Use publish_draft_pull_request to publish when ready. Branch names should be bare (e.g., 'feature/x'), the 'refs/heads/' prefix is added automatically.

Args: project_key: The project key. repo_slug: The repository slug. title: Title of the pull request. source_branch: Source branch name (e.g., 'feature/my-feature'). target_branch: Target branch name (e.g., 'main'). description: Optional description/body for the pull request. reviewers: Optional list of reviewer usernames.

Inputs: project_key (required), repo_slug (required), title (required), source_branch (required), +3 more. Returns: result

create_pull_requestA

Create a new pull request.

Branch names should be bare (e.g., 'feature/x'), the 'refs/heads/' prefix is added automatically.

Args: project_key: The project key. repo_slug: The repository slug. title: Title of the pull request. source_branch: Source branch name (e.g., 'feature/my-feature'). target_branch: Target branch name (e.g., 'main'). description: Optional description/body for the pull request. reviewers: Optional list of reviewer usernames. draft: Whether to create the PR as a draft (default False).

Inputs: project_key (required), repo_slug (required), title (required), source_branch (required), +4 more. Returns: result

create_pull_request_taskA

Create a task on a pull request, optionally linked to a comment.

Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. text: The task description. comment_id: Optional comment ID to attach the task to.

Inputs: project_key (required), repo_slug (required), pr_id (required), text (required), +1 more. Returns: result

create_repositoryB

Create a new repository in a project.

Args: project_key: The project key to create the repo in. name: Name for the new repository. scm_id: SCM type, typically 'git' (default). forkable: Whether the repo can be forked (default True). description: Optional description for the repository.

Inputs: project_key (required), name (required), scm_id, forkable, +1 more. Returns: result

decline_pull_requestC

Decline a pull request.

Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. version: Current version of the PR (required for optimistic locking).

Inputs: project_key (required), repo_slug (required), pr_id (required), version (required). Returns: result

find_fileA

Find files by name or path pattern using Bitbucket Server's code search.

Supports Lucene wildcards (e.g., 'SPREMRG*', '.pks', 'src/main/.java').

Args: query: File name or path pattern to search for. project_key: Optional project key to restrict search scope. repo_slug: Optional repository slug to restrict search (requires project_key). limit: Maximum number of results (default 25, max 1000).

Inputs: query (required), project_key, repo_slug, limit. Returns: result

find_userA

Search for users by partial name, username, or email address.

Returns user details including the slug needed for reviewer fields.

Args: filter: Search text to match against usernames, display names, and email addresses. start: Page start index (default 0). limit: Number of results per page (default 25).

Inputs: filter (required), start, limit. Returns: result

get_attachmentA

Download an attachment from a repository by its numeric ID.

Returns content for text files or a size summary for binary files.

Args: project_key: The project key. repo_slug: The repository slug. attachment_id: The numeric attachment ID.

Inputs: project_key (required), repo_slug (required), attachment_id (required). Returns: result

get_attachment_metadataB

Retrieve the metadata (JSON) associated with an attachment.

Args: project_key: The project key. repo_slug: The repository slug. attachment_id: The numeric attachment ID.

Inputs: project_key (required), repo_slug (required), attachment_id (required). Returns: result

get_commitB

Get details of a specific commit.

Args: project_key: The project key. repo_slug: The repository slug. commit_id: The full commit hash.

Inputs: project_key (required), repo_slug (required), commit_id (required). Returns: result

get_commit_changesA

Get the list of files changed in a commit (paginated).

Args: project_key: The project key. repo_slug: The repository slug. commit_id: The full commit hash. start: Page start index (default 0). limit: Number of results per page (default 25).

Inputs: project_key (required), repo_slug (required), commit_id (required), start, +1 more. Returns: result

get_commit_diffA

Get the diff for a specific commit.

Args: project_key: The project key. repo_slug: The repository slug. commit_id: The full commit hash. context_lines: Number of context lines around changes (default 10, max 100). src_path: Optional path to restrict the diff to a specific file.

Inputs: project_key (required), repo_slug (required), commit_id (required), context_lines, +1 more. Returns: result

get_commit_message_suggestionB

Get a suggested commit message for merging a pull request.

Based on the PR title and included commits.

Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID.

Inputs: project_key (required), repo_slug (required), pr_id (required). Returns: result

get_default_branchB

Get the default branch of a repository.

Args: project_key: The project key. repo_slug: The repository slug.

Inputs: project_key (required), repo_slug (required). Returns: result

get_file_contentA

Get the raw content of a file from a repository.

Args: project_key: The project key. repo_slug: The repository slug. path: Full path to the file within the repository. at: Optional branch name, tag, or commit ID (defaults to default branch).

Inputs: project_key (required), repo_slug (required), path (required), at. Returns: result

get_projectA

Get details of a specific project by its key.

Args: project_key: The project key (e.g., 'PROJ').

Inputs: project_key (required). Returns: result

get_pull_requestB

Get details of a specific pull request.

Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID.

Inputs: project_key (required), repo_slug (required), pr_id (required). Returns: result

get_pull_request_activitiesC

Get the activity feed for a pull request (paginated).

Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. start: Page start index (default 0). limit: Number of results per page (default 25).

Inputs: project_key (required), repo_slug (required), pr_id (required), start, +1 more. Returns: result

get_pull_request_commentC

Get a specific comment on a pull request.

Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. comment_id: The comment ID.

Inputs: project_key (required), repo_slug (required), pr_id (required), comment_id (required). Returns: result

get_pull_request_diffB

Get the diff of a pull request.

Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. context_lines: Number of context lines around changes (default 10, max 100). src_path: Optional path to restrict the diff to a specific file.

Inputs: project_key (required), repo_slug (required), pr_id (required), context_lines, +1 more. Returns: result

get_pull_request_diff_statA

Get the per-file change list for a pull request (added, modified, deleted, moved).

Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. start: Page start index (default 0). limit: Number of results per page (default 25).

Inputs: project_key (required), repo_slug (required), pr_id (required), start, +1 more. Returns: result

get_pull_request_taskC

Get a specific task on a pull request.

Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. task_id: The task ID.

Inputs: project_key (required), repo_slug (required), pr_id (required), task_id (required). Returns: result

get_repositoryB

Get details of a specific repository.

Args: project_key: The project key. repo_slug: The repository slug.

Inputs: project_key (required), repo_slug (required). Returns: result

list_branchesA

List branches in a repository (paginated).

Args: project_key: The project key. repo_slug: The repository slug. filter_text: Optional text to filter branch names. start: Page start index (default 0). limit: Number of results per page (default 25).

Inputs: project_key (required), repo_slug (required), filter_text, start, +1 more. Returns: result

list_commitsA

List commits in a repository (paginated), optionally filtered by branch or path.

Args: project_key: The project key. repo_slug: The repository slug. until: Optional branch, tag, or commit to list commits up to (inclusive). since: Optional commit to list commits after (exclusive). path: Optional file path to restrict commits to those affecting this path. start: Page start index (default 0). limit: Number of results per page (default 25).

Inputs: project_key (required), repo_slug (required), until, since, +3 more. Returns: result

list_dashboard_pull_requestsA

List pull requests visible to the authenticated user across all repositories (paginated).

Returns PRs from all projects/repos where the user has access, filtered by state and role.

Args: state: PR state filter - 'OPEN', 'DECLINED', 'MERGED', or 'ALL' (default 'OPEN'). role: Filter by user's role - 'AUTHOR', 'REVIEWER', or 'PARTICIPANT' (optional). closed_since: Only include PRs closed after this epoch timestamp in milliseconds (optional). order: Sort order - 'OLDEST' or 'NEWEST' (default 'NEWEST'). start: Page start index (default 0). limit: Number of results per page (default 25).

Inputs: state, role, closed_since, order, +2 more. Returns: result

list_filesA

List file paths in a repository directory (paginated).

Returns a flat list of file paths (strings), unlike browse_files which returns structured entries.

Args: project_key: The project key. repo_slug: The repository slug. path: Path within the repository (empty for root). at: Optional branch name, tag, or commit ID (defaults to default branch). start: Page start index (default 0). limit: Number of results per page (default 25).

Inputs: project_key (required), repo_slug (required), path, at, +2 more. Returns: result

list_inbox_pull_requestsA

List pull requests in the authenticated user's inbox (PRs needing review action).

The inbox contains PRs where the user has been added as a reviewer and has not yet completed their review.

Args: role: Filter by role - typically 'REVIEWER' (default 'REVIEWER'). start: Page start index (default 0). limit: Number of results per page (default 25).

Inputs: role, start, limit. Returns: result

list_projectsA

List all projects visible to the current user (paginated).

Args: start: Page start index (default 0). limit: Number of results per page (default 25, max 1000).

Inputs: start, limit. Returns: result

list_pull_request_commentsB

List comments on a pull request (paginated).

Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. start: Page start index (default 0). limit: Number of results per page (default 25).

Inputs: project_key (required), repo_slug (required), pr_id (required), start, +1 more. Returns: result

list_pull_request_commitsC

List commits included in a pull request (paginated).

Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. start: Page start index (default 0). limit: Number of results per page (default 25).

Inputs: project_key (required), repo_slug (required), pr_id (required), start, +1 more. Returns: result

list_pull_request_participantsA

List participants (reviewers) of a pull request with their roles and approval statuses.

Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. start: Page start index (default 0). limit: Number of results per page (default 25).

Inputs: project_key (required), repo_slug (required), pr_id (required), start, +1 more. Returns: result

list_pull_requestsA

List pull requests in a repository (paginated).

Args: project_key: The project key. repo_slug: The repository slug. state: PR state filter - 'OPEN', 'DECLINED', 'MERGED', or 'ALL' (default 'OPEN'). direction: PR direction - 'INCOMING' or 'OUTGOING' (default 'INCOMING'). at: Optional target branch ref filter (e.g., 'refs/heads/main'). filter_text: Optional text to filter PR titles. order: Sort order - 'OLDEST' or 'NEWEST' (default 'NEWEST'). participant: Optional username to filter by participant. draft: Optional draft filter - True for drafts only, False for non-drafts, None for all. start: Page start index (default 0). limit: Number of results per page (default 25).

Inputs: project_key (required), repo_slug (required), state, direction, +7 more. Returns: result

list_pull_request_tasksC

List tasks on a pull request (paginated).

Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. start: Page start index (default 0). limit: Number of results per page (default 25).

Inputs: project_key (required), repo_slug (required), pr_id (required), start, +1 more. Returns: result

list_repositoriesA

List all repositories in a project (paginated).

Args: project_key: The project key. start: Page start index (default 0). limit: Number of results per page (default 25, max 1000).

Inputs: project_key (required), start, limit. Returns: result

list_tagsA

List tags in a repository (paginated).

Args: project_key: The project key. repo_slug: The repository slug. filter_text: Optional text to filter tag names. start: Page start index (default 0). limit: Number of results per page (default 25).

Inputs: project_key (required), repo_slug (required), filter_text, start, +1 more. Returns: result

merge_pull_requestA

Merge a pull request.

Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. version: Current version of the PR (required for optimistic locking). strategy: Optional merge strategy (e.g., 'merge-commit', 'squash', 'rebase-no-ff').

Inputs: project_key (required), repo_slug (required), pr_id (required), version (required), +1 more. Returns: result

publish_draft_pull_requestA

Publish a draft pull request, making it ready for review.

The version parameter is required for optimistic locking. Get it from get_pull_request.

Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. version: Current version of the PR (required for optimistic locking).

Inputs: project_key (required), repo_slug (required), pr_id (required), version (required). Returns: result

remove_change_request_pull_requestA

Remove your change request from a pull request.

Resets the user's participant status to UNAPPROVED.

Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID.

Inputs: project_key (required), repo_slug (required), pr_id (required). Returns: result

reopen_pull_requestC

Reopen a previously declined pull request.

Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. version: Current version of the PR (required for optimistic locking).

Inputs: project_key (required), repo_slug (required), pr_id (required), version (required). Returns: result

reopen_pull_request_commentB

Reopen a previously resolved comment thread on a pull request.

Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. comment_id: The comment ID to reopen. version: Current version of the comment (required for optimistic locking).

Inputs: project_key (required), repo_slug (required), pr_id (required), comment_id (required), +1 more. Returns: result

request_changes_pull_requestC

Request changes on a pull request as the authenticated user.

Sets the user's participant status to NEEDS_WORK.

Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID.

Inputs: project_key (required), repo_slug (required), pr_id (required). Returns: result

resolve_pull_request_commentA

Resolve a comment thread on a pull request.

Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. comment_id: The comment ID to resolve. version: Current version of the comment (required for optimistic locking).

Inputs: project_key (required), repo_slug (required), pr_id (required), comment_id (required), +1 more. Returns: result

save_attachment_metadataC

Create or update metadata for an attachment.

The metadata field must be valid JSON.

Args: project_key: The project key. repo_slug: The repository slug. attachment_id: The numeric attachment ID. metadata: JSON string of metadata to save.

Inputs: project_key (required), repo_slug (required), attachment_id (required), metadata (required). Returns: result

search_codeB

Search for code across repositories using Bitbucket Server's code search.

Requires the Bitbucket Server instance to have code search enabled (Elasticsearch).

Args: query: Search query string. project_key: Optional project key to restrict search scope. repo_slug: Optional repository slug to restrict search (requires project_key). limit: Maximum number of results (default 25, max 1000).

Inputs: query (required), project_key, repo_slug, limit. Returns: result

unapprove_pull_requestC

Remove your approval from a pull request.

Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID.

Inputs: project_key (required), repo_slug (required), pr_id (required). Returns: result

unwatch_pull_requestC

Unsubscribe from watching a pull request.

Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID.

Inputs: project_key (required), repo_slug (required), pr_id (required). Returns: result

update_pull_requestA

Update a pull request's title, description, reviewers, target branch, or draft status.

The version parameter is required for optimistic locking. Get it from get_pull_request.

Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. version: Current version of the PR (required for optimistic locking). title: New title (leave empty to keep current). description: New description (None to keep current, empty string to clear). reviewers: New list of reviewer usernames (None to keep current). target_branch: New target branch (leave empty to keep current). draft: Set draft status (None to keep current, True/False to change).

Inputs: project_key (required), repo_slug (required), pr_id (required), version (required), +5 more. Returns: result

update_pull_request_commentB

Update the text of a comment on a pull request.

Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. comment_id: The comment ID to update. version: Current version of the comment (required for optimistic locking). text: The new comment text.

Inputs: project_key (required), repo_slug (required), pr_id (required), comment_id (required), +2 more. Returns: result

update_pull_request_taskA

Update a task's content or state on a pull request.

Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. task_id: The task ID. text: New task description (leave empty to keep current). state: New task state - 'OPEN' or 'RESOLVED' (leave empty to keep current).

Inputs: project_key (required), repo_slug (required), pr_id (required), task_id (required), +2 more. Returns: result

watch_pull_requestC

Subscribe as a watcher on a pull request.

Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID.

Inputs: project_key (required), repo_slug (required), pr_id (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 57 tools

    Disambiguation4/5

    Tools are largely distinct, but there is redundancy between create_pull_request (which has a draft parameter) and create_draft_pull_request; also browse_files vs list_files could confuse agents. Overall, most tools have clear boundaries.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern in snake_case (e.g., list_projects, get_commit, create_branch). No mixing of conventions or irregular naming.

    Tool Count2/5

    With 57 tools, the surface is overly large for a typical Bitbucket server integration. Many specialized tools (e.g., for attachments, versioned comments) contribute to bloat; a more focused set of 25-35 tools would be more appropriate.

    Completeness4/5

    Covers the core PR lifecycle, commits, branches, repos, projects, search, and comments comprehensively. Minor gaps: no delete_branch, delete_repository, or update_repository tools, but these are not critical for most workflows.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      An MCP server that provides tools for interacting with the Bitbucket API, supporting both Bitbucket Cloud and Bitbucket Server, enabling pull request, branch, file, code review, and search operations.
      19
      8,411 npm
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A comprehensive MCP server for Bitbucket integration, providing 27 tools to manage repositories, pull requests, branches, commits, issues, and workspaces.
      MIT