- Home
- MCP servers
- Atlassian Bitbucket
Atlassian Bitbucket
- typescript
0
GitHub Stars
typescript
Language
4 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"rajusudhar-atlassian-bitbucket-mcp": {
"command": "npx",
"args": [
"-y",
"atlassian-bitbucket-mcp"
],
"env": {
"BITBUCKET_URL": "https://bitbucket.org",
"BITBUCKET_TOKEN": "your_token_here",
"BITBUCKET_CACHE_ENABLED": "true",
"BITBUCKET_ALLOWED_ACTIONS": "list,read,write",
"BITBUCKET_CACHE_TTL_REPOS": "3600",
"BITBUCKET_DEFAULT_PROJECT": "PROJ"
}
}
}
}You run an MCP server that lets AI assistants interact with Atlassian Bitbucket for pull request reviews, code search, and repository operations. This server supports Bitbucket Cloud and self-hosted Bitbucket Data Center/Server, is designed for local usage with tokens, and includes caching, type safety, and secure practices to help you automate code workflows with confidence.
How to use
Start by running the MCP server locally or in your environment, then connect your MCP client to it. You can perform common Bitbucket interactions such as listing pull requests, viewing PR details, adding comments, approving changes, and performing repository operations like listing projects or repositories. Use the server to execute code search across repositories and commits. The server exposes a stable, type-safe interface that your MCP client can invoke to drive Bitbucket interactions without writing custom clients.
How to install
Prerequisites you need before installing: Node.js 20 or newer, a JavaScript package manager, and a Bitbucket Personal Access Token (PAT) for your Bitbucket Cloud or Server/Data Center instance.
-
Copy the example environment file and customize it for your Bitbucket setup.
-
Install dependencies using your chosen package manager.
-
Build the MCP server so it is ready to run in your environment.
-
Start using the MCP server with your MCP client by configuring the client to point at this server's runtime entry point.
Configuration
Environment-driven configuration is used to connect to Bitbucket and control behavior. Set these required variables in your environment or in your .env file before starting the server.
Required variables:
BITBUCKET_URL — Your Bitbucket instance URL (e.g., https://bitbucket.org or your self-hosted URL)
BITBUCKET_TOKEN — Personal Access Token with the necessary permissions
BITBUCKET_DEFAULT_PROJECT — Default project key to use when none is specified
Optional variables (adjust as needed):
BITBUCKET_ALLOWED_ACTIONS — Comma-separated list of allowed tool actions
BITBUCKET_CACHE_ENABLED — Enable/disable the caching layer (default: true)
BITBUCKET_CACHE_TTL_REPOS — Repository cache TTL in seconds (default: 3600)
Available tools
bitbucket_list_pull_requests
List pull requests for a repository to review activity and open PRs for inspection.
bitbucket_get_pull_request
Fetch detailed information about a specific pull request, including author, status, and metadata.
bitbucket_get_pr_diff
Retrieve the diff or changes introduced by a pull request for review.
bitbucket_get_pr_commits
Obtain the commits associated with a pull request.
bitbucket_get_pr_activities
Get comments and activities related to a pull request.
bitbucket_add_pr_comment
Add a general comment to a pull request.
bitbucket_add_pr_inline_comment
Add an inline code comment within a pull request diff.
bitbucket_reply_to_comment
Respond to an existing comment on a pull request.
bitbucket_resolve_comment
Resolve a threaded comment in a pull request.
bitbucket_update_comment
Edit an existing comment on a pull request.
bitbucket_approve_pr
Approve a pull request to indicate review approval.
bitbucket_list_projects
List accessible Bitbucket projects.
bitbucket_list_repositories
List repositories within a project.
bitbucket_get_repository
Retrieve details about a specific repository.
bitbucket_get_branches
List branches within a repository.
bitbucket_get_commits
Fetch the commit history of a repository.
bitbucket_get_file_content
Get file content at a specific ref in a repository.
bitbucket_search_code
Search code across repositories.
bitbucket_search_commits
Search commits by message.