atlacp
Bitbucket MCP server
Documentation
atlacp
Bitbucket tooling for developers and AI agents.
The project provides two entrypoints:
- `bbmd` - direct Bitbucket CLI for humans, scripts, and agent workflows.
- `bbcp` - MCP (Model Context Protocol) server for MCP-compatible editors and clients.
The `bbmd` cli should be the superior to MCP when used by AI agents.
Quick Install
Install the binaries:
npx --yes @atlacp/installThe installer places `bbmd` and `bbcp` in `~/.atlacp/bin` and updates your shell profile. Restart the shell, or source the updated profile before continuing. Follow accounts setup to configure Bitbucket account(s).
Use `bbmd skill` to teach your agent to use the cli. You can either write it to the agent relevant skill folder or add it somewhere in AGENTS.md.
### Bitbucket integration
Run `bbmd skill` to learn how to work with bitbucket.Or write the skill in either project-local scope or global scope:
# Opencode
# Project-local
mkdir -p .opencode/skills/bitbucket && bbmd skill > .opencode/skills/bitbucket/SKILL.md
# Global
mkdir -p ~/.opencode/skills/bitbucket && bbmd skill > ~/.opencode/skills/bitbucket/SKILL.md
# Claude
# Project-local
mkdir -p .claude/skills/bitbucket && bbmd skill > .claude/skills/bitbucket/SKILL.md
# Global
mkdir -p ~/.claude/skills/bitbucket && bbmd skill > ~/.claude/skills/bitbucket/SKILL.md
# Codex
# Project-local
mkdir -p .codex/skills/bitbucket && bbmd skill > .codex/skills/bitbucket/SKILL.md
# Global
mkdir -p ~/.codex/skills/bitbucket && bbmd skill > ~/.codex/skills/bitbucket/SKILL.md
# Cursor
# Project-local
mkdir -p .cursor/skills/bitbucket && bbmd skill > .cursor/skills/bitbucket/SKILL.md
# Global
mkdir -p ~/.cursor/skills/bitbucket && bbmd skill > ~/.cursor/skills/bitbucket/SKILL.md__I'm so tired to have 20 folders with AI stuff...__
Account Setup
You can have multiple accounts configured. This may be useful if you want AI to use different account for some tasks, like posting PR reviews or similar. The account `name` is just a label.
Configure a Bitbucket account:
bbmd auth add \
--name user \
--default \
--token-type Bearer|Basic \
--token-value ""See Bitbucket Access Tokens for more details on creating tokens.
Note: If you already have `atlassian-accounts.json`, just copy it to ~/.atlacp/accounts.json as follows:
cp your/path/to/atlassian-accounts.json ~/.atlacp/accounts.jsonCheck the configured accounts:
bbmd auth statusSupported Commands
bbmd (CLI)
- `bbmd auth status` - list configured Atlassian accounts with redacted tokens.
- `bbmd auth add` - add or replace an account in the local accounts file.
- `bbmd auth remove` - remove an account by name.
- `bbmd auth set-default` - choose the default account.
- `bbmd pr create` - create a pull request.
- `bbmd pr read` - get pull request details.
- `bbmd pr update` - update pull request title, description, or draft state.
- `bbmd pr approve` - approve a pull request.
- `bbmd pr request-changes` - remove approval / request changes.
- `bbmd pr merge` - merge a pull request.
- `bbmd pr diffstat` - list changed files summary for a pull request.
- `bbmd pr diff` - get raw diff text.
- `bbmd pr add-comment` - add a general or inline pull request comment.
- `bbmd pr list-comments` - list pull request comments.
- `bbmd pr resolve-comment` - resolve a pull request comment thread.
- `bbmd pr list-tasks` - list pull request tasks.
- `bbmd pr create-task` - create a pull request task.
- `bbmd pr update-task` - update a pull request task.
- `bbmd file content` - get file content at a commit.
bbcp (MCP tools)
- `bitbucket_add_pr_comment` - add a comment to a pull request.
- `bitbucket_approve_pr` - approve a pull request.
- `bitbucket_create_pr` - create a pull request.
- `bitbucket_create_pr_task` - create a task on a pull request.
- `bitbucket_get_file_content` - get file content from a repository at a specific commit.
- `bitbucket_get_pr_diff` - get the diff of a pull request.
- `bitbucket_get_pr_diffstat` - get the diffstat of a pull request.
- `bitbucket_list_pr_comments` - list pull request comments.
- `bitbucket_list_pr_tasks` - list tasks on a pull request.
- `bitbucket_merge_pr` - merge a pull request.
- `bitbucket_read_pr` - read a pull request.
- `bitbucket_resolve_pr_comment` - resolve a pull request comment thread.
- `bitbucket_request_pr_changes` - request changes on a pull request.
- `bitbucket_update_pr` - update a pull request.
- `bitbucket_update_pr_task` - update a task on a pull request.
MCP Server
Supported transports:
- HTTP at `http://localhost:8080`.
- SSE at `http://localhost:8080/sse`.
- STDIO via `bbcp stdio`.
To Run HTTP/SSE server:
bbcp httpOr just use STDIO:
bbcp stdioIntegrate AI Tools
Cursor MCP config (`.cursor/mcp.json`) may look like this for STDIO transport:
{
"mcpServers": {
"Bitbucket": {
"command": "bbcp",
"args": ["stdio"]
}
}
}Or if you prefer HTTP transport:
{
"mcpServers": {
"Bitbucket": {
"url": "http://localhost:8080"
}
}
}Once configured, send a prompt similar to:
Check titbucket pull request https://bitbucket.org/workspace/repo-slug/pull-requests/123You should see a response with PR details.
Bitbucket Access Tokens
Please review the official documentation:
(keep in mind to create a basic token for API use). When using personal access tokens, all requests will be made on behalf of the user.
- Bitbucket Access Tokens - good for bots and other automation tools.
User API Token
- Go to https://id.atlassian.com/manage-profile/security/api-tokens
- Create a new token, with at least below scopes:
read:account
read:issue:bitbucket
read:me
read:pipeline:bitbucket
read:project:bitbucket
read:pullrequest:bitbucket
read:repository:bitbucket
read:runner:bitbucket
read:snippet:bitbucket
read:user:bitbucket
write:issue:bitbucket
write:pullrequest:bitbucket- Create a Basic token from it using shell command below:
echo -n ":" | base64- Add user account to the local accounts file:
bbmd auth add \
--name user \
--default \
--token-type Basic \
--token-value ""Bot API Token
If you plan your AI agent to operate as a bot, best option is to create "Access token" instead of "User API token".
- Go your repository or workspace settings, click on "Access tokens"
- Create a new token with below permissions:
pullrequest
pipeline
repository:write
repository
pullrequest:write- Add bot account to the local accounts file:
bbmd auth add \
--name bot \
--token-type Bearer \
--token-value ""Note: You may use any name in place of `bot` in above command. It's just a label.
Contribute
Please see CONTRIBUTING.md for more details.
License
MIT
Frequently asked questions
What is atlacp?
atlacp is Bitbucket MCP server
How do I install atlacp?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is atlacp open source?
Yes — it is hosted on GitHub at https://github.com/gemyago/atlacp and has 7 stars.
Related MCP tools
eBPF-powered network observability for Kubernetes. Indexes L4/L7 traffic with full K8s context, decrypts TLS without keys. Queryable by AI agents via MCP and humans via dashboard.
GOWA - WhatsApp REST API with support for UI, Multi Account, Webhooks, and MCP, and Chatwoot. Built with Golang for efficient memory use.
The missing open-source Kubernetes UI with a built-in MCP server for AI agents. See what's broken, why, and what changed. Issues, Topology, event timeline, Helm, GitOps, live service traffic, and cluster audits - all in one Go binary.
mcp-language-server gives MCP enabled clients access semantic tools like get definition, references, rename, and diagnostics.
The Terraform MCP Server provides seamless integration with Terraform ecosystem, enabling advanced automation and interaction capabilities for Infrastructure as Code (IaC) development.
Run MATLAB® using AI applications with the official MATLAB MCP Server from MathWorks®. This MCP server for MATLAB supports a wide range of coding agents like Claude Code® and Visual Studio® Code.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP