Bitbucket MCP Server
The Bitbucket MCP Server integrates Cursor IDE with Bitbucket Cloud, enabling you to manage workspaces, repositories, commits, pull requests, projects, and branch restrictions.
Workspaces
List all workspaces accessible by the current user
Repositories
List all repositories in the configured workspace (with optional commit info)
Get detailed information about a specific repository, including latest commit data
Commits
List commits for a specific repository (up to 100)
Get a single commit by its hash
Pull Requests
List all pull requests in a repository, filterable by state (OPEN, MERGED, DECLINED)
Get a single pull request by its ID
Create a new pull request with title, description, and source/destination branches
Update an existing pull request's title or description
List all comments on a pull request (with pagination support)
Get a single comment by its ID (including context)
Add general, inline, or reply comments to a pull request
Projects
Get detailed information for a specific project by its key
List default reviewers for a project
Branch Restrictions
List all branch restrictions for a repository
Get a single branch restriction by its ID
Update branching model settings for a repository (production, development branches, branch types)
Update branching model settings for a project
Integrates Cursor IDE with Bitbucket Cloud, allowing fetching of repository information, detailed repository data, commit history, commit counts, and latest commit information from Bitbucket workspaces.
Used as the runtime environment for the MCP server, enabling execution of the JavaScript code that powers the Bitbucket integration.
The MCP server is implemented in TypeScript, providing type safety and modern language features for the server implementation.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Bitbucket MCP Server list my recent pull requests for the backend-api repository"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Bitbucket MCP
A Model Context Protocol (MCP) server that integrates Cursor IDE with Bitbucket Cloud, allowing you to fetch repository information and commit data directly from your Bitbucket workspace.
Features
List Repositories: Fetch all repositories from your Bitbucket workspace
Repository Details: Get detailed information about specific repositories
Commit Information: Retrieve commit history and latest commit details
Commit Counts: Get total commit counts per repository
Latest Commit Data: Fetch the most recent commit date, author, and message for each repository
Workspaces: List all available workspaces.
Pull Requests: Create, view, list, and update pull requests, including reading and adding PR comments.
Projects: View project details and list default reviewers.
Branch Restrictions: Manage branch restrictions for projects and repositories.
Commits: Retrieve individual commits and lists of commits.
Related MCP server: JIRA MCP Server
Prerequisites
Node.js 18 or higher
npm or yarn
A Bitbucket Cloud account
Bitbucket App Password (for authentication)
Setup
1. Install Dependencies
npm install2. Build the Project
npm run build3. Create Atlassian API token*
if you already have a token for Jira or Confluence, you can reuse it *
Go to your Bitbucket account settings
Navigate to "App passwords" under "Access management"
Instead of clicking "Create app password" (outdated), navigate to "Go to API tokens"
Create an API token
Give it a descriptive name (e.g., "Cursor MCP Integration")
Select expiry date
Copy the generated token
4. Configure Environment Variables
Create a .env file in the project root:
BITBUCKET_USERNAME=your_bitbucket_email_address
BITBUCKET_APP_PASSWORD=your_api_token
BITBUCKET_WORKSPACE=your_workspace_nameNote: The workspace name is typically your username or organization name. You can find it in your Bitbucket URLs (e.g., https://bitbucket.org/workspace_name/).
5. Add to Cursor MCP Configuration
Add the following configuration to your Cursor MCP settings:
{
"mcpServers": {
"bitbucket": {
"command": "npx",
"args": ["@korfu/bitbucket-mcp"],
"env": {
"BITBUCKET_USERNAME": "your_bitbucket_email_address",
"BITBUCKET_APP_PASSWORD": "your_api_token",
"BITBUCKET_WORKSPACE": "your_workspace_name"
}
}
}
}6. Restart Cursor
After adding the configuration, restart Cursor IDE to load the MCP server.
Usage
Once configured, you can use the following tools in Cursor:
Workspaces
bitbucket_list_workspaces
Repositories
bitbucket_list_repositoriesbitbucket_get_repository_details
Commits
bitbucket_list_commitsbitbucket_get_commit
Pull Requests
bitbucket_list_pull_requestsbitbucket_get_pull_requestbitbucket_create_pull_requestbitbucket_update_pull_requestbitbucket_list_pull_request_commentsbitbucket_get_pull_request_commentbitbucket_add_pull_request_comment
Projects
bitbucket_get_projectbitbucket_list_default_reviewers
Branch Restrictions
bitbucket_list_branch_restrictionsbitbucket_get_branch_restrictionbitbucket_update_repository_branching_model_settingsbitbucket_update_project_branching_model_settings
Available Tools
Workspaces
list_workspaces: Lists all workspaces accessible by the current user.
Repositories
list_repositories: Lists all repositories in the configured Bitbucket workspace.
get_repository_details: Get detailed information about a specific repository including latest commit info.
Commits
list_commits: Get commit information for a specific repository.
get_commit: Get a single commit by its hash.
Pull Requests
list_pull_requests: List all pull requests in a repository.
get_pull_request: Get a single pull request by its ID.
create_pull_request: Create a new pull request. //Beta version - untested
update_pull_request: Update an existing pull request. //Beta version - untested
list_pull_request_comments: List all comments on a pull request (global, inline, and replies) with pagination support.
get_pull_request_comment: Get a single comment on a pull request by its ID, including inline file/line context.
add_pull_request_comment: Add a comment to a pull request. Supports general comments, inline comments on specific files/lines, and threaded replies.
Projects
get_project: Get a single project by its key.
list_default_reviewers: List default reviewers for a project.
Branch Restrictions
list_branch_restrictions: List all branch restrictions for a repository.
get_branch_restriction: Get a single branch restriction by its ID.
update_repository_branching_model_settings: Update the branching model configuration for a repository. //Beta version - untested
update_project_branching_model_settings: Update the branching model configuration for a project. //Beta version - untested
Development
Running in Development Mode
npm run devBuilding
npm run buildProject Structure
BitbucketMCP/
├── src/
│ └── index.ts # Main MCP server implementation
├── dist/ # Compiled JavaScript output
├── package.json # Project dependencies and scripts
├── tsconfig.json # TypeScript configuration
├── .gitignore # Git ignore rules
└── README.md # This fileTroubleshooting
Authentication Issues
Verify your Bitbucket username and app password are correct
Ensure the app password has the correct permissions (Repositories: Read)
Check that the workspace name is correct
Connection Issues
Verify your internet connection
Check if Bitbucket API is accessible from your network
Ensure the MCP server is running (check Cursor's MCP logs)
Repository Not Found
Verify the repository name is correct (use the repo slug, not display name)
Ensure you have access to the repository
Check that the repository exists in the specified workspace
MCP Server Not Loading
Verify the path to
dist/index.jsis correct in your Cursor configurationEnsure Node.js is installed and accessible from the command line
Check Cursor's MCP server logs for error messages
Security Notes
Keep your Bitbucket app password secure and never commit it to version control
Use environment variables or secure configuration management for credentials
The app password should only have the minimum required permissions
Consider rotating your app password regularly
Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests if applicable
Submit a pull request
License
MIT License - see LICENSE file for details
Available Tools
15 toolscreate_pull_requestC
Create a new pull request.
Inputs: repository_name (required), title (required), source_branch (required), destination_branch, +1 more.
get_branch_restrictionC
Get a single branch restriction by its ID.
Inputs: repository_name (required), restriction_id (required).
get_commitC
Get a single commit by its hash.
Inputs: repository_name (required), commit_hash (required).
get_projectB
Get a single project by its key.
Inputs: project_key (required).
get_pull_requestC
Get a single pull request by its ID.
Inputs: repository_name (required), pull_request_id (required).
get_repository_detailsC
Get detailed information about a specific repository including latest commit info
Inputs: repository_name (required).
list_branch_restrictionsC
List all branch restrictions for a repository.
Inputs: repository_name (required).
list_commitsC
Get commit information for a specific repository
Inputs: repository_name (required), limit.
list_default_reviewersC
List default reviewers for a project.
Inputs: project_key (required).
list_pull_requestsC
List all pull requests in a repository.
Inputs: repository_name (required), state.
list_repositoriesB
List all repositories in the configured Bitbucket workspace
Inputs: include_commit_info, limit.
list_workspacesB
List all workspaces accessible by the current user.
Inputs: no named parameters.
update_project_branching_model_settingsC
Update the branching model configuration for a project.
Inputs: project_key (required), settings (required).
update_pull_requestC
Update an existing pull request.
Inputs: repository_name (required), pull_request_id (required), title, description.
update_repository_branching_model_settingsC
Update the branching model configuration for a repository.
Inputs: repository_name (required), settings (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 15 tools
Each tool has a clearly distinct purpose targeting specific resources and actions, such as get_commit for retrieving commits, list_pull_requests for listing PRs, and update_project_branching_model_settings for configuration updates. There is no overlap or ambiguity between tools, making it easy for an agent to select the correct one.
All tool names follow a consistent verb_noun pattern with snake_case, such as get_commit, list_repositories, and update_pull_request. This uniformity enhances readability and predictability, allowing agents to easily understand and navigate the toolset without confusion.
With 15 tools, the server is well-scoped for Bitbucket operations, covering repositories, commits, pull requests, projects, workspaces, and branching models. Each tool serves a distinct and necessary function, avoiding bloat while providing comprehensive coverage for typical workflows.
The toolset offers strong coverage for core Bitbucket operations, including CRUD-like actions for pull requests, repositories, and projects, along with listing and updating functionalities. A minor gap exists in the lack of tools for creating or deleting repositories, projects, or commits, but agents can still handle most workflows effectively.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
The Buildkite MCP server exposes Buildkite product data (pipelines, builds, jobs, and test data) to AI tools, editors, and agents through the Model Context Protocol. It provides capabilities including pipeline creation and management, build monitoring with specialized tools like 'wait_for_build', efficient log querying using Apache Parquet conversion and caching, and OAuth-based authentication for both read-write and read-only access to Buildkite's REST API.
The Cortex MCP server provides read-only access to real-time engineering context from the Cortex developer portal, allowing AI coding assistants to answer natural language questions about your organization's catalog (microservices, libraries, domains, teams, infrastructure), scorecards (engineering standards and best practices), initiatives (goals and deadlines), and Engineering Intelligence metrics. It includes tools for querying documentation, tracking personal entities, and accessing AI-assisted insights across the entire Cortex ecosystem.
A Model Context Protocol server for Wix AI tools
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables seamless integration between Cursor IDE and JIRA, allowing users to retrieve issues, execute JQL searches, and log work through natural language interactions.-
- AlicenseBqualityDmaintenanceA Model Context Protocol server that integrates JIRA directly into Cursor IDE, allowing users to view assigned issues, get detailed information on specific tickets, and convert JIRA issues into local tasks without leaving their editor.1421 npm6TypeScriptMIT
- AlicenseDqualityDmaintenanceA Model Context Protocol server that enables AI assistants to interact with Bitbucket repositories, pull requests, and other resources through Bitbucket Cloud and Server APIs.38,143 npm169MIT
- AlicenseBqualityCmaintenanceAn MCP server that enables interaction with Bitbucket repositories through the Model Context Protocol, supporting both Bitbucket Cloud and Server with features for PR lifecycle management and code review.207,119 npm31MIT