The read and write halves are cleanly separable: one environment variable takes the write tools off the surface, which is what makes this safe to hand to an agent or a CI job rather than only to yourself.
A Node MCP server for a self-hosted Bitbucket Server instance. It covers the pull request lifecycle plus the browsing you do around it: projects, repositories, branches, commits, file contents and code search.
- Finding the work: `list_projects`, `list_repositories`, `list_pull_requests` filtered by state, author or direction, and `get_dashboard_pull_requests` for everything waiting on you
- Reading a PR: `get_pull_request`, `get_diff` with a per-file line cap, `get_reviews`, `get_activities` for the full timeline, `get_comments` when you want only the discussion
- Acting on a PR: `create_pull_request`, `update_pull_request`, `approve_pull_request`, `unapprove_pull_request`, `merge_pull_request` with a merge strategy, `decline_pull_request`
- Review conversation: `add_comment`, `edit_comment`, `delete_comment`, `publish_review` for batched feedback
- Code and files: `search` across projects and repositories with an extension filter, `get_file_content` including a line range for large files, `browse_repository` for directory structure
- Branches and history: `list_branches` with default-branch detection, `list_commits` filtered by branch and author, `delete_branch`
- `get_code_insights` for CI/CD analysis reports and annotations
- `BITBUCKET_READ_ONLY=true` filters the write tools out of the surface entirely, leaving browsing, diffs, search and review reading
Node.js >= 16, `BITBUCKET_URL` for your instance, and one credential: `BITBUCKET_TOKEN`, or `BITBUCKET_USERNAME` with `BITBUCKET_PASSWORD`. `BITBUCKET_DEFAULT_PROJECT` saves passing a project on every call, and any call can override it. `BITBUCKET_CUSTOM_HEADERS` adds headers to every request for Zero Trust tokens or proxies, and `BITBUCKET_LOG_PATH` moves the log off its default under your home directory.
One command plus a key — npx -y @smithery/cli install @garc33/bitbucket-server-mcp-server --client claude, then supply credentials
