Bitbucket Server MCP
Facilitates interaction with Bitbucket Server for pull request management using the MCP protocol, supporting operations such as creating, merging, commenting, and reviewing pull requests.
garc33
Tools
add_comment
Add a comment to a pull request
create_pull_request
Create a new pull request
get_pull_request
Get pull request details
merge_pull_request
Merge a pull request
decline_pull_request
Decline a pull request
get_diff
Get pull request diff
get_reviews
Get pull request reviews
README
Bitbucket Server MCP
MCP (Model Context Protocol) server for Bitbucket Server Pull Request management. This server provides tools and resources to interact with the Bitbucket Server API through the MCP protocol.
<a href="https://glama.ai/mcp/servers/jskr5c1zq3"><img width="380" height="200" src="https://glama.ai/mcp/servers/jskr5c1zq3/badge" alt="Bitbucket Server MCP server" /></a>
Requirements
- Node.js >= 16
Installation
Installing via Smithery
To install Bitbucket Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @garc33/bitbucket-server-mcp-server --client claude
Manual Installation
npm install
Build
npm run build
Features
The server provides the following tools for Bitbucket Server integration:
create_pull_request
Creates a new pull request.
Parameters:
project: Bitbucket project key (defaults to BITBUCKET_DEFAULT_PROJECT if set)repository(required): Repository slugtitle(required): PR titledescription: PR descriptionsourceBranch(required): Source branch nametargetBranch(required): Target branch namereviewers: Array of reviewer usernames
get_pull_request
Retrieves detailed information about a specific pull request.
Parameters:
project: Bitbucket project key (defaults to BITBUCKET_DEFAULT_PROJECT if set)repository(required): Repository slugprId(required): Pull request ID
merge_pull_request
Merges a pull request.
Parameters:
project: Bitbucket project key (defaults to BITBUCKET_DEFAULT_PROJECT if set)repository(required): Repository slugprId(required): Pull request IDmessage: Merge commit messagestrategy: One of:merge-commit(default)squashfast-forward
decline_pull_request
Declines a pull request.
Parameters:
project: Bitbucket project key (defaults to BITBUCKET_DEFAULT_PROJECT if set)repository(required): Repository slugprId(required): Pull request IDmessage: Reason for declining
add_comment
Adds a comment to a pull request.
Parameters:
project: Bitbucket project key (defaults to BITBUCKET_DEFAULT_PROJECT if set)repository(required): Repository slugprId(required): Pull request IDtext(required): Comment textparentId: Parent comment ID for replies
get_diff
Retrieves the diff for a pull request.
Parameters:
project: Bitbucket project key (defaults to BITBUCKET_DEFAULT_PROJECT if set)repository(required): Repository slugprId(required): Pull request IDcontextLines: Number of context lines (default: 10)
get_reviews
Fetches the review history of a pull request, including approvals and reviews.
Parameters:
project: Bitbucket project key (defaults to BITBUCKET_DEFAULT_PROJECT if set)repository(required): Repository slugprId(required): Pull request ID
Dependencies
@modelcontextprotocol/sdk- SDK for MCP protocol implementationaxios- HTTP client for API requestswinston- Logging framework
Configuration
The server requires configuration in the VSCode MCP settings file. Here's a sample configuration:
{
"mcpServers": {
"bitbucket": {
"command": "node",
"args": ["/path/to/bitbucket-server/build/index.js"],
"env": {
"BITBUCKET_URL": "https://your-bitbucket-server.com",
// Authentication (choose one):
// Option 1: Personal Access Token
"BITBUCKET_TOKEN": "your-access-token",
// Option 2: Username/Password
"BITBUCKET_USERNAME": "your-username",
"BITBUCKET_PASSWORD": "your-password",
// Optional: Default project
"BITBUCKET_DEFAULT_PROJECT": "your-default-project"
}
}
}
}
Environment Variables
BITBUCKET_URL(required): Base URL of your Bitbucket Server instance- Authentication (one of the following is required):
BITBUCKET_TOKEN: Personal access tokenBITBUCKET_USERNAMEandBITBUCKET_PASSWORD: Basic authentication credentials
BITBUCKET_DEFAULT_PROJECT: Default project key to use when not specified in tool calls
Logging
The server logs all operations to bitbucket.log using Winston for debugging and monitoring purposes.
Recommended Servers
Gitingest-MCP
An MCP server for gitingest. It allows MCP clients like Claude Desktop, Cursor, Cline etc to quickly extract information about Github repositories including repository summaries, project directory structure, file contents, etc
MCP Package Docs Server
Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.
Linear MCP Server
A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.
Linear MCP Server
Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.
JSON Resume MCP Server
A server that enhances AI assistants with the ability to update your JSON Resume by analyzing your coding projects, automatically extracting skills and generating professional descriptions.
Git MCP Server
A Model Context Protocol server that enables Large Language Models to interact with Git repositories through a robust API, supporting operations like repository initialization, cloning, file staging, committing, and branch management.
Git Forensics MCP
A specialized MCP server for in-depth analysis of git repositories, offering tools for branch overview, time period analysis, file changes, and merge recommendations.
AI Development Assistant MCP Server
A Cursor-compatible toolkit that provides intelligent coding assistance through custom AI tools for code architecture planning, screenshot analysis, code review, and file reading capabilities.
Textwell MCP Server
Integrates Textwell with the Model Context Protocol for facilitating text operations such as writing and appending text through a GitHub Pages bridge.
DocuMind MCP Server
A Model Context Protocol server that analyzes and evaluates GitHub README documentation quality using advanced neural processing, providing scores and improvement suggestions.