Atlas / MCP servers / garc33 / Bitbucket Server

Bitbucket ServerSAFE

mcp/garc33/bitbucket-server
Verdict
SAFE
Grade
B
Trust score
89 /100
Exposed tools
27 17r · 7w · 3d
Transport
stdio
License
Apache-2.0
Stars
69
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

MCP (Model Context Protocol) server for Bitbucket Server Pull Request management. This server provides tools and resources to interact with the Bitbucket Server API through the MCP protocol.

[](https://smithery.ai/server/@garc33/bitbucket-server-mcp-server)

✨ New Features

  • 🔧 Custom HTTP Headers: Add custom headers to all requests via BITBUCKET_CUSTOM_HEADERS environment variable (useful for Zero Trust tokens or proxies)
  • 📋 PR Discovery: List and filter pull requests by state, author, or direction using list_pull_requests (fixes #14)
  • 🌿 Branch Management: List branches with default branch detection using list_branches, delete merged branches with delete_branch
  • 📝 Commit History: Browse commit history with branch and author filtering using list_commits
  • ✅ PR Approval: Approve and unapprove pull requests with approve_pull_request and unapprove_pull_request
  • 🔍 Advanced Search: Search code and files across repositories with project/repository filtering using the search tool
  • 📄 File Operations: Read file contents and browse repository directories with get_file_content and browse_repository
  • 💬 Comment Management: Extract and filter PR comments with get_comments tool
  • 🔍 Project Discovery: List all accessible Bitbucket projects with list_projects
  • 📁 Repository Browsing: Explore repositories across projects with list_repositories
  • 🔧 Flexible Project Support: Make the default project optional - specify per command or use BITBUCKET_DEFAULT_PROJECT
  • 📖 Enhanced Documentation: Improved README with usage examples and better configuration guidance

Requirements

  • Node.js >= 16

Installation

Installing via S

Read from source at commit 785e9fdb2f3bOBSERVED · 2026-10-07
Advertisement
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.

claude-code
claude mcp add bitbucket-server --env BITBUCKET_PASSWORD=${BITBUCKET_PASSWORD} --env BITBUCKET_TOKEN=${BITBUCKET_TOKEN} -- npx -y [email protected]
claude-desktop
{
  "mcpServers": {
    "bitbucket-server": {
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ],
      "env": {
        "BITBUCKET_PASSWORD": "${BITBUCKET_PASSWORD}",
        "BITBUCKET_TOKEN": "${BITBUCKET_TOKEN}"
      }
    }
  }
}
03

Exposed tools (27)

17 read · 7 write · 3 destructive. Blast radius: 3 tools can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.

ToolRiskDescription
add_commentwriteAdd a comment to a pull request for code review, feedback, questions, or discussion. Use this to provide review feedback, ask questions about specific changes, suggest improvements, or participate in code review discussions. Supports threaded conversations.
add_comment_inlinewriteAdd an inline comment (to specific lines) to the diff of a pull request for code review, feedback, questions, or discussion. Use this to provide review feedback, ask questions about specific changes, suggest improvements, or participate in code review discussions. Supports threaded conversations.
approve_pull_requestreadApprove a pull request as the current user. Use this to signal that you have reviewed the changes and they are ready to be merged. The approval is recorded with your user identity.
browse_repositoryreadBrowse and list files and directories in a Bitbucket repository. Use this to explore repository structure, find files, or navigate directories.
create_pull_requestwriteCreate a new pull request to propose code changes, request reviews, or merge feature branches. Use this when you want to submit code for review, merge a feature branch, or contribute changes to a repository. Automatically sets up branch references and can assign reviewers.
decline_pull_requestreadDecline or reject a pull request that should not be merged. Use this when changes are not acceptable, conflicts with project direction, or when the PR needs significant rework. This closes the PR without merging.
delete_branchdestructiveDelete a branch from a Bitbucket repository. Cannot delete the default branch. Use this for cleanup after merging pull requests or removing stale feature branches.
delete_commentdestructiveDelete a comment from a pull request. Requires the comment version for optimistic locking.
edit_commentwriteEdit an existing comment on a pull request. Use this to fix typos, update information, or reformat comments. Requires the comment version for optimistic locking.
get_activitiesreadRetrieve all activities for a pull request including comments, reviews, commits, and other timeline events. Use this to get the complete activity history and timeline of the pull request.
get_code_insightsreadRetrieve Code Insights reports (SonarQube, security scans, etc.) and their annotations for a pull request. Use this to check quality gates, code coverage, security findings, and other CI/CD analysis results.
get_commentsreadRetrieve only the comments from a pull request. Use this when you specifically want to read the discussion and feedback comments without other activities like reviews or commits.
get_dashboard_pull_requestsreadList pull requests across all repositories for the authenticated user. Use this to see PRs you need to review, PRs you authored, or PRs you are participating in. Returns PRs from all projects and repositories without needing to specify each one.
get_diffreadRetrieve the code differences (diff) for a pull request showing what lines were added, removed, or modified. Use this to understand the scope of changes, review specific code modifications, or analyze the impact of proposed changes before merging.
get_file_contentreadRetrieve the content of a specific file from a Bitbucket repository with pagination support. Use this to read source code, configuration files, documentation, or any text-based files. For large files, use start parameter to paginate through content.
get_pull_requestreadRetrieve comprehensive details about a specific pull request including status, reviewers, commits, and metadata. Use this to check PR status, review progress, understand changes, or gather information before performing actions like merging or commenting.
get_reviewsreadFetch the review history and approval status of a pull request. Use this to check who has reviewed the PR, see approval status, understand review feedback, or determine if the PR is ready for merging based on review requirements.
list_branchesreadList branches in a Bitbucket repository. Shows branch names, latest commits, and identifies the default branch. Use this to explore available branches, find branch names for checkout or PR creation, or verify branch existence before operations.
list_commitsreadList commits in a Bitbucket repository, optionally filtered by branch and/or author. Use this to review commit history, find specific changes, track contributions, or understand the evolution of a branch.
list_projectsreadDiscover and list all Bitbucket projects you have access to. Use this first to explore available projects, find project keys, or when you need to work with a specific project but don\
list_pull_requestsreadList pull requests in a Bitbucket repository filtered by state, author, or direction. Use this to find open PRs, see your pending reviews, discover PRs awaiting merge, or get an overview of PR activity in a repository.
list_repositoriesreadBrowse and discover repositories within a specific project or across all accessible projects. Use this to find repository slugs, explore codebases, or understand the repository structure. Returns repository names, slugs, clone URLs, and project associations.
merge_pull_requestwriteMerge an approved pull request into the target branch. Use this when a PR has been reviewed, approved, and is ready to be integrated. Choose the appropriate merge strategy based on your team\
publish_reviewwritePublish all pending (draft) review comments on a pull request at once. Optionally set your review status to APPROVED or NEEDS_WORK, and add an overview comment. This is the batch operation that transitions all PENDING comments to published.
searchreadSearch for code or files across repositories. Use this to find specific code patterns, file names, or content within projects and repositories. Searches both file contents and filenames. Supports filtering by project, repository, and query optimization.
unapprove_pull_requestdestructiveRemove your approval from a pull request. Use this to retract a previous approval if you discover issues after approving or if the PR has changed since your review.
update_pull_requestwriteUpdate an existing pull request title, description, or reviewers. Safely preserves all fields not explicitly changed (uses read-modify-write to avoid losing reviewers or other metadata).
04

Trust audit

SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codePASS
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfaceWARN
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
declared (1 observation(s))
Network
declared (5 observation(s))
Shell
none-observed
Dependencies
not all pinned
Secrets in source
none-found

Findings (3)

MEDIUMFilesystem / path · mcp.destructive_tools · CWE-22, CWE-59
delete_branch, delete_comment, unapprove_pull_request
Why it matters. 3 tool(s) can delete or overwrite
Fix. prefer a read-only mode or scoped tokens; the page states the blast radius
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
package.json
@modelcontextprotocol/sdk, axios, winston, @eslint/js, @types/node, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, @vitest/coverage-v8
Why it matters. 15 dependency range(s) float
Fix. pin exact versions or ship a lockfile
LOWPrompt injection · prompt.credential_read · CWE-94, CWE-1427
README.md:730
**To enable read-only mode**: Set the environment variable `BITBUCKET_READ_ONLY=true`
Why it matters. asks the agent to read credentials

Gates applied: no_behavioural_pass.

Audited 2026-10-07 · audit v0.4.1 · source sha 785e9fdb2f3bfull audit observations/trust-audit/mcp-server/garc33__bitbucket-server.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-07785e9fdb2f3bSAFEB89first audit
06

Questions

What tools does Bitbucket Server expose?

27 in total: 17 read-only, 7 that write, and 3 that can delete or overwrite (delete_branch, delete_comment, unapprove_pull_request). Every one is listed on this page with its risk.

Is Bitbucket Server safe to connect to an agent?

The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B. Separately from the audit: 3 of its tools can destroy data, so scope the token you give it to what you actually need.

What credentials does Bitbucket Server need?

It reads BITBUCKET_PASSWORD and BITBUCKET_TOKEN from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.

How does Bitbucket Server run?

It speaks stdio, so it runs as a local process your client starts. It is published on npm as bitbucket-server at 1.0.0.

How current is this page?

The grade is for one exact copy of the source (785e9fdb2f3b), read on 2026-10-07. The repository is watched and re-audited when it changes.

Advertisement