Bitbucket Server MCP
Provides tools for managing Bitbucket Server projects, repositories, branches, files, commits, pull requests, and code search.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Bitbucket Server MCP show open pull requests in PROJ/repo"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Bitbucket Server MCP
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
From PyPI (recommended)
pip install bitbucket-server-mcpOr with uv:
uv pip install bitbucket-server-mcpFrom source
git clone https://github.com/ManpreetShuann/bitbucket-server-mcp.git
cd bitbucket-server-mcp
uv syncVia 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 |
| Yes | Base URL of your Bitbucket Server (e.g., |
| Yes | HTTP access token (create in Bitbucket > User Settings > HTTP Access Tokens) |
| No | Log level for stderr output: |
| No | Set to |
| No | Set to |
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-mcpgit 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-mcpTools (66 total)
Projects
Tool | Description |
| List all projects (paginated) |
| Get project details by key |
Repositories
Tool | Description |
| List repos in a project (paginated) |
| Get repo details |
| Create a new repo |
Branches & Tags
Tool | Description |
| List branches (paginated, filterable) |
| Get default branch |
| Create a branch from a start point |
| List tags (paginated, filterable) |
Files & Content
Tool | Description |
| Browse directory/file tree at a path and revision |
| Get raw file content |
| List file paths in a directory |
Commits
Tool | Description |
| List commits (paginated, filterable by branch/path) |
| Get commit details |
| Get diff for a commit |
| Get changed files for a commit |
Pull Requests
Tool | Description |
| List PRs with state/direction/draft/title/participant filters (paginated) |
| Get PR details |
| Create a PR with reviewers (supports draft mode) |
| Update PR title/description/reviewers/draft status |
| Create a PR in draft mode |
| Publish a draft PR (mark as ready for review) |
| Convert an open PR back to draft |
| Check merge readiness (canMerge, conflicts, vetoes) |
| Merge a PR with optional strategy |
| Decline a PR |
| Reopen a declined PR |
| Approve a PR |
| Remove your approval |
| Request changes on a PR |
| Remove your change request |
| List reviewers with roles and statuses |
| Subscribe as a watcher |
| Unsubscribe from watching |
| Get suggested commit message for merge |
| Get PR diff |
| Get per-file change list (added/modified/deleted) |
| List commits in a PR |
| Get PR activity feed |
| List comments on a PR |
| Get a specific comment |
| Add a comment (general, inline, reply, or blocker task) |
| Edit a comment |
| Resolve a comment thread |
| Reopen a resolved thread |
| List PR tasks |
| Create a task (optionally linked to a comment) |
| Get a specific task |
| Update task content or state |
Dashboard
Tool | Description |
| List PRs visible to the authenticated user across all repos (paginated) |
| List PRs in the user's inbox needing review action (paginated) |
Search
Tool | Description |
| Search code across repos (requires Elasticsearch) |
| Find files by name or path pattern with wildcards |
Users
Tool | Description |
| Search users by name, username, or email |
Attachments
Tool | Description |
| Download an attachment by ID |
| Get attachment metadata |
| Create or update attachment metadata |
Dangerous Delete (Tier-1, requires BITBUCKET_ALLOW_DANGEROUS_DELETE=1)
Tool | Description |
| Delete a branch (irreversible) |
| Delete a tag (irreversible) |
| Delete a PR and all its contents |
| Delete a PR comment |
| Delete a PR task |
| Delete an attachment |
| Delete attachment metadata |
Destructive Delete (Tier-2, requires both BITBUCKET_ALLOW_DANGEROUS_DELETE=1 and BITBUCKET_ALLOW_DESTRUCTIVE_DELETE=1)
Tool | Description |
| Delete a project and all its repositories (irreversible) |
| 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/ # FormatSee 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
Available Tools
57 toolsadd_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
Scored across 57 tools
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.
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.
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.
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
Related MCP Connectors
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
1A MCP server built for developers enabling Git based project management with project and personal…
MCP Server for JFrog, providing tools for development and artifact management.
The MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.
Related MCP Servers
- AlicenseBqualityBmaintenanceMCP server with 58 tools for Bitbucket API operations. Manage repositories, pull requests, pipelines, branches, commits, deployments, webhooks, and more.622MIT
- AlicenseNot gradedqualityDmaintenanceA comprehensive MCP server for Jira, Confluence, and Bitbucket that supports both Cloud and Data Center deployments. It provides 136 tools for managing issues, searching documentation, and handling Git workflows like pull requests and pipelines.6MIT
- AlicenseBqualityDmaintenanceAn 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.198,411 npmMIT
- AlicenseNot gradedqualityDmaintenanceA comprehensive MCP server for Bitbucket integration, providing 27 tools to manage repositories, pull requests, branches, commits, issues, and workspaces.MIT