Skip to main content
Glama
Acendas

Bitbucket MCP Server

by Acendas

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
BITBUCKET_USERNAMENoYour Bitbucket username (email address)
BITBUCKET_API_TOKENNoYour Bitbucket API token
BITBUCKET_WORKSPACENoYour Bitbucket workspace (optional default)

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tasks
{
  "list": {},
  "cancel": {},
  "requests": {
    "tools": {
      "call": {}
    },
    "prompts": {
      "get": {}
    },
    "resources": {
      "read": {}
    }
  }
}
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
setup_bitbucket

Configure Bitbucket credentials for the MCP server.

Args: workspace: Bitbucket workspace slug (e.g., "myworkspace") username: Your Atlassian account email (e.g., "user@example.com") api_token: Atlassian API Token from https://id.atlassian.com/manage-profile/security/api-tokens

Returns: Success or error message

get_config_status

Check if Bitbucket is configured and return current status.

Returns: Configuration status with workspace info

create_pull_request

Create a Pull Request on Bitbucket Cloud.

Args: repo_slug: Repository slug (name) title: PR title source_branch: Branch to merge from destination_branch: Branch to merge into (default: main) description: PR description (optional) reviewers: List of reviewer UUIDs or account_ids (optional). These are added in addition to default reviewers. use_default_reviewers: Whether to include default reviewers (default: True) workspace: Bitbucket workspace (optional if configured)

Returns: PR details including URL and ID, or error message

list_pull_requests

List Pull Requests for a repository on Bitbucket Cloud.

Args: repo_slug: Repository slug (name) state: PR state filter - OPEN, MERGED, DECLINED, SUPERSEDED, or ALL (default: OPEN) workspace: Bitbucket workspace (optional if configured) page: Page number for pagination (default: 1) pagelen: Number of results per page, max 50 (default: 25)

Returns: List of PRs with their details

get_pull_request

Get details of a specific Pull Request on Bitbucket Cloud.

Args: repo_slug: Repository slug (name) pr_id: Pull Request ID workspace: Bitbucket workspace (optional if configured)

Returns: Detailed PR information including description, reviewers, and comments count

update_pull_request

Update/edit an existing Pull Request on Bitbucket Cloud.

Args: repo_slug: Repository slug (name) pr_id: Pull Request ID to update title: New PR title (optional) description: New PR description (optional) destination_branch: New destination branch (optional) reviewers: List of reviewer UUIDs or account_ids to set as reviewers (optional). Pass empty list [] to remove all reviewers. close_source_branch: Whether to close source branch on merge (optional) workspace: Bitbucket workspace (optional if configured)

Returns: Updated PR details or error message

approve_pull_request

Approve a Pull Request on Bitbucket Cloud.

Args: repo_slug: Repository slug (name) pr_id: Pull Request ID to approve workspace: Bitbucket workspace (optional if configured)

Returns: Approval confirmation or error message

unapprove_pull_request

Remove approval from a Pull Request on Bitbucket Cloud.

Args: repo_slug: Repository slug (name) pr_id: Pull Request ID to unapprove workspace: Bitbucket workspace (optional if configured)

Returns: Confirmation or error message

request_changes_pull_request

Request changes on a Pull Request on Bitbucket Cloud.

Args: repo_slug: Repository slug (name) pr_id: Pull Request ID workspace: Bitbucket workspace (optional if configured)

Returns: Confirmation or error message

add_pull_request_comment

Add a comment to a Pull Request on Bitbucket Cloud.

Args: repo_slug: Repository slug (name) pr_id: Pull Request ID comment: Comment text (supports markdown) workspace: Bitbucket workspace (optional if configured)

Returns: Comment details or error message

get_pull_request_comments

Get comments from a Pull Request on Bitbucket Cloud.

Args: repo_slug: Repository slug (name) pr_id: Pull Request ID workspace: Bitbucket workspace (optional if configured) page: Page number for pagination (default: 1) pagelen: Number of results per page, max 100 (default: 50)

Returns: List of comments with their details including content, author, and timestamps

get_pull_request_diffstat

Get a summary of files changed in a Pull Request with line counts.

Args: repo_slug: Repository slug (name) pr_id: Pull Request ID workspace: Bitbucket workspace (optional if configured)

Returns: List of files with lines added/removed counts

get_pull_request_diff

Get the diff (code changes) for a Pull Request.

Args: repo_slug: Repository slug (name) pr_id: Pull Request ID file_path: Optional specific file path to get diff for (recommended for large PRs) context_lines: Number of context lines around changes (default: 3) workspace: Bitbucket workspace (optional if configured)

Returns: The diff content as text

merge_pull_request

Merge a Pull Request on Bitbucket Cloud.

Args: repo_slug: Repository slug (name) pr_id: Pull Request ID to merge merge_strategy: Merge strategy - "merge_commit", "squash", or "fast_forward" (default: merge_commit) close_source_branch: Whether to close the source branch after merge (default: False) message: Custom merge commit message (optional) workspace: Bitbucket workspace (optional if configured)

Returns: Merge result with commit details or error message

decline_pull_request

Decline/close a Pull Request on Bitbucket Cloud without merging.

Args: repo_slug: Repository slug (name) pr_id: Pull Request ID to decline reason: Optional reason for declining (will be added as a comment) workspace: Bitbucket workspace (optional if configured)

Returns: Confirmation or error message

reply_to_comment

Reply to a specific comment on a Pull Request.

Args: repo_slug: Repository slug (name) pr_id: Pull Request ID comment_id: ID of the comment to reply to content: Reply text (supports markdown) workspace: Bitbucket workspace (optional if configured)

Returns: Reply details or error message

add_inline_comment

Add an inline comment on a specific line of code in a Pull Request.

Args: repo_slug: Repository slug (name) pr_id: Pull Request ID file_path: Path to the file to comment on line: Line number to comment on content: Comment text (supports markdown) workspace: Bitbucket workspace (optional if configured)

Returns: Comment details or error message

delete_comment

Delete a comment from a Pull Request.

Args: repo_slug: Repository slug (name) pr_id: Pull Request ID comment_id: ID of the comment to delete workspace: Bitbucket workspace (optional if configured)

Returns: Confirmation or error message

get_pull_request_activity

Get the activity/timeline of a Pull Request including comments, approvals, and updates.

Args: repo_slug: Repository slug (name) pr_id: Pull Request ID workspace: Bitbucket workspace (optional if configured) page: Page number for pagination (default: 1) pagelen: Number of results per page, max 100 (default: 50)

Returns: List of activity events on the PR

get_pull_request_commits

Get the list of commits in a Pull Request.

Args: repo_slug: Repository slug (name) pr_id: Pull Request ID workspace: Bitbucket workspace (optional if configured) page: Page number for pagination (default: 1) pagelen: Number of results per page, max 100 (default: 50)

Returns: List of commits in the PR

add_reviewer

Add a reviewer to a Pull Request without removing existing reviewers.

Args: repo_slug: Repository slug (name) pr_id: Pull Request ID reviewer: UUID or account_id of the reviewer to add workspace: Bitbucket workspace (optional if configured)

Returns: Updated reviewer list or error message

remove_reviewer

Remove a reviewer from a Pull Request.

Args: repo_slug: Repository slug (name) pr_id: Pull Request ID reviewer: UUID or account_id of the reviewer to remove workspace: Bitbucket workspace (optional if configured)

Returns: Updated reviewer list or error message

get_pull_request_merge_status

Check if a Pull Request can be merged and get merge status details.

Args: repo_slug: Repository slug (name) pr_id: Pull Request ID workspace: Bitbucket workspace (optional if configured)

Returns: Merge status including conflicts, required approvals, and blockers

list_repositories

List repositories in a Bitbucket workspace.

Args: workspace: Bitbucket workspace (optional if configured) page: Page number for pagination (default: 1) pagelen: Number of results per page, max 100 (default: 25) query: Optional search query to filter repositories by name

Returns: List of repositories with their details

get_repository

Get detailed information about a specific repository.

Args: repo_slug: Repository slug (name) workspace: Bitbucket workspace (optional if configured)

Returns: Repository details including settings, branches, and statistics

create_repository

Create a new repository in a Bitbucket workspace.

Args: repo_slug: Repository slug (URL-friendly name) project_key: Project key to create the repo under (optional) is_private: Whether the repository is private (default: True) description: Repository description (optional) language: Programming language (optional) fork_policy: Fork policy - "allow_forks", "no_public_forks", or "no_forks" (default: no_public_forks) workspace: Bitbucket workspace (optional if configured)

Returns: Created repository details or error message

update_repository

Update repository settings.

Args: repo_slug: Repository slug (name) description: New description (optional) is_private: Whether the repository is private (optional) language: Programming language (optional) fork_policy: Fork policy - "allow_forks", "no_public_forks", or "no_forks" (optional) has_issues: Enable/disable issue tracker (optional) has_wiki: Enable/disable wiki (optional) workspace: Bitbucket workspace (optional if configured)

Returns: Updated repository details or error message

delete_repository

Delete a repository. This action is irreversible.

Args: repo_slug: Repository slug (name) workspace: Bitbucket workspace (optional if configured)

Returns: Confirmation or error message

fork_repository

Fork a repository.

Args: repo_slug: Repository slug (name) to fork new_name: Name for the forked repository (optional, defaults to original name) workspace: Bitbucket workspace (optional if configured)

Returns: Forked repository details or error message

list_repository_forks

List forks of a repository.

Args: repo_slug: Repository slug (name) workspace: Bitbucket workspace (optional if configured) page: Page number for pagination (default: 1) pagelen: Number of results per page, max 100 (default: 25)

Returns: List of forked repositories

list_branches

List branches in a repository.

Args: repo_slug: Repository slug (name) workspace: Bitbucket workspace (optional if configured) page: Page number for pagination (default: 1) pagelen: Number of results per page, max 100 (default: 25) query: Optional search query to filter branches by name

Returns: List of branches with their details

create_branch

Create a new branch in a repository.

Args: repo_slug: Repository slug (name) name: Name for the new branch target: Commit hash, branch name, or tag to branch from workspace: Bitbucket workspace (optional if configured)

Returns: Created branch details or error message

delete_branch

Delete a branch from a repository.

Args: repo_slug: Repository slug (name) name: Branch name to delete workspace: Bitbucket workspace (optional if configured)

Returns: Confirmation or error message

list_tags

List tags in a repository.

Args: repo_slug: Repository slug (name) workspace: Bitbucket workspace (optional if configured) page: Page number for pagination (default: 1) pagelen: Number of results per page, max 100 (default: 25) query: Optional search query to filter tags by name

Returns: List of tags with their details

create_tag

Create a new tag in a repository.

Args: repo_slug: Repository slug (name) name: Name for the new tag target: Commit hash to tag workspace: Bitbucket workspace (optional if configured)

Returns: Created tag details or error message

delete_tag

Delete a tag from a repository.

Args: repo_slug: Repository slug (name) name: Tag name to delete workspace: Bitbucket workspace (optional if configured)

Returns: Confirmation or error message

get_branching_model

Get the branching model configuration for a repository.

Args: repo_slug: Repository slug (name) workspace: Bitbucket workspace (optional if configured)

Returns: Branching model details including branch types and development/production branches

get_file_contents

Get the contents of a file from a repository at a specific branch/commit.

Args: repo_slug: Repository slug (name) file_path: Path to the file in the repository ref: Branch name, tag, or commit hash (default: main) workspace: Bitbucket workspace (optional if configured)

Returns: File contents as text

list_commits

List commits in a repository.

Args: repo_slug: Repository slug (name) branch: Branch name to list commits from (optional) include: Commit hash to include (optional) exclude: Commit hash to exclude (optional) workspace: Bitbucket workspace (optional if configured) page: Page number for pagination (default: 1) pagelen: Number of results per page, max 100 (default: 25)

Returns: List of commits with their details

get_commit

Get details of a specific commit.

Args: repo_slug: Repository slug (name) commit_hash: The commit hash workspace: Bitbucket workspace (optional if configured)

Returns: Commit details including message, author, date, and parents

get_commit_diff

Get the diff for a commit or commit range.

Args: repo_slug: Repository slug (name) spec: Commit hash or range (e.g., "abc123" or "abc123..def456") workspace: Bitbucket workspace (optional if configured)

Returns: The diff content as text

get_commit_diffstat

Get the diffstat (summary of changes) for a commit or commit range.

Args: repo_slug: Repository slug (name) spec: Commit hash or range (e.g., "abc123" or "abc123..def456") workspace: Bitbucket workspace (optional if configured)

Returns: List of files changed with line counts

list_commit_statuses

List build statuses for a specific commit.

Args: repo_slug: Repository slug (name) commit_hash: The commit hash workspace: Bitbucket workspace (optional if configured) page: Page number for pagination (default: 1) pagelen: Number of results per page, max 100 (default: 25)

Returns: List of build statuses for the commit

create_build_status

Create a build status for a commit.

Args: repo_slug: Repository slug (name) commit_hash: The commit hash state: Build state - "SUCCESSFUL", "FAILED", "INPROGRESS", or "STOPPED" key: Unique key for this build status url: URL to the build results (optional) description: Description of the build status (optional) name: Display name for the build (optional) workspace: Bitbucket workspace (optional if configured)

Returns: Created build status details or error message

list_commit_comments

List comments on a specific commit.

Args: repo_slug: Repository slug (name) commit_hash: The commit hash workspace: Bitbucket workspace (optional if configured) page: Page number for pagination (default: 1) pagelen: Number of results per page, max 100 (default: 25)

Returns: List of comments on the commit

list_pipelines

List pipelines for a repository.

Args: repo_slug: Repository slug (name) sort: Sort field (e.g., "-created_on" for newest first) (optional) workspace: Bitbucket workspace (optional if configured) page: Page number for pagination (default: 1) pagelen: Number of results per page, max 100 (default: 25)

Returns: List of pipelines with their details

get_pipeline

Get details of a specific pipeline.

Args: repo_slug: Repository slug (name) pipeline_uuid: Pipeline UUID (with or without braces) workspace: Bitbucket workspace (optional if configured)

Returns: Pipeline details including state, steps, and duration

trigger_pipeline

Trigger a new pipeline run.

Args: repo_slug: Repository slug (name) branch: Branch to run pipeline on (optional, defaults to main branch) custom_pipeline: Name of custom pipeline to run (optional) variables: List of pipeline variables as [{"key": "name", "value": "val", "secured": false}] (optional) workspace: Bitbucket workspace (optional if configured)

Returns: Triggered pipeline details or error message

stop_pipeline

Stop a running pipeline.

Args: repo_slug: Repository slug (name) pipeline_uuid: Pipeline UUID (with or without braces) workspace: Bitbucket workspace (optional if configured)

Returns: Confirmation or error message

list_pipeline_steps

List steps in a pipeline.

Args: repo_slug: Repository slug (name) pipeline_uuid: Pipeline UUID (with or without braces) workspace: Bitbucket workspace (optional if configured)

Returns: List of pipeline steps with their details

get_pipeline_step_log

Get the log output for a pipeline step.

Args: repo_slug: Repository slug (name) pipeline_uuid: Pipeline UUID (with or without braces) step_uuid: Step UUID (with or without braces) workspace: Bitbucket workspace (optional if configured)

Returns: Step log content

list_pipeline_variables

List pipeline variables configured for a repository.

Args: repo_slug: Repository slug (name) workspace: Bitbucket workspace (optional if configured) page: Page number for pagination (default: 1) pagelen: Number of results per page, max 100 (default: 25)

Returns: List of pipeline variables

create_pipeline_variable

Create a pipeline variable for a repository.

Args: repo_slug: Repository slug (name) key: Variable name value: Variable value secured: Whether the variable is secured/encrypted (default: False) workspace: Bitbucket workspace (optional if configured)

Returns: Created variable details or error message

list_workspace_members

List members of a Bitbucket workspace. Use this to find users who can be added as reviewers.

Args: workspace: Bitbucket workspace (optional if configured) page: Page number for pagination (default: 1) pagelen: Number of results per page, max 100 (default: 50)

Returns: List of workspace members with their UUIDs and display names

get_default_reviewers

Get the default reviewers configured for a repository.

Args: repo_slug: Repository slug (name) workspace: Bitbucket workspace (optional if configured)

Returns: List of default reviewers with their UUIDs and display names

list_workspaces

List all workspaces the authenticated user has access to.

Returns: List of workspaces with their details

get_workspace_details

Get detailed information about a workspace.

Args: workspace: Bitbucket workspace slug (optional if configured)

Returns: Workspace details

list_workspace_permissions

List permissions for a workspace.

Args: workspace: Bitbucket workspace (optional if configured) page: Page number for pagination (default: 1) pagelen: Number of results per page, max 100 (default: 50)

Returns: List of workspace permissions

list_projects

List projects in a workspace.

Args: workspace: Bitbucket workspace (optional if configured) page: Page number for pagination (default: 1) pagelen: Number of results per page, max 100 (default: 25)

Returns: List of projects with their details

get_project

Get details of a specific project.

Args: project_key: Project key workspace: Bitbucket workspace (optional if configured)

Returns: Project details

create_project

Create a new project in a workspace.

Args: name: Project name key: Project key (unique identifier, uppercase letters and numbers) description: Project description (optional) is_private: Whether the project is private (default: True) workspace: Bitbucket workspace (optional if configured)

Returns: Created project details or error message

search_code

Search for code across repositories in a workspace.

Args: query: Search query string workspace: Bitbucket workspace (optional if configured) page: Page number for pagination (default: 1) pagelen: Number of results per page, max 100 (default: 25)

Returns: Code search results with file paths and matching content

get_current_user

Get the currently authenticated user's profile information.

Returns: Current user details including display name, UUID, and account info

get_user_profile

Get a user's public profile information.

Args: username: Bitbucket username or UUID

Returns: User profile details

get_user_permissions

Get the current user's repository permissions.

Args: workspace: Filter by workspace (optional) page: Page number for pagination (default: 1) pagelen: Number of results per page, max 100 (default: 25)

Returns: List of repositories and the user's permission level for each

list_issues

List issues in a repository's issue tracker.

Args: repo_slug: Repository slug (name) query: Search query to filter issues (optional) state: Filter by state - "new", "open", "resolved", "on hold", "invalid", "duplicate", "wontfix", "closed" (optional) priority: Filter by priority - "trivial", "minor", "major", "critical", "blocker" (optional) workspace: Bitbucket workspace (optional if configured) page: Page number for pagination (default: 1) pagelen: Number of results per page, max 100 (default: 25)

Returns: List of issues with their details

create_issue

Create a new issue in a repository's issue tracker.

Args: repo_slug: Repository slug (name) title: Issue title content: Issue description in markdown (optional) kind: Issue kind - "bug", "enhancement", "proposal", or "task" (default: bug) priority: Issue priority - "trivial", "minor", "major", "critical", or "blocker" (default: major) assignee: Account ID of the assignee (optional) workspace: Bitbucket workspace (optional if configured)

Returns: Created issue details or error message

get_issue

Get details of a specific issue.

Args: repo_slug: Repository slug (name) issue_id: Issue ID workspace: Bitbucket workspace (optional if configured)

Returns: Issue details including description, assignee, and metadata

update_issue

Update an existing issue.

Args: repo_slug: Repository slug (name) issue_id: Issue ID title: New issue title (optional) content: New issue description in markdown (optional) state: New state - "new", "open", "resolved", "on hold", "invalid", "duplicate", "wontfix", "closed" (optional) priority: New priority - "trivial", "minor", "major", "critical", "blocker" (optional) assignee: Account ID of new assignee, or empty string to unassign (optional) kind: New kind - "bug", "enhancement", "proposal", "task" (optional) workspace: Bitbucket workspace (optional if configured)

Returns: Updated issue details or error message

list_issue_comments

List comments on an issue.

Args: repo_slug: Repository slug (name) issue_id: Issue ID workspace: Bitbucket workspace (optional if configured) page: Page number for pagination (default: 1) pagelen: Number of results per page, max 100 (default: 25)

Returns: List of comments on the issue

add_issue_comment

Add a comment to an issue.

Args: repo_slug: Repository slug (name) issue_id: Issue ID content: Comment text (supports markdown) workspace: Bitbucket workspace (optional if configured)

Returns: Created comment details or error message

list_webhooks

List webhooks configured for a repository.

Args: repo_slug: Repository slug (name) workspace: Bitbucket workspace (optional if configured) page: Page number for pagination (default: 1) pagelen: Number of results per page, max 100 (default: 25)

Returns: List of webhooks with their details

create_webhook

Create a webhook for a repository.

Args: repo_slug: Repository slug (name) url: The URL to receive webhook events events: List of events to subscribe to (e.g., ["repo:push", "pullrequest:created"]) description: Webhook description (optional) active: Whether the webhook is active (default: True) workspace: Bitbucket workspace (optional if configured)

Returns: Created webhook details or error message

delete_webhook

Delete a webhook from a repository.

Args: repo_slug: Repository slug (name) webhook_uid: Webhook UUID (with or without braces) workspace: Bitbucket workspace (optional if configured)

Returns: Confirmation or error message

list_workspace_webhooks

List webhooks configured for a workspace.

Args: workspace: Bitbucket workspace (optional if configured) page: Page number for pagination (default: 1) pagelen: Number of results per page, max 100 (default: 25)

Returns: List of workspace webhooks

list_snippets

List snippets in a workspace.

Args: workspace: Bitbucket workspace (optional if configured) page: Page number for pagination (default: 1) pagelen: Number of results per page, max 100 (default: 25)

Returns: List of snippets with their details

create_snippet

Create a new snippet.

Args: title: Snippet title content: Snippet file content filename: Filename for the snippet content is_private: Whether the snippet is private (default: False) workspace: Bitbucket workspace (optional if configured)

Returns: Created snippet details or error message

get_snippet

Get details of a specific snippet.

Args: snippet_id: Snippet ID workspace: Bitbucket workspace (optional if configured)

Returns: Snippet details including files and metadata

delete_snippet

Delete a snippet.

Args: snippet_id: Snippet ID workspace: Bitbucket workspace (optional if configured)

Returns: Confirmation or error message

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/Acendas/bitbucket-mcp'

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