Bitbucket icon

CONNECT APP

Build with Bitbucket

Bitbucket Cloud is a Git-based code and CI/CD tool optimized for teams using Jira.

Developer Tools

  • OAuth

MCP

Give your agent Bitbucket tools

Every Bitbucket action is exposed as an MCP tool on Pipedream's remote server. Point a client at it with your end user's ID and Connect resolves that user's Bitbucket account for each tool call — you store no tokens.

// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": "{project_id}",
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "bitbucket",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// e.g. run Create Snippet Comment:
const result = await mcp.callTool({
  name: "bitbucket-create-snippet-comment",
  arguments: {
    workspaceId: "Workspace",
    snippetId: "Snippet",
  },
})

API PROXY

Call the Bitbucket API directly

For an endpoint with no pre-built tool, the Connect proxy forwards your request to the Bitbucket API with the connected user's credentials attached. You store no tokens and write no refresh logic.

const resp = await pd.proxy.get({
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  accountId: "apn_xxxxxxx",
  url: "https://api.bitbucket.org/2.0/user",
})

// Any allowed Bitbucket endpoint works here. Pipedream attaches the
// connected account's credentials to the outgoing request.

SDK

Run Bitbucket actions from your backend

Connect a user's Bitbucket account once, then run Create Snippet Comment on their behalf from your own code — TypeScript, Python, or plain HTTP.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "bitbucket-create-snippet-comment",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    bitbucket: { authProvisionId: "apn_xxxxxxx" },
    workspaceId: "Workspace",
    snippetId: "Snippet",
  },
})

MULTI-APP

Use Bitbucket with other popular apps

Most products don't stop at one integration. Pair Bitbucket with the other apps your users rely on, and ship use cases that span both.

Jira icon Jira Jira is the #1 agile project management tool used by teams to plan, track, release, and support great software with confidence Google Drive icon Google Drive Google Drive is a file storage and synchronization service which allows you to create and share your work online, and access your documents from anywhere. GitHub icon GitHub Where the world builds software. Millions of developers and companies build, ship, and maintain their software on GitHub—the largest and most advanced development platform in the world. Notion icon Notion Notion is a new tool that blends your everyday work apps into one. It's the all-in-one workspace for you and your team. Confluence icon Confluence Get, create, update, and delete content, spaces, and more. Slack icon Slack Slack is the AI-powered platform for work bringing all of your conversations, apps, and customers together in one place. Around the world, Slack is helping businesses of all sizes grow and send productivity through the roof. Discord icon Discord Use this app to create deploy Discord triggers that emits messages from your guild Anthropic (Claude) icon Anthropic (Claude) AI research and products that put safety at the frontier. Introducing Claude, a next-generation AI assistant for your tasks, no matter the scale. n8n.io icon n8n.io The workflow automation platform that doesn't box you in, that you never outgrow. Google Gemini icon Google Gemini Google Gemini is a multimodal AI by DeepMind that processes text, audio, images, and more. Linear (API key) icon Linear (API key) Linear helps streamline software projects, sprints, tasks, and bug tracking. It's built for high-performance teams. Snowflake icon Snowflake A data warehouse built for the cloud

REFERENCE

App details

Reference metadata for the Bitbucket connector in the Pipedream registry.

App slug
bitbucket
Authentication
OAuth
Categories
Developer Tools
Actions
4
Triggers
11
API proxy
Available

OAuth scopes

These are the scopes Pipedream's managed Bitbucket OAuth client requests when one of your users connects an account. Supply your own OAuth client to request a different set.

  • account
  • account:write
  • team:write
  • repository:write
  • pullrequest:write
  • snippet:write
  • issue:write
  • email
  • wiki
  • webhook