npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@yunusemregul/bitbucket-mcp

v1.0.0

Published

MCP server for Bitbucket Cloud — read and manage pull requests, branches, and repositories from any MCP client

Readme

bitbucket-mcp

npm version npm downloads License Node.js

A Model Context Protocol (MCP) server that gives AI assistants (like Claude) programmatic access to Bitbucket Cloud. It enables reading and managing pull requests, browsing repositories and branches, and automating code review workflows from your MCP client.

It authenticates with Bitbucket using an app password tied to your Atlassian account. Multiple workspace connections can be configured, with an optional default repository per workspace.

What You Can Do

  • "List all open PRs in my-repo targeting the main branch"
  • "Create a pull request from feature/SCC-1234 to develop with a summary of the changes"
  • "Show me what files changed in PR #42 and give me a line-by-line diff of the auth module"
  • "Find the PR for branch feature/payments and merge it with a squash strategy"
  • "Decline the stale PRs that have been open for more than 30 days"

Web UI showing workspace list and live activity log

Features

  • Multi-workspace support: configure and switch between multiple Bitbucket Cloud workspaces
  • Default repository: set a default repo per workspace so you don't need to specify it every call
  • Web UI: browser-based management console for adding/editing workspace connections
  • Protected branches: mark branches as protected to prevent accidental AI-triggered merges
  • Branch autocomplete: the UI fetches and caches branch names for fast autocomplete
  • Real-time activity log: live MCP tool execution log via SSE streamed to the Web UI
  • Mock OAuth: built-in OAuth stub so MCP clients that require OAuth flows work out of the box

Tools

| Tool | Description | |------|-------------| | list_workspaces | List all configured Bitbucket workspace connections | | list_repos | List repositories in a workspace | | list_branches | List branches in a repository with optional name filter | | get_pull_requests | List pull requests filtered by state, source, or destination branch | | get_pull_request | Get details of a single pull request | | create_pull_request | Open a new pull request | | merge_pull_request | Merge a pull request (merge commit, squash, or fast-forward) | | decline_pull_request | Decline a pull request | | get_pr_diff | List all files changed in a PR with line counts | | get_pr_file_diff | Get the full diff for a specific file in a PR |

Installation

Via npx (recommended)

npx @yunusemregul/bitbucket-mcp

Global install

npm install -g @yunusemregul/bitbucket-mcp
bitbucket-mcp

The server starts on http://localhost:18434 by default.

Options:
  -p, --port    Port to listen on (default: 18434)
  -v, --version Print version
  -h, --help    Show help

Workspace configuration is stored in ~/.bitbucket-mcp/workspaces.json.

Configuration

Via Web UI

Open http://localhost:18434/ in your browser, click + Add Workspace, fill in the details (connection is tested automatically as you type), then click Save.

Add Workspace form with live connection test

Workspace options

| Field | Type | Description | |-------|------|-------------| | name | string | Display name for this connection | | workspaceSlug | string | Bitbucket workspace slug (from the URL) | | username | string | Atlassian account email | | token | string | Bitbucket app password | | repoSlug | string | Default repository slug (optional) | | protectedBranches | string[] | Branches the AI is not allowed to merge into |

Tip: Set protectedBranches to ["main", "master"] on production workspaces to block accidental merges.

Using with Claude

Claude Code (recommended)

claude mcp add --transport sse bitbucket-mcp http://localhost:18434/mcp/sse

Other MCP clients

{
  "mcpServers": {
    "bitbucket-mcp": {
      "url": "http://localhost:18434/mcp/sse"
    }
  }
}

Project Structure

bitbucket-mcp/
├── server.js           # Express app, MCP SSE endpoint, REST API
├── bitbucket.js        # Bitbucket Cloud API client
├── storage.js          # Workspace config persistence
├── tools/
│   ├── index.js        # Tool registry
│   ├── context.js      # Shared runtime state (sessions, logging)
│   └── *.js            # One file per MCP tool
└── static/
    ├── index.html      # Management console UI
    ├── app.js          # UI logic
    └── style.css       # Styles

Security Notes

  • Credentials are stored in plaintext in ~/.bitbucket-mcp/workspaces.json. Avoid exposing this file.
  • Use Bitbucket app passwords with the minimum required scopes rather than your main account password.
  • Use protectedBranches to prevent the AI from merging into sensitive branches.