# Bitbucket — MCP server on mcp.ai > Bitbucket is a Git-based code hosting and collaboration platform supporting private and public repositories, enabling teams to manage and review code through pull requests and integrations By: mcp.ai · official Page: https://mcp.ai/bitbucket ## Connect (MCP protocol) Remote MCP endpoint (HTTP, streamable): https://api.mcp.ai/p_bitbucket?ms=1781542320000 Add it as a custom/remote MCP connector, then authenticate when prompted. ## REST API (no MCP client required) Every tool is also a REST endpoint, authed with a workspace API key. Discover: GET https://api.mcp.ai/api/bitbucket/_endpoints # public; lists every endpoint Call: POST https://api.mcp.ai/api/bitbucket/ Authorization: Bearer sk_live_… # create one at https://mcp.ai/settings/api-keys Content-Type: application/json Body: { …args } → { "ok": true, "tool": "", "result": { … } } ## Developer docs How to use (MCP or REST), markdown: https://mcp.ai/bitbucket/skill.md Postman collection (v2.1): https://mcp.ai/bitbucket/postman.json ## Tools - bitbucket_create_branch(name: string, repo_slug: string, workspace: string, target_hash: string) — Creates a new branch in a bitbucket repository from a target commit hash; the branch name must be unique, adhere to bitbucket's naming conventions, and not include the 'refs/heads/' prefix. - bitbucket_create_issue(kind?: string, title: string, due_on?: string, content: string, assignee?: string, priority?: string, repo_slug: string, workspace: string, version_id?: integer, component_id?: integer, milestone_id?: integer) — Creates a new issue in a bitbucket repository, setting the authenticated user as reporter; ensures assignee (if provided) has repository access, and that any specified milestone, version, or component - bitbucket_create_issue_comment(content: string, issue_id: string, repo_slug: string, workspace: string) — Adds a new comment with markdown support to an existing bitbucket issue. - bitbucket_create_pull_request(title: string, repo_slug: string, reviewers?: object[], workspace: string, description?: string, source_branch: string, destination_branch?: string, close_source_branch?: boolean) — Creates a new pull request in a specified bitbucket repository, ensuring the source branch exists and is distinct from the (optional) destination branch. - bitbucket_create_repository(has_wiki?: boolean, language?: string, repo_slug: string, workspace: string, has_issues?: boolean, is_private?: boolean, description?: string, fork_policy?: string, project_key?: string) — Creates a new bitbucket 'git' repository in a specified workspace, defaulting to the workspace's oldest project if `project key` is not provided. - bitbucket_create_snippet_comment(content: string, parent_id?: integer, workspace: string, encoded_id: string) — Posts a new top-level comment or a threaded reply to an existing comment on a specified bitbucket snippet. - bitbucket_delete_issue(issue_id: string, repo_slug: string, workspace: string) — Permanently deletes a specific issue, identified by its `issue id`, from the repository specified by `repo slug` within the given `workspace`. - bitbucket_delete_repository(repo_slug: string, workspace: string) — Permanently deletes a specified bitbucket repository; this action is irreversible and does not affect forks. - bitbucket_get_current_user() — Retrieves the profile information (uuid, display name, links, creation date) for the currently authenticated bitbucket user. - bitbucket_get_file_from_repository(path: string, commit: string, repo_slug: string, workspace: string) — Retrieves a specific file's content from a bitbucket repository at a given commit (hash, branch, or tag), failing if the file path is invalid for that commit. - bitbucket_get_pull_request(repo_slug: string, workspace: string, pull_request_id: integer) — Get a single pull request by id with complete details. - bitbucket_get_snippet(workspace: string, encoded_id: string, accept_format?: string) — Retrieves a specific bitbucket snippet by its encoded id from an existing workspace, returning its metadata and file structure. - bitbucket_list_pull_requests(page?: integer, state?: string, pagelen?: integer, repo_slug: string, workspace: string) — Lists pull requests in a specified, accessible bitbucket repository, optionally filtering by state (open, merged, declined). - bitbucket_list_repositories_in_workspace(q?: string, role?: string, sort?: string, workspace: string) — Lists repositories in a specified bitbucket workspace, accessible to the authenticated user, with options to filter by role or query string, and sort results. - bitbucket_list_workspace_members(workspace: string) — Lists all members of a specified bitbucket workspace; the workspace must exist. - bitbucket_list_workspaces(q?: string, sort?: string) — Lists bitbucket workspaces accessible to the authenticated user, optionally filtered and sorted. - bitbucket_update_issue(kind?: string, state?: string, title?: string, content?: string, version?: string, issue_id: string, priority?: string, component?: string, milestone?: string, repo_slug: string, workspace: string, assignee_account_id?: string) — Updates an existing issue in a bitbucket repository by modifying specified attributes; requires `workspace`, `repo slug`, `issue id`, and at least one attribute to update. ## Links Docs: https://mcp.ai/docs/mcps/bitbucket Website: https://mcp.ai/mcps/bitbucket