Bitbucket MCP server

Connect Bitbucket to Claude, ChatGPT, Cursor, Claude Code, Codex, Gemini, GitHub Copilot and any other MCP client, for your whole team. Metorial adds security, governance, and tracing, and gives everyone one Magic MCP URL to connect.

What you can do with the Bitbucket MCP server

Ask your agent in plain language. Each of these maps to a real tool on the server.

  • Use the delete repository tool in Bitbucket
  • Use the browse source tool in Bitbucket
  • Use the get pull request tool in Bitbucket
  • Use the fork repository tool in Bitbucket
  • Use the manage branches tool in Bitbucket
  • Use the manage pull request tool in Bitbucket

Supported Tools

delete_repository

Delete Repository

Permanently delete a repository from the workspace. This action is **irreversible** and removes all repository data including branches, commits, and pull requests.

browse_source

Browse Source

Browse repository source files at a specific revision (branch, tag, or commit hash). Returns directory listings or file contents depending on the path.

get_pull_request

Get Pull Request

Retrieve detailed information about a specific pull request including its description, reviewers, merge details, and comments summary.

fork_repository

Fork Repository

Fork an existing repository. The fork is created in the same workspace by default, or in a specified target workspace.

manage_branches

Manage Branches

List, create, or delete branches in a repository. Use action "list" to browse branches, "create" to create a new branch from a target commit/branch, or "delete" to remove a branch.

manage_pull_request

Manage Pull Request

Perform actions on a pull request: **approve**, **unapprove**, **merge**, **decline**, **request_changes**, or **remove_change_request**. Use "merge" with optional merge strategy and close-source-branch settings.

list_workspace_members

List Workspace Members

List all members in the configured workspace. Returns user display names, UUIDs, and account IDs.

update_repository

Update Repository

Update repository settings (wiki, fork policy, project, privacy, language, name, description). Omit a field to leave it unchanged.

list_pull_requests

List Pull Requests

List pull requests for a repository. Filter by state (OPEN, MERGED, DECLINED, SUPERSEDED) to find specific PRs.

manage_projects

Manage Projects

List, create, update, or delete projects in the workspace. Projects organize repositories into logical groups. Use action "list" to browse, "create"/"update" to manage, or "delete" to remove.

manage_pipelines

Manage Pipelines

List, get, trigger, or stop Bitbucket Pipelines. - **list**: View recent pipelines and their statuses. - **get**: Get details of a specific pipeline including steps. - **trigger**: Start a new pipeline on a branch, tag, or custom pattern. - **stop**: Stop a running pipeline.

create_pull_request

Create Pull Request

Create a new pull request to merge changes from a source branch into a destination branch. Supports setting title, description, reviewers, and close-source-branch option.

search_code

Search Code

Search for code across repositories in the workspace, optionally scoped to one repository. Returns matching file paths and code snippets.

list_commits

List Commits

List commits in a repository, optionally filtered by branch. Returns commit hashes, messages, authors, and dates.

create_repository

Create Repository

Create a new Git repository in the configured workspace. **Only repoSlug is required.** Display **name** defaults to the slug; **isPrivate** defaults to **true** and is always sent so the create payload matches Bitbucket's expectations. Optional: project, wiki, fork policy, language, description.

get_repository

Get Repository

Retrieve detailed information about a specific repository including its settings, main branch, project, and links.

create_commit_status

Create Commit Status

Create or update a build status on a specific commit. Typically used by CI/CD tools to report build results. The **key** uniquely identifies the status — updating with the same key replaces the previous status.

list_repositories

List Repositories

List repositories in the configured workspace. Supports filtering by query and pagination. Use the **query** parameter for Bitbucket's query language filtering (e.g. `name ~ "myrepo"`), or pass plain text to match repository names.

manage_tags

Manage Tags

List, create, or delete tags in a repository. Use action "list" to browse tags, "create" to create a new tag at a specific commit, or "delete" to remove a tag.

comment_on_pull_request

Comment on Pull Request

Add a comment to a pull request. Supports general comments and inline code comments on specific files and lines. For inline comments, provide the file path and line number. For multi-line comments, provide both fromLine and toLine.

list_pull_request_comments

List Pull Request Comments

Retrieve comments on a pull request, including threaded replies and inline code comment metadata.

manage_branch_restrictions

Manage Branch Restrictions

List, get, create, update, or delete branch restriction rules. These rules enforce push restrictions and merge checks for matching branches.

manage_default_reviewers

Manage Default Reviewers

List, get, add, or remove repository default reviewers. Default reviewers are automatically added to newly created pull requests.

manage_webhooks

Manage Webhooks

List, create, get, update, or delete repository webhooks. Webhooks subscribe an external URL to Bitbucket repository events such as pushes, pull request updates, and build status changes.

Connect Bitbucket to your AI client

Every client uses the same Magic MCP URL, and so does any other MCP client. Add it once and sign in with SSO.

  1. Enable Bitbucket in Metorial. In your Metorial portal, enable the Bitbucket MCP server and sign in with the account that owns the data. Access stays governed by your team policies.
  2. Add a custom connector. Open Customize, then Connectors. Select Add, then Custom, then Web.
  3. Paste your Metorial MCP URL. Name it Metorial, paste your Magic MCP URL (<your-magic-mcp-url>) and continue.
  4. Sign in. Select Add and sign in to load Bitbucket tools.

Run Bitbucket through the Metorial gateway

One governed layer for every app your agents reach, not a separate connector per tool.

  • Give Bitbucket and every other app to your whole team through one MCP gateway, behind your SSO.
  • Scope which teams and agents can use Bitbucket tools with role-based access control, and trace every call.
  • Prefer to run it yourself? Metorial is open source and self-hostable.

More integrations teams use with Bitbucket

Notion

Create, read, update, and archive pages and databases in a Notion workspace. Manage blocks (paragraphs, lists, headings, embeds, etc.) within pages. Query databases with filters and sorts across rich property types including text, numbers, dates, selects, relations, and formulas. Search across pages and databases by title. Add and read comments on pages and blocks. Upload files to pages. Manage workspace users and retrieve user profiles.

Google Sheets

Create, read, and update spreadsheets and their cell data. Read and write values to individual cells, ranges, or multiple ranges using A1 notation or named ranges. Apply cell formatting including text styles, backgrounds, borders, number formats, and conditional formatting. Manage sheets (tabs) within a spreadsheet—add, delete, copy, rename, and reorder them. Create and manage embedded charts, pivot tables, filter views, data validation rules, protected ranges, named ranges, and merged cells. Perform batch operations to apply multiple updates atomically.

GitHub

Manage repositories, issues, and pull requests. Create and configure branches, star repositories, review code, and merge changes. Automate CI/CD workflows with GitHub Actions, manage workflow runs, secrets, and artifacts. Track issues with labels, milestones, and assignees. Search across code, repositories, issues, and users. Manage organizations, teams, and memberships. Create and manage projects, gists, packages, deployments, and environments. Access security alerts including code scanning, secret scanning, and Dependabot alerts. Read and write file contents in repositories. Manage webhooks, notifications, and codespaces.

Salesforce

Manage CRM data including Accounts, Contacts, Leads, Opportunities, Cases, and custom objects. Create, read, update, and delete records. Query data using SOQL and search across objects using SOSL. Perform bulk data operations for large-scale imports, exports, and migrations. Execute composite requests to batch multiple operations in a single API call. Access analytics, reports, and dashboards. Manage files and attachments associated with records. Interact with Chatter feeds, posts, and groups for social collaboration. Manage org metadata including custom objects, fields, layouts, and workflows. Query data using GraphQL for precise data retrieval across related objects.

Sharepoint

Manage SharePoint sites, document libraries, lists, and files. Create, read, update, and delete lists and list items with custom columns. Resolve site users to numeric Person/Group LookupId values. Upload, download, move, copy, and version files in document libraries. Search across sites, files, folders, lists, and list items using Microsoft Search. Manage permissions at site, list, and item levels with granular access control. Define and manage content types and site columns. Retrieve site properties and search for sites across Microsoft 365.

Microsoft Outlook

Send, read, reply to, forward, and manage email messages in user mailboxes. Organize messages into folders, apply categories, flags, and importance levels. Manage file and item attachments. Create, update, delete, and respond to calendar events and meetings. Find available meeting times, manage attendees, handle recurrence, and work with shared or delegated calendars. Create, read, update, and delete contacts, organize them into contact folders, and manage contact photos. Manage tasks and task lists via Microsoft To Do, including due dates, reminders, recurrence, and checklist items. Support for Focused Inbox, @-mentions, mail tips, send-on-behalf, and send-as capabilities.

Technical notes for Bitbucket

Manage Git repositories, pull requests, and CI/CD pipelines on Bitbucket Cloud. Create, fork, and configure repositories within workspaces and projects. Create, review, approve, merge, and decline pull requests with inline code comments. Browse source code, list commits, and manage branches and tags. Trigger, monitor, and manage Bitbucket Pipelines. List workspace members, configure repository default reviewers and branch restrictions, create and manage repository webhooks, and search code across repositories.

Frequently asked questions

Common questions about connecting Bitbucket to AI agents with Metorial.

  1. How many tools does the Bitbucket MCP server have?
    The Bitbucket MCP server exposes 24 tools, including Delete Repository, Browse Source, Get Pull Request. Each one is governed and traced through Metorial.
  2. Bitbucket exposes tools your agents call on demand; it does not publish event triggers yet. Everything still runs through one governed MCP URL.
  3. Any MCP client, including VS Code, Windsurf, Zed, OpenCode and Grok. Each one reaches the Bitbucket MCP server through the same Metorial URL.
  4. Use role-based access control to decide which teams, users, and agents can use Bitbucket and which of its tools they can call.
  5. Yes. Metorial is open source, so you can run the Bitbucket MCP server yourself or use the hosted gateway.

Connect Bitbucket to production AI agents

See how Metorial gives your team governed access to Bitbucket, with tracing and security controls built in.