MCP Bitbucket Server
Allows creating, listing, and preparing pull requests with automatic title and description generation, using the Bitbucket API.
Click on "Install 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., "@MCP Bitbucket Serverlist my open pull requests"
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.
MCP Bitbucket Server
An MCP (Model Context Protocol) server to interact with Bitbucket through automated tools.
Installation
1. Clone the repository
git clone <repository-url>
cd bitbucket2. Install dependencies
Option A: With pnpm (recommended)
pnpm installOption B: With npm
npm install3. Configure environment variables
Create a .env file in the project root with your Bitbucket credentials:
BITBUCKET_EMAIL=your_email@example.com
BITBUCKET_API_TOKEN=your_api_token
BITBUCKET_WORKSPACE=your_workspace
BITBUCKET_REVIEWER_UUID=reviewer_uuid_optional
BITBUCKET_API_BASE_URL=https://api.bitbucket.org/2.0
BITBUCKET_DEFAULT_DESTINATION_BRANCH=develop
BITBUCKET_CLOSE_SOURCE_BRANCH=trueVariable descriptions:
BITBUCKET_EMAIL: Your Bitbucket account emailBITBUCKET_API_TOKEN: Your Bitbucket App Password (not your regular password)BITBUCKET_WORKSPACE: Your Bitbucket workspace nameBITBUCKET_REVIEWER_UUID: (Optional) UUID of a default reviewer for pull requestsBITBUCKET_API_BASE_URL: (Optional) Base URL for Bitbucket API (default: https://api.bitbucket.org/2.0)BITBUCKET_DEFAULT_DESTINATION_BRANCH: (Optional) Default destination branch for pull requests (default: develop)BITBUCKET_CLOSE_SOURCE_BRANCH: (Optional) Whether to close source branch after merge (default: true)
Related MCP server: Atlassian Bitbucket MCP
MCP Configuration
Add the following configuration to your MCP settings file (usually in ~/.config/mcp/settings.json or similar):
{
"mcpServers": {
"bitbucket": {
"command": "npx",
"args": ["tsx", "/full/path/to/project/src/server.ts"],
"env": {
"BITBUCKET_EMAIL": "your_email@example.com",
"BITBUCKET_API_TOKEN": "your_api_token",
"BITBUCKET_WORKSPACE": "your_workspace",
"BITBUCKET_REVIEWER_UUID": "reviewer_uuid_optional",
"BITBUCKET_API_BASE_URL": "https://api.bitbucket.org/2.0",
"BITBUCKET_DEFAULT_DESTINATION_BRANCH": "develop",
"BITBUCKET_CLOSE_SOURCE_BRANCH": "true"
}
}
}
}Note: Replace /full/path/to/project with the absolute path where you have cloned this project.
Usage
Once configured, you can use the following tools from your MCP client:
Create Pull Request: Automatically create pull requests
List Pull Requests: View all pull requests in the repository
Prepare Pull Request: Automatically generate titles and descriptions for pull requests
Development
To run the server in development mode:
With pnpm:
pnpm run inspectorWith npm:
npm run inspectorRequirements
Node.js 18+
pnpm or npm
Bitbucket account with App Password configured
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/AaronLopezBarros/MCP_bitbucket'
If you have feedback or need assistance with the MCP directory API, please join our Discord server