Bitbucket MCP Server
Provides tools for managing Bitbucket Server projects, repositories, pull requests, branches, source code, and code search, enabling operations such as listing projects, creating and merging pull requests, browsing files, and searching code.
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., "@Bitbucket MCP Serverlist repositories in project MyProject"
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 Server
MCP (Model Context Protocol) server for Bitbucket Server (Data Center) integration. This server provides tools to interact with Bitbucket Server APIs via Personal Access Token (PAT) authentication.
Tools (27)
Project Operations
list_projects — List all projects the user has access to
get_project_detail — Get detailed information about a specific project
Repository Operations
list_repositories — List repositories in a specific project
search_repositories — Find repositories by name or description across all accessible projects
Branch Operations
get_repo_branches — List branches in a repository (with optional filter)
create_branch — Create a new branch
delete_branch — Delete a branch
Commit Operations
get_repo_commits — List recent commits in a repository (with
until/sincefilters)get_commit_detail — Get commit details with configurable detail level:
metadata,files(changed file list), orfull(unified diff)
Tag Operations
get_repo_tags — List tags in a repository (with optional filter)
Pull Request Operations
get_pull_requests — Get pull requests for a repository (filter by state: OPEN, MERGED, DECLINED, ALL)
get_pull_request_detail — Get detailed information about a specific pull request
create_pull_request — Create a new pull request (with optional reviewers)
update_pull_request — Update PR title, description, reviewers with auto-refetch and 409 conflict retry
merge_pull_request — Merge a pull request
decline_pull_request — Decline/reject a pull request
get_pull_request_comments — Get comments on a pull request
get_pull_request_diff — Get the diff of a pull request for code review
list_pr_commits — List commits on a specific pull request with pagination
set_review_status — Set review status: APPROVED, NEEDS_WORK, or UNAPPROVED (mutually exclusive)
Comment Operations
add_comment — Add a comment (general, reply, inline code, or blocker task) to a pull request. Supports anchor for inline comments on specific file paths and line numbers.
manage_comment — Manage a comment or task: edit, delete, resolve, reopen, convert to task, or convert to comment
Source Code Operations
get_file_content — Get the raw content of a file (supports
atref parameter)get_directory_listing — List files and directories at a given path
get_file_diff — Get the diff between two commits or branches for a specific file or all files
Code Search Operations
search_code — Index-backed exact-term search across a repository (case-insensitive, files <512 KiB)
grep — Regex search file contents across a repository (like ripgrep). Supports content/files/count modes, filename glob, path filtering, context lines, and case-insensitive search
Related MCP server: Bitbucket MCP Server
Installation
Using npx (recommended)
npx sbitbucket-mcp-serverUsing npm
npm install -g sbitbucket-mcp-serverConfiguration
Environment Variables
Variable | Required | Description |
| Yes | Your Bitbucket Server URL (e.g., |
| Yes | Personal Access Token (PAT) for authentication |
Claude Desktop Configuration
Add to your Claude Desktop config file:
{
"mcpServers": {
"bitbucket": {
"command": "npx",
"args": ["-y", "sbitbucket-mcp-server"],
"env": {
"BITBUCKET_URL": "https://your-bitbucket-server.com",
"BITBUCKET_TOKEN": "your-personal-access-token"
}
}
}
}Cline / VS Code Configuration
Add to your MCP settings:
{
"mcpServers": {
"bitbucket": {
"command": "npx",
"args": ["-y", "sbitbucket-mcp-server"],
"env": {
"BITBUCKET_URL": "https://your-bitbucket-server.com",
"BITBUCKET_TOKEN": "your-personal-access-token"
}
}
}
}Development
# Install dependencies
npm install
# Build
npm run build
# Development mode (watch)
npm run dev
# Start server
npm start
# Run tests
npm testProject Structure
src/
├── index.ts # Main server entry point
├── config.ts # Configuration and API client setup
├── tools/
│ └── index.ts # All tool definitions (27 tools)
└── handlers/
├── index.ts # Handler registry
├── project.ts # Project operations
├── repository.ts # Repository operations
├── branch.ts # Branch operations
├── commit.ts # Commit operations
├── tag.ts # Tag operations
├── pullRequest.ts # Pull request operations
├── comment.ts # Comment operations
├── sourceCode.ts # Source code operations
└── search.ts # Search operationsLicense
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceAn 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.Last updated194,43424MIT
- Alicense-qualityDmaintenanceAn MCP server that provides tools for interacting with the Bitbucket API, supporting both Bitbucket Cloud and Bitbucket Server, enabling pull request, branch, file, code review, and search operations.Last updated4,434MIT
- AlicenseCqualityBmaintenanceMCP server for integrating with Bitbucket Cloud and Server APIs, enabling AI assistants to interact with repositories, pull requests, pipelines, and more.Last updated591923MIT
- Flicense-qualityCmaintenanceAn MCP server for Bitbucket Cloud, covering pull requests, pull request comments, and pipelines.Last updated
Related MCP Connectors
A MCP server built for developers enabling Git based project management with project and personal…
MCP server for Appcircle mobile CI/CD platform.
The MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/nbhson/tool-bitbucket-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server