Skip to main content

Announcing StackOne Defender: leading open-source prompt injection guard for your agent Read More

Bitbucket MCP Server
for AI Agents

Production-ready Bitbucket MCP server with 134 extensible actions — plus built-in authentication, security, and optimized execution.

Bitbucket logo
Bitbucket MCP Server
Built by StackOne StackOne

Coverage

134 Agent Actions

Create, read, update, and delete across Bitbucket — and extend your agent's capabilities with custom actions.

Authentication

Agent Tool Authentication

Per-user OAuth in one call. Your Bitbucket MCP server gets session-scoped tokens with zero credentials stored on your infra.

Agent Auth →

Security

Agent Protection

Every Bitbucket tool response scanned for prompt injection in milliseconds — 88.7% accuracy, all running on CPU.

Prompt Injection Defense →

Performance

Max Agent Context. Min Cost.

Free up to 96% of your agent's context window to enhance reasoning and reduce cost, on every Bitbucket call.

Tools Discovery →

What is the Bitbucket MCP Server?

A Bitbucket MCP server lets AI agents read and write Bitbucket data through the Model Context Protocol — Anthropic's open standard for connecting LLMs to external tools. StackOne's Bitbucket MCP server ships with 134 pre-built actions, fully extensible via the Connector Builder — plus managed authentication, prompt injection defense, and optimized agent context. Connect it from MCP clients like Claude Desktop, Cursor, and VS Code, or from agent frameworks like OpenAI Agents SDK, LangChain, and Vercel AI SDK.

All Bitbucket MCP Tools and Actions

Every action from Bitbucket's API, ready for your agent. Create, read, update, and delete — scoped to exactly what you need.

Repositorys

  • Create Repository

    Create a new repository

  • Delete Repository

    Delete a repository

Default Reviewers

  • List Default Reviewers

    List default reviewers

  • Get Default Reviewers

    Get a default reviewer

  • List Default Reviewers

    List the default reviewers in a project

  • Get Default Reviewer

    Get a specific default reviewer for a project

  • Update Default Reviewers

    Add a user to the default reviewers

  • Update Default Reviewer

    Add a user as a default reviewer for the project

  • Delete Default Reviewers

    Remove a user from the default reviewers

  • Delete Default Reviewer

    Remove a user from the project's default reviewers

Deploy Keys

  • Create Deploy Keys

    Add a repository deploy key

  • Create Deploy Key

    Create a deploy key for a project

  • List Deploy Keys

    List repository deploy keys

  • Get Deploy Keys

    Get a repository deploy key

  • List Deploy Keys

    List deploy keys for a project

  • Get Deploy Key

    Get a project deploy key

  • Update Deploy Keys

    Update a repository deploy key

  • Delete Deploy Keys

    Delete a repository deploy key

  • Delete Deploy Key

    Delete a deploy key from a project

Diffs

  • Get Diff

    Compare two commits

  • Get Diff

    List changes in a pull request

Diffstats

  • Get Diffstat

    Compare two commit diff stats

  • Get Diffstat

    Get the diff stat for a pull request

Srcs

  • Create Src

    Create a commit by uploading a file

  • List Src

    Get the root directory of the main branch

  • Get Src

    Get file or directory contents

Patchs

  • Get Patch

    Get a patch for two commits

  • Get Patch

    Get the patch for a pull request

Branches

  • Create Branches

    Create a branch

  • List Branches

    List open branches

  • Get Branches

    Get a branch

Branch Restrictions

  • Create Branch Restrictions

    Create a branch restriction rule

  • List Branch Restrictions

    List branch restrictions

  • Get Branch Restrictions

    Get a branch restriction rule

  • Update Branch Restrictions

    Update a branch restriction rule

  • Delete Branch Restrictions

    Delete a branch restriction rule

Branching Models

  • List Branching Model

    Get the branching model for a repository

  • List Branching Model

    Get the branching model for a project

Settings

  • List Settings

    Get the branching model config for a repository

  • List Settings

    Get the branching model config for a project

  • Update Settings

    Update the branching model config for a repository

  • Update Settings

    Update the branching model config for a project

Commits

  • Create Commits

    List commits with include/exclude refs

  • Get Commit

    Get a commit

  • List Commits

    List commits

Approves

  • Create Approve

    Approve a commit

  • Create Approve

    Approve a pull request

  • Delete Approve

    Unapprove a commit

  • Delete Approve

    Unapprove a pull request

Comments

  • Create Comments

    Create comment for a commit

  • Create Comments

    Create a comment on a pull request

  • List Comments

    List a commit's comments

  • Get Comments

    Get a commit comment

  • List Comments

    List comments on a pull request

  • Get Comments

    Get a comment on a pull request

  • Update Comments

    Update a commit comment

  • Update Comments

    Update a comment on a pull request

  • Delete Comments

    Delete a commit comment

  • Delete Comments

    Delete a comment on a pull request

Reports

  • List Reports

    List reports

  • Get Reports

    Get a report

  • Update Reports

    Create or update a report

  • Delete Reports

    Delete a report

Statuses

  • List Statuses

    List commit statuses for a commit

  • List Statuses

    List commit statuses for a pull request

Builds

  • Create Build

    Create a build status for a commit

  • Get Build

    Get a build status for a commit

  • Update Build

    Update a build status for a commit

Pullrequests

  • Create Pullrequests

    Create a pull request

  • List Pullrequests

    List pull requests that contain a commit

  • List Pullrequests

    List pull requests

  • Get Pullrequests

    Get a pull request

  • List Pullrequests

    List workspace pull requests for a user

  • Update Pullrequests

    Update a pull request

Resolves

  • Create Resolve

    Resolve a comment thread

  • Delete Resolve

    Reopen a comment thread

Request Changes

  • Create Request Changes

    Request changes for a pull request

  • Delete Request Changes

    Remove change request for a pull request

Projects

  • Create Project

    Create a project in a workspace

  • List Projects

    List all projects in a workspace

  • Get Project

    Get a specific project by key

  • List Projects

    List projects in a workspace

  • Update Project

    Update an existing project

  • Delete Project

    Delete a project from a workspace

Pipelines

  • Create Pipelines

    Run a pipeline

  • List Pipelines

    List pipelines

  • Get Pipelines

    Get a pipeline

Pipelines Configs

  • List Pipelines Config

    Get configuration

  • Update Pipelines Config

    Update configuration

Steps

  • List Steps

    List steps for a pipeline

  • Get Steps

    Get a step of a pipeline

Logs

  • Get Log

    Get log file for a step

  • Get Logs

    Get the logs for the build container or a service container for a given step of a pipeline.

Schedules

  • Create Schedules

    Create a schedule

  • List Schedules

    List schedules

  • Get Schedules

    Get a schedule

  • Update Schedules

    Update a schedule

  • Delete Schedules

    Delete a schedule

Variables

  • Create Variables

    Create a variable for a repository

  • List Variables

    List variables for a repository

  • Get Variables

    Get a variable for a repository

  • Update Variables

    Update a variable for a repository

  • Delete Variables

    Delete a variable for a repository

Deployments

  • List Deployments

    List deployments for a repository

  • Get Deployment

    Get a deployment by UUID

Environments

  • Create Environment

    Create a deployment environment for a repository

  • List Environments

    List deployment environments for a repository

  • Get Environment

    Get a deployment environment by UUID

  • Update Environment

    Update a deployment environment configuration

Workspaces

  • List Workspaces

    List workspaces for the current user

  • Get Workspace

    Get a workspace

Ssh Keys

  • Create Ssh Keys

    Add a new SSH key

  • List Ssh Keys

    List SSH keys

  • Update Ssh Keys

    Update a SSH key

  • Delete Ssh Keys

    Delete a SSH key

Other (19)

  • Create Decline

    Decline a pull request

  • Create Merge

    Merge a pull request

  • Create Stoppipeline

    Stop a pipeline

  • List Repositories In Workspace

    List all repositories in a workspace

  • List Forks

    List repository forks

  • List Watchers

    List repositories watchers

  • List Downloads

    List download artifacts

  • List Repository Groups

    List explicit group permissions for a repository

  • List Pull Request Commits

    List commits on a pull request

  • List User Repository Permissions

    List repository permissions in a workspace for the authenticated user

  • List Workspace Repository Permissions

    List all repository permissions for a workspace

  • List Repository Permissions

    List all user permissions for a specific repository in a workspace

  • Get Workspace Project

    Get a project for a workspace

  • List Permissions

    List user permissions in a workspace

  • List Workspace Members

    List all members of a workspace

  • Get Authenticated User

    Get the currently authenticated user

  • List Users

    Get a user

  • Get SSH Key

    Get a SSH key

  • Update Build Number

    Update the next build number

Set Up Your Bitbucket MCP Server in Minutes

One endpoint. Any framework. Your agent is talking to Bitbucket in under 10 lines of code.

MCP Clients

Agent Frameworks

Claude Desktop
{
  "mcpServers": {
    "stackone": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote@latest",
        "https://api.stackone.com/mcp?x-account-id=<account_id>",
        "--header",
        "Authorization: Basic <YOUR_BASE64_TOKEN>"
      ]
    }
  }
}

More Developer Tools MCP Servers

Azure DevOps

172+ actions

Cloudflare

137+ actions

Supabase

128+ actions

GitLab

125+ actions

Terraform

118+ actions

OneLogin

109+ actions

LaunchDarkly

85+ actions

Bitbucket MCP Server FAQ

Bitbucket MCP server vs direct API integration — what's the difference?
A Bitbucket MCP server and direct API integration serve different use cases. Direct API integration is for software-to-software — backend code calling Bitbucket. A Bitbucket MCP server is for AI agents — MCP clients like Claude and Cursor, plus framework agents built with OpenAI, LangChain, or Vercel AI — discovering and calling Bitbucket at runtime. StackOne provides both.
How does Bitbucket authentication work for AI agents?
Bitbucket authentication for AI agents works through a StackOne Connect Session. Create one via the dashboard or the SDK — you get an auth link and ready-to-paste config for Claude Desktop, Cursor, and other MCP clients. Your user authenticates their own Bitbucket account; StackOne handles token exchange, storage, and refresh. Credentials never reach the LLM, and each user is isolated via origin_owner_id.
Are Bitbucket MCP tools vulnerable to prompt injection?
Yes — Bitbucket MCP tools can be vulnerable to indirect prompt injection. Any tool that reads user-written content — documents, messages, tickets, records, or free-text fields — is a potential vector. StackOne Defender scans every tool response before it enters the agent's context — regex patterns in ~1ms, then a MiniLM classifier in ~4ms. 88.7% accuracy, CPU-only.
What is the context bloat of a Bitbucket agent and how do I avoid it?
Context bloat happens when Bitbucket tool schemas and API responses eat your Bitbucket agent's memory, preventing it from reasoning effectively. A single Bitbucket query can return a massive JSON response, and connecting multiple tools compounds the problem. Tools Discovery and Code Mode reduce context bloat — loading only relevant tools per query and keeping raw responses out of the agent's context.
Can I limit which actions my Bitbucket agent can access?
Yes — you can limit which actions your Bitbucket agent can access directly from the StackOne dashboard. Toggle actions on or off, or restrict them to specific accounts, with no code changes to your agent. Session tokens can be scoped to exact actions so if one leaks, exposure stays contained.
Can I create custom agent actions for my Bitbucket MCP server?
Yes — you can create custom agent actions for your Bitbucket MCP server using Connector Builder. It's an integration agent your coding assistant (Claude Code, Cursor, or Copilot) can invoke to research Bitbucket's API, generate production-ready connector YAML, test against the live API, and validate before you ship.
When should I NOT use a Bitbucket MCP server?
Skip a Bitbucket MCP server if your integration is purely software-to-software — direct Bitbucket API integration is simpler when no AI agent is involved. For deterministic, compliance-critical operations (financial transactions, regulatory reporting), direct API gives you predictable behavior without agent-driven decision-making. MCP shines when AI agents need to dynamically discover and call Bitbucket actions at runtime.
What AI frameworks and AI clients does the StackOne Bitbucket MCP server support?
The StackOne Bitbucket MCP server supports both. MCP clients (paste-and-go apps): Claude Desktop, Claude Code, Cursor, VS Code, Goose. Agent frameworks (code SDKs you build with): OpenAI Agents SDK, Anthropic, Vercel AI, Google ADK, CrewAI, Pydantic AI, LangChain, LangGraph, Azure AI Foundry.

Put your AI agents to work

All the tools you need to build and scale AI agent integrations, with best-in-class connectivity, execution, and security.