Bitbucket MCP Server
for AI Agents
Connect your AI agent to StackOne's Bitbucket MCP server and give it 142 MCP tools out of the box. Auth, tool execution, and security all managed.
Coverage
142 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 142 pre-built actions, fully extensible via the Connector Builder — plus managed authentication, prompt injection defense, observability, and agent execution runtime. Connect it from MCP clients like Claude Desktop, Claude Code, Cursor, Goose, and VS Code, or from agent frameworks like OpenAI Agents SDK, LangChain, and Vercel AI SDK.
All Bitbucket MCP Tools
Every action from Bitbucket's API, ready for your agent. Create, read, update, and delete — scoped to exactly what you need.
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
- Get Branching Model
Get the branching model for a repository
- List Branching Model
Get the branching model for a project
Settings
- 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
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
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
Unified Organizations
- List Unified Organizations
List the Bitbucket workspaces the authenticated identity belongs to, mapped to the IAM unified organization schema. Wraps GET /user/workspaces (paginated, page/pagelen). Each entry's id is the workspace slug (e.g. "stackone") — the canonical, stable, human-readable identifier referenced by other IAM actions via filter.organization_id.
- Get Unified Organization
Retrieve a single Bitbucket workspace by its slug (e.g. "stackone"), mapped to the IAM unified organization schema. Wraps GET /workspaces/{workspace}. The {id} input must be the workspace slug as returned by unified_list_organizations; the endpoint also accepts UUIDs but slug is the canonical form.
Unified Roles
- List Unified Roles
Return the three stable workspace-permission IAM roles Bitbucket exposes ("owner", "collaborator", "member") synthesized from Bitbucket's workspace permission API. The role set is static, closed, and matches the permission values returned by GET /workspaces/{workspace}/permissions. Bitbucket Cloud has no public custom-roles API.
- Get Unified Role
Retrieve a single synthesized Bitbucket IAM workspace-permission role by stable key ("owner", "collaborator", or "member"). Any other id returns a generic typed record rather than a 404, since Bitbucket's role namespace has no notion of "unknown roles" to validate against.
Unified Users
- List Unified Users
List the members of a single Bitbucket workspace mapped to the IAM unified user schema, cursor-paginated 100 per page. REQUIRES filter.organization_id (the workspace slug). Bitbucket has no connection-global user list — users are workspace-scoped. Each entry's id is the user's account_id (e.g. "557058:..."). Members listing is sparse — call unified_get_user for the full profile (created_on, location, website).
- Get Unified User
Retrieve a single Bitbucket user by account_id (e.g. "557058:..."), mapped to the IAM unified user schema. Wraps GET /users/{selected_user} for the full profile (display_name, created_on, location, website, avatar). Field coverage is fuller than unified_list_users — call this to enrich a member listing. The endpoint also accepts UUIDs but the unified id contract uses account_id.
Pipelines
- Create Pipelines
Run a pipeline
- List Pipelines
List pipelines
- Get Pipelines
Get a pipeline
Pipelines Configs
- Get 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
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
- Update Project
Update an existing project
- Delete Project
Delete a project from a workspace
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
Diffs
- Get Diff
List changes in a pull request
- Get Diff
Compare two commits
Diffstats
- Get Diffstat
Get the diff stat for a pull request
- Get Diffstat
Compare two commit diff stats
Patchs
- Get Patch
Get the patch for a pull request
- Get Patch
Get a patch for two commits
Request Changes
- Remove Request Changes
Remove change request for a pull request
- Request Changes
Request changes for a pull request
Repositorys
- Create Repository
Create a new repository
- Get Repository
Get a repository
- Delete Repository
Delete a repository
Default Reviewers
- Add Default Reviewer
Add a user to the 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 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
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
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
Workspaces
- List Workspaces
List workspaces for the current user
- Get Workspace
Get a workspace
Other (29)
- Get Branching Model Settings
Get the branching model config for a repository
- Get Project Branching Model Settings
Get the branching model config for a project
- Get Unified Credentials
Return the authenticated identity and auth type for the current Bitbucket connection. Wraps GET /user for identity. Maps to the StackOne IAM unified credentials schema (name, auth_type, user). auth_type is pinned to "oauth" because this connector exposes only the OAuth 2.0 auth surface.
- List Unified Resource Types
List unified resource types in Bitbucket.
- List Unified Resource Users
List unified resource users in Bitbucket.
- List Pull Request Commits
List commits on a pull request
- 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
- Get Authenticated User
Get the currently authenticated user
- Get User
Get a user
- Get SSH Key
Get a SSH key
- 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
- List Permissions
List user permissions in a workspace
- List Workspace Members
List all members of a workspace
- Update Build Number
Update the next build number
- Unapprove Commit
Unapprove a commit
- Approve Commit
Approve a commit
- Stop Pipeline
Stop a pipeline
- Unapprove Pull Request
Unapprove a pull request
- Approve Pull Request
Approve a pull request
- Decline Pull Request
Decline a pull request
- Merge Pull Request
Merge a pull request
- Unresolve Pull Request Comment
Reopen a comment thread
- Resolve Pull Request Comment
Resolve a comment thread
Set Up Your Bitbucket MCP Server in Minutes
One endpoint. Any framework. Your agent is talking to Bitbucket in under 10 lines of code.
Agent Frameworks
{
"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>"
]
}
}
}Check More Developer Tools MCP Servers
185+ actions
150+ actions
136+ actions
136+ actions
131+ actions
129+ actions
110+ actions
Platform Resources
MCP Code Mode: Keeping Tool Responses Out of Agent Context
Anthropic's code_execution processes data already in context. Custom MCP code mode keeps raw tool responses in a sandbox. 14K tokens vs 500.
11 min
Comparing BM25, TF-IDF, and Hybrid Search for MCP Tool Discovery
Benchmarking BM25, TF-IDF, and hybrid search for MCP tool discovery across 916 tools. The 80/20 TF-IDF/BM25 hybrid hits 21% Top-1 accuracy in under 1ms.
10 min
Indirect Prompt Injection Defense for MCP Tools: A Technical Guide
MCP tools that read emails, CRM records, and tickets are indirect prompt injection vectors. Here's how we built a two-tier defense that scans tool results in ~11ms.
12 min
MCP vs A2A: Architecture, Security, and When to Use Each
MCP vs A2A: what each protocol standardizes, how they differ, their shared security risks including indirect prompt injection, and when to use one, both, or a hybrid architecture.
12 min
MCP vs API: What 200+ Connector Builds Taught Us
MCP wraps APIs, it doesn't replace them. After building 200+ connectors that serve both, here's when each approach wins.
14 min read
Bitbucket MCP Server FAQ
Does StackOne have a Bitbucket MCP server?
Bitbucket MCP server vs direct API integration — what's the difference?
How does Bitbucket authentication work for AI agents?
origin_owner_id.Are Bitbucket MCP tools vulnerable to prompt injection?
What is the context bloat of a Bitbucket agent and how do I avoid it?
Can I limit which actions my Bitbucket agent can access?
Can I create custom agent actions for my Bitbucket MCP server?
When should I NOT use a Bitbucket MCP server?
What AI frameworks and AI clients does the StackOne Bitbucket MCP server support?
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.