Bitbucket MCP server for AI agents
Browse Bitbucket Cloud workspaces, repositories, branches and commits, open, review, approve and merge pull requests, and run and check Pipelines.
Runs with your users' own Bitbucket accounts. Credentials stay on prompt-tm.com.
24 tools · 0 triggers
- Auth
- OAuth 2.0 (sign in with the app) · Username and password or token · Access token
- Tools
- 24
- Triggers
- 0
- Category
- Developer tools
Tools and triggers
Get the current user
BITBUCKET_GET_CURRENT_USER
Returns the user the credential belongs to: UUID, account ID, display name and links.read-only
List my workspaces
BITBUCKET_LIST_WORKSPACES_FOR_THE_CURRENT_USER
Lists the workspaces the user can access, with their slugs and whether the user is an administrator.read-only
List projects
BITBUCKET_LIST_PROJECTS_IN_A_WORKSPACE
Lists the projects in a workspace with their keys and names. Projects group repositories.read-only
List repositories
BITBUCKET_LIST_REPOSITORIES_IN_A_WORKSPACE
Lists the repositories in a workspace that the user can see. Filter with `q`, such as `project.key = "WEB"`.read-only
Get a repository
BITBUCKET_GET_A_REPOSITORY
Returns a repository: name, description, main branch, language, size, privacy and project.read-only
List branches
BITBUCKET_LIST_OPEN_BRANCHES
Lists a repository's open branches with the commit each one points to. Filter with `q`, such as `name ~ "feature/"`.read-only
Create a branch
BITBUCKET_CREATE_A_BRANCH
Creates a branch that points at a commit.
List commits
BITBUCKET_LIST_COMMITS
Lists commits newest first across all branches, like `git log --all`. Narrow it to one branch with `include`, leave one out with `exclude`, or to the commits that touched `path`.read-only
Get a commit
BITBUCKET_GET_A_COMMIT
Returns a commit: hash, author, date, message and parents.read-only
List pull requests
BITBUCKET_LIST_PULL_REQUESTS
Lists a repository's pull requests, open ones unless `state` says otherwise.read-only
Create a pull request
BITBUCKET_CREATE_A_PULL_REQUEST
Opens a pull request from a source branch, into the repository's main branch unless you give a destination. The connected user is the author.
Get a pull request
BITBUCKET_GET_A_PULL_REQUEST
Returns a pull request: title, description, state, author, source and destination branches, reviewers and participants with their approvals.read-only
Update a pull request
BITBUCKET_UPDATE_A_PULL_REQUEST
Changes an open pull request's title, description, destination branch or reviewers. `reviewers` replaces the reviewer list.destructive
List pull request activity
BITBUCKET_LIST_A_PULL_REQUEST_ACTIVITY_LOG_2
Lists a pull request's activity: comments, updates, approvals and change requests.read-only
List changed files
BITBUCKET_GET_THE_DIFF_STAT_FOR_A_PULL_REQUEST
Lists the files a pull request changes, with the status of each (added, modified, removed, renamed) and lines added and removed.read-only
List pull request comments
BITBUCKET_LIST_COMMENTS_ON_A_PULL_REQUEST
Lists a pull request's comments, general and inline (with `inline.path` and line), including replies (with `parent`).read-only
Comment on a pull request
BITBUCKET_CREATE_A_COMMENT_ON_A_PULL_REQUEST
Adds a comment to a pull request: a general one, one on a line of a file (`inline`), or a reply (`parent`).
Approve a pull request
BITBUCKET_APPROVE_A_PULL_REQUEST
Approves a pull request as the connected user.
Request changes
BITBUCKET_REQUEST_CHANGES_FOR_A_PULL_REQUEST
Marks a pull request as needing changes, as the connected user.
Decline a pull request
BITBUCKET_DECLINE_A_PULL_REQUEST
Declines (closes) a pull request without merging it.destructive
Merge a pull request
BITBUCKET_MERGE_A_PULL_REQUEST
Merges a pull request into its destination branch.destructive
List pipelines
BITBUCKET_LIST_PIPELINES
Lists a repository's Pipelines runs with state, trigger, branch and build number.read-only
Run a pipeline
BITBUCKET_RUN_A_PIPELINE
Starts a Pipelines run on a branch: its default pipeline, or a custom one from bitbucket-pipelines.yml with `selector`. A pipeline may deploy, so check which one runs.destructive
Get a pipeline
BITBUCKET_GET_A_PIPELINE
Returns one Pipelines run: state and result, target branch and commit, trigger, creator, start and end times and build seconds used.read-only
Try Bitbucket now
Sign in, connect your account and run any of these in the playground, or ask your agent through the router.
- “Get the current user”BITBUCKET_GET_CURRENT_USER
- “List my workspaces”BITBUCKET_LIST_WORKSPACES_FOR_THE_CURRENT_USER
- “List projects”BITBUCKET_LIST_PROJECTS_IN_A_WORKSPACE
Connect via MCP
Create an MCP server for Bitbucket in the dashboard, then add its URL to your client. This is the Claude Code command; the client guide has the others.
claude mcp add --transport http bitbucket \
"https://www.prompt-tm.com/mcp/<server id>?user_id=<your user>" \
--header "x-api-key: ptm_…"Connect via REST
Run a tool with one request. The response is { data, error, successful, log_id } for every tool.
curl -X POST https://www.prompt-tm.com/api/v3/tools/execute/BITBUCKET_GET_CURRENT_USER \
-H "x-api-key: $PROMPT_TM_KEY" -H "content-type: application/json" \
-d '{ "user_id": "alice", "arguments": {} }'