Skip to content
Ivan Petković

Dec 3, 202617 min read

Bitbucket MCP is a Model Context Protocol server that lets an AI assistant read and act on your Bitbucket repositories and pull requests through a fixed set of tools, much like the MCP servers that platforms such as Activepieces expose to assistants.

Which tools it exposes, and what it's allowed to do with them, depends on the server you install and the token you hand it.

Bitbucket MCP defined: what the server does

Bitbucket MCP in two sentences

MCP is an open protocol that gives an AI client one standard way to call tools in another system, so the assistant doesn't need custom code for each service.

A Bitbucket MCP server is the translator in the middle: it takes the assistant's request, calls the Bitbucket Cloud API with your credentials, and returns the result as text the model can read.

Three boxes in a row: an AI assistant on the left, a small MCP server box in the middle holding a key, and a Bitbucket…

Follow one request through the picture below and you see the full loop: the assistant client sends a tool call to the MCP server, the server calls Bitbucket, and the result travels back the same way.

The thing to take from it's that the server, not the model, holds your credentials and makes the actual API calls. That's where permissions get enforced, so it's where you'll spend your attention.

Re-check anything older than 2026-12-03, because server projects change their tool lists often. Everything here was checked on that date.

Official Atlassian server versus community servers

Before you plan around the official server, confirm in Atlassian's documentation that the repository and pull request tools you need are actually there.

Atlassian publishes its own remote MCP server for its cloud products, but Bitbucket coverage on it has been narrower than what many teams expect.

Where the official server falls short, community servers fill the gap. They're open-source projects, typically run locally, and they usually cover repositories, branches, commits and pull requests in more depth.

The trade-off is that nobody with a support contract stands behind them. Before installing one, check four things:

  1. When the repository last had a commit.
  2. Whether it authenticates with a scoped API token or app password rather than your personal login.
  3. Whether it can be restricted to read-only tools.
  4. Whether you can read the source for every tool it registers.

Skipping the fourth check is the usual day-three regret: a tool you never knew existed turns out to delete branches.

What an assistant can and cannot do through it

Through a typical server, an assistant can list repositories, read files and diffs, search commits, open and comment on pull requests, and in some servers approve or merge them.

It can only do what the token allows. A read-only token turns a merge tool into an error message, whatever the model decides to attempt.

It can't see anything outside the workspace the token is scoped to. It also has no memory of past runs, and it makes a judgment call each time it's asked.

A read-only token turns a merge tool into an error message, whatever the model decides to attempt.

That last point matters for repeatable jobs such as labeling every new pull request, where a plain trigger-and-action workflow may need no model at all, and Activepieces runs those as flows, unlimited on every plan including free. The later sections cover that decision.

Everything below works on Activepieces' free plan. Start without code or a credit card.

How Bitbucket MCP connections are set up

Budget 20 to 30 minutes, most of it spent in Bitbucket's settings pages, which means the work consists of navigating configuration tabs.

Four stages get you a working connection: a read-only credential, a server entry in your client's config, one harmless read, and then a single write action you switch on yourself.

Stage 1: Create a read-only credential in Bitbucket

Create an access token scoped to one repository or one workspace, not your personal account password. Tick only the read scopes for repositories and pull requests, and leave every write scope unticked.

A token card with a checklist of scope switches: the read scopes for repositories and pull requests switched on, the write…

Bitbucket's own documentation lists the scope names and where the token page lives, and the names differ between token types, so copy them from there rather than from a third-party README.

Save the token once, in a password manager. Bitbucket shows it a single time, so if you close the tab you're generating a new one.

Stage 2: Add the server to your AI client's config

Open your client's MCP configuration file, a JSON file with a servers block, and add one entry.

It needs a name, the command or URL that starts the server, and the credential passed as an environment variable. Workspace slug and username go in the same block if the server asks for them.

A printed config block of structured text: a server entry with a name, a command line, and an environment variable line…

You'll hit two gotchas here. A stray comma breaks the whole file, and most clients fail silently instead of pointing at the line.

And pasting the token directly into the JSON means it lands in your dotfiles backup, so reference an environment variable where the client allows it.

Then fully quit and restart the client. A window reload often doesn't respawn the server process.

Stage 3: Run a first read-only request

Ask for something with no side effects: list the repositories in the workspace, or summarize the open pull requests on one repo. If the answer lists the right repositories, the token, the config and the server all work.

Activepieces workflow builder with a Google Calendar to Gmail automation showing a failed run due to authentication errors.

If it fails with a 403 or an "insufficient scopes" message, the token is missing a read scope. Fix it in Bitbucket, generate a new token, and restart again.

The same failure shows up in any automation tool that holds a mis-scoped credential, as in the failed run below, where a scope error is the entire diagnosis.

A three-step workflow run that failed with a 403 insufficient authentication scopes error

Read the error text before changing anything else, because it names the scope problem directly. That is the failure mode to expect. With reads confirmed, you can add write access.

Enable one Bitbucket MCP write action safely

Pick the narrowest write you actually need, such as commenting on a pull request, and add only that scope to a new token. Swap it into the config and restart.

Test it on a throwaway repository first. Keep your client's per-call approval prompt switched on, so every write needs a click from you. Leave merging, branch deletion and pipeline triggers off until a task justifies them.

The Activepieces MCP Server configuration interface with setup instructions for Claude, Cursor, Windsurf and other clients.

Where teams use Bitbucket MCP in practice

Where a person is already at the keyboard and the task is mostly reading, Bitbucket MCP pays off: summarising pull requests, drafting review comments, searching history and checking pipeline status.

That also explains why you left merging and pipeline triggers off, because none of these tasks need them.

Pull request review and summaries

Point the assistant at a pull request and ask for a summary of what changed and why. It reads the diff, the description and the existing comments through the server, then writes the summary.

The gotcha on day three is large diffs: generated files and lockfiles crowd out the code that matters, so tell the assistant which paths to ignore.

For review comments, have it draft and let a human post. A read-only token enforces that by construction. Comment-write permission is the only extra scope this task needs, and you can add it later.

Activepieces workflow builder showing email validation and Google Calendar event attendee addition automation with…

Repository search and history questions

"Who last changed the retry logic, and what was the pull request about?" is a good MCP question. The assistant walks commits, blame and linked pull requests, then answers in plain language.

Questions like this are one-off and hard to script in advance, which is where an AI in the loop earns its place. Verify any answer that names a person or a commit before you act on it.

When Pipelines or webhooks beat Bitbucket MCP

If a task must run on every push, with nobody asking, it doesn't belong in a chat client. Bitbucket Pipelines and webhooks fire on events, behave the same each time, and fail in a way you can read in a log.

A no-code workflow tool sits between the two: it runs unattended, but its judgement is whatever you wired in.

Read the table as a filter: if a row says "needs a human prompting" and your task has no human, pick a different row. It shows the three side by side.

Needs a human prompting Runs unattended Handles judgement Failure behaviour
MCP in an AI client Yes No Yes, with review Wrong or partial answer, often silent
Bitbucket Pipelines/webhooks No Yes No, fixed rules only Fails loudly in a log, same way each time
No-code workflow tool No Yes Limited to the steps you configure Stops at the failed step, usually with an alert

Match the tool to the task, then set permissions to fit. Judgement calls with a person present go to MCP, and repeatable event-driven work goes to Pipelines or a workflow tool.

Easier to see it running than to read about it: set it up free, no card.

What Bitbucket MCP costs and requires

We found no separate charge for Bitbucket MCP itself: you pay for a Bitbucket plan, an AI client subscription, and you work inside Atlassian's API rate limits.

The table shows what we could source and what we couldn't, so a "Yes" in the last column means treat that cell as unverified.

Item Cost Source Date checked Not found
Bitbucket Free $0 Not found Not recorded Yes
Bitbucket Standard $3.65 Not found Not recorded Yes
Bitbucket Premium $8 Not found Not recorded Yes
Claude Pro $20 Not found Not recorded Yes
ChatGPT Plus $20 Not found Not recorded Yes
Rate limits Included Atlassian Not recorded No

Verify the plan and subscription prices on the vendor pricing pages before you budget. The rate limits are the only row with a source.

Per user, the list prices we have are $0 for Free, $3.65 for Standard and $8 for Premium.

We didn't find whether MCP access depends on plan, so test on Free before paying for an upgrade. Your credentials, not the plan, decide what the assistant can touch.

Budget $100 on top of Bitbucket seats for a team of five running assistants against Bitbucket: Claude Pro and ChatGPT Plus are both listed at $20, a flat seat per person.

We didn't confirm whether either subscription supports a given Bitbucket MCP server, so check the server's documentation.

Per request type, Atlassian publishes these limits:

We found no published token rules for Bitbucket MCP servers. Until you see them, assume the server's own documentation is the authority and test with a small task first.

Avoid five Bitbucket MCP mistakes

Nothing here is a Bitbucket bug: most failures come from five setup choices, and a small test task will expose several of them before they cost you anything. The list below is what to check before connecting a server.

  • Write scopes granted where read-only suffices
  • A personal token on a shared team
  • An unvetted community server
  • No approval before merge or push
  • Prompt injection via PR content

The four sections below take these in turn, with the shared-token problem covered under credentials.

Over-broad credentials

Start with read access to repositories and pull requests, and add write scope only for a task that needs it. A personal token on a shared team is the worse version of this mistake.

Every action in the audit log carries one person's name, and the integration breaks the day that person leaves. Use a repository or workspace access token scoped to the repos the assistant actually works on.

Unvetted community servers

33% of the top 1,000 MCP servers had critical flaws, according to the Enkrypt AI scan. That's about one in three, so picking a popular server without reading it is a coin toss weighted against you.

Critical flaws found in scanned MCP servers

Elsewhere the numbers vary widely: 24.5% of servers in the Securin set and 96.4% in the mcpjail set, both cited by that scan, so the actual prevalence rate cannot be determined from either measurement.

The spread depends on how strictly each scan tests, and at the high end almost nothing passes. Read the source, pin a version, and don't update blindly.

Prompt injection and unreviewed writes

When anyone can open a pull request, anyone can write text your assistant will read. A description or comment can contain instructions, and the model may follow them.

Keep the token read-only on repositories that accept outside contributions, so a successful injection has nothing to write with.

Require confirmation on merge, push, and delete. The gotcha you'll hit by day three is the "always allow" prompt: someone clicks it to stop the interruptions, and every later write runs unreviewed. Check the client's permission settings after the first week.

Automate Bitbucket events with Activepieces

Activepieces answers a question this article keeps circling: whether the Bitbucket connection you build for an unattended job has to be rebuilt before an assistant can use it.

It doesn't, because a connected integration runs as a flow step and is also a tool on the project's MCP server, so Claude, ChatGPT, Cursor or an agent of your own can call the same Bitbucket action with nothing to export or publish a second time.

Activepieces MCP Server setup page with client configuration instructions and code example.

The mechanism is visible in packages/integrations in the open source repo, next to the 751 integrations counted there, where the action a flow runs is the one exposed as the MCP tool, which means the exposure exists across hundreds of distinct services.

Activepieces runs jobs like this unattended through its Bitbucket integration, such as posting every new pull request to a Slack channel, where an AI assistant has nothing to decide, and it does so across 751 integrations under an MIT-licensed core, by which point even a single automation can affect hundreds of downstream systems.

In the screenshot below, the flow is two steps: a trigger (here a Stripe "Payment Failed" event) feeding a Slack "Send Message To A Channel" action, with the channel and message template set in the right panel, letting you automate real business logic without code, so critical business logic can be set up for automatic execution with minimal expertise.

A workflow automation canvas showing a Stripe payment failed trigger connected to a Slack message action, with…

The left sidebar shows step_1 completed and a "Run succeeded" notice.

Swap the trigger for a Bitbucket event and you have the pull-request notifier. What to take from it: the whole job is a fixed trigger, a fixed action and a template, and each run leaves a record you can inspect.

Where a workflow beats an AI assistant

When the same event should always produce the same result, a workflow wins. A new pull request opens, a message goes to a channel, and nobody types a prompt.

The run log tells you whether it fired, which is something a chat session doesn't give you.

It loses on anything interactive. "Which open pull requests touch the payments module?" or "Summarize what changed since Friday" are questions, not events, and an MCP server connected to your assistant is the right tool for them.

Activepieces MCP Server configuration page with client setup instructions and server configuration code

Activepieces can also expose its own tools over MCP, so the two aren't rivals. You can let the assistant call a workflow you've already built and tested.

Skip Activepieces if your only need is ad-hoc questions about repositories, or if you already get the notifications you want from Bitbucket's own Slack integration. A second system to maintain has to buy you something.

To start on Monday:

  1. Pick one repetitive notification, such as new pull requests to a team channel.
  2. Create a flow with the Bitbucket trigger and a Slack "Send Message To A Channel" action.
  3. Authenticate Bitbucket with an account or token scoped to read what the trigger needs, and nothing more. Reuse the permissions discipline from the MCP setup.
  4. Write the message template with the pull request title, author and link, so nobody has to open Bitbucket to decide whether it matters.
  5. Open a test pull request and confirm the run appears in the run details as succeeded.

On day three, a connection that expires or loses access fails quietly. Check the run list after the first few days, not just the channel.

Frequently asked questions

Is there an official Bitbucket MCP server from Atlassian? Atlassian's own remote MCP server has centered on Jira and Confluence, and the Bitbucket servers most people install are community-built. Check Atlassian's current documentation before assuming Bitbucket is covered.

If you go with a community server, read its source and its maintenance history first, because you're handing it a credential.

Is Bitbucket MCP free to use? The protocol is open, and most community Bitbucket servers are open-source, so the server itself usually costs nothing.

The costs sit around it: your Bitbucket plan, the AI client you connect it to, and the model usage each tool call consumes. A chatty assistant that lists repositories and reads diffs all day will show up on that last bill.

Is it safe to give an AI assistant access to my Bitbucket code?

It's as safe as the credential you hand over. Create a dedicated token limited to the repositories the task needs, give it read access first, and add write permission only when a specific workflow requires it. Never reuse your personal admin login.

Remember that whatever the assistant reads is sent to the model provider, so check that provider's data terms against your code-handling policy. Then review the activity log after the first few days, since a scoped token only limits damage and doesn't prevent mistakes.

Does Bitbucket MCP work with Bitbucket Data Center? It depends on the server. Bitbucket Cloud and Bitbucket Data Center expose different APIs and authenticate differently, and many MCP servers target Cloud only.

Read the README for which product it supports and which token type it expects. If it names only Cloud, expect to fail at authentication on day one rather than to find a quiet workaround.

What is the difference between Bitbucket MCP and the Bitbucket API?

Think of the API as the set of endpoints Bitbucket publishes. An MCP server wraps a chosen subset of those endpoints as tools an AI assistant can discover and call in a standard way.

Nothing new in access comes with MCP: it's a translation layer over the same API, with the same permissions.

If the job is fixed and repeatable, such as tagging a release or posting build status, call the API from a pull request pipeline and leave the assistant out.

References

Share

Get started

Automate this without code.

Cloud or your own servers.

Start free Talk to sales