~/yunemregul/blog/bitbucket-mcp
githublinkedin
·1 min read·bitbucket-mcpmcpclaudebitbucketgit

Managing Bitbucket Pull Requests Through Claude

bitbucket-mcp is an MCP server that gives Claude programmatic access to Bitbucket Cloud. List, create, review, and merge pull requests from a conversation, with protected branches keeping sensitive targets off limits.

npm versionnpm downloadsLicense MITNode.js >= 18

My team lives in Bitbucket Cloud, and most of my review work is reading diffs, opening PRs, and chasing stale branches. I built bitbucket-mcp so Claude can handle that from a conversation.

It is a Model Context Protocol server that authenticates with an app password tied to my Atlassian account. Multiple workspaces, a default repo per workspace, and protected branches the AI cannot merge into.

The web UI

Other Bitbucket MCP servers exist. I like UIs more than config files, so mine has a browser console for adding workspaces, toggling protected branches, and watching live MCP activity over SSE as Claude calls tools.

Adding a workspace is one form: enter the credentials, test the connection inline, and mark main as protected.

What it exposes

  • list_workspaces / list_repos / list_branches: navigate workspaces, repositories, and branches with optional name filters
  • get_pull_requests / get_pull_request: filter by state, source, or destination branch; inspect a single PR
  • create_pull_request: open a PR between branches with title and description
  • merge_pull_request / decline_pull_request: merge with commit, squash, or fast-forward; decline stale ones
  • get_pr_diff / get_pr_file_diff: list changed files with line counts, or pull the full diff for one file

Example prompts

  • triage: List all open PRs in my-repo targeting the main branch.
  • open: Create a pull request from feature/SCC-1234 to develop with a summary of the changes.
  • review: Show me what files changed in PR #42 and give me a line-by-line diff of the auth module.
  • merge: Find the PR for branch feature/payments and merge it with a squash strategy.
  • cleanup: Decline the stale PRs that have been open for more than 30 days.

Run npx @yunusemregul/bitbucket-mcp, open http://localhost:18434 to add a workspace, then point your MCP client at /mcp/sse.

yunusemregul/bitbucket-mcp

MCP server for Bitbucket Cloud with a real web UI. Pull request workflows, multi-workspace config, and protected branches. Issues and PRs welcome.

JavaScriptMITgithub.com ↗