Provides tools for querying Bitbucket repositories, including repository info, commits, diffs, branches, tags, pull requests, and file/directory content for both public and private repositories.
Bitbucket MCP Server
Bitbucket API integration for Model Context Protocol (MCP) server. This server allows you to read various information from Bitbucket repositories and integrates seamlessly with Claude Desktop and other MCP clients.
Features
- Repository basic information query
- Commit list and detailed information query
- Commit diff query
- Branch and tag list query
- Pull request list query
- File and directory content query
- Support for both public and private repositories
- Configurable default workspace
Installation
Global Installation (Recommended)
Using npx (No installation required)
Local Installation
2. Bitbucket Authentication Setup
You need to create a Bitbucket App Password:
- Go to Bitbucket account settings
- Select App passwords menu
- Create new App Password (Required permission: Repositories - Read)
- Set environment variables:
3. MCP Client Configuration
Add the following to your Claude Desktop or other MCP client configuration:
Using Global Installation
Using npx
Using Local Installation
Available Tools
get_repository_info
Query basic information about a repository.
Parameters:
repo_slug
: Repository name/slugworkspace
(optional): Bitbucket workspace name
get_commits
Query commit list.
Parameters:
repo_slug
: Repository name/slugworkspace
(optional): Bitbucket workspace namebranch
(optional): Branch namelimit
(optional): Number of commits to retrieve (default: 10, max: 100)
get_commit_detail
Query detailed information about a specific commit.
Parameters:
repo_slug
: Repository name/slugcommit_id
: Commit hash/IDworkspace
(optional): Bitbucket workspace name
get_commit_diff
Query changes (diff) for a specific commit.
Parameters:
repo_slug
: Repository name/slugcommit_id
: Commit hash/IDworkspace
(optional): Bitbucket workspace name
get_branches
Query branch list in the repository.
Parameters:
repo_slug
: Repository name/slugworkspace
(optional): Bitbucket workspace name
get_tags
Query tag list in the repository.
Parameters:
repo_slug
: Repository name/slugworkspace
(optional): Bitbucket workspace name
get_pull_requests
Query pull request list.
Parameters:
repo_slug
: Repository name/slugworkspace
(optional): Bitbucket workspace namestate
(optional): PR status (OPEN, MERGED, DECLINED, SUPERSEDED)
get_file_content
Query content of a specific file.
Parameters:
repo_slug
: Repository name/slugfile_path
: File pathworkspace
(optional): Bitbucket workspace namebranch
(optional): Branch name (default: main)
get_directory_content
Query directory contents.
Parameters:
repo_slug
: Repository name/slugworkspace
(optional): Bitbucket workspace namedirectory_path
(optional): Directory path (default: root)branch
(optional): Branch name (default: main)
Usage Examples
With default workspace configured, you can use in MCP client:
Notes
- Bitbucket App Password is required (regular password cannot be used)
- Public repositories can be queried without authentication for some information, but authentication is required for full functionality
- Consider API rate limits when using
- Proper permission management is needed for repositories containing sensitive information
Development
This project is written in TypeScript and uses the MCP SDK.
Clone and Setup
Development Commands
Testing
You can test the server using the provided test.http file with REST Client extension in VS Code.
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
License
MIT License
This server cannot be installed
An integration server that allows Claude Desktop and other MCP clients to read and query information from Bitbucket repositories, including commits, diffs, branches, pull requests, and file contents.
Related MCP Servers
- AsecurityAlicenseAqualityFacilitates interaction with Bitbucket Server for pull request management using the MCP protocol, supporting operations such as creating, merging, commenting, and reviewing pull requests.Last updated -71JavaScriptApache 2.0
- -securityFlicense-qualityAn MCP server that enables Claude and other compatible LLMs to interact with the GitHub API, supporting features like creating issues, retrieving repository information, listing issues, and searching repositories.Last updated -TypeScript
- -security-license-qualityAn MCP server that allows Claude and other MCP-compatible LLMs to interact with the GitHub API, supporting features like creating issues, getting repository information, listing issues, and searching repositories.Last updated -TypeScript
- AsecurityFlicenseAqualityAn integration tool that enables AI assistants like Claude to directly access and interact with Bitbucket repositories, pull requests, and code without requiring copy/paste operations.Last updated -61,00523TypeScript