Bitbucket MCP
Bitbucket MCP
Сервер Model Context Protocol (MCP) для интеграции с Bitbucket Cloud и API сервера. Этот сервер MCP позволяет помощникам ИИ, таким как Cursor, взаимодействовать с вашими репозиториями Bitbucket, запросами на извлечение и другими ресурсами.
Безопасность прежде всего
Это безопасный и ответственный пакет — операции DELETE не используются, поэтому нет риска потери данных. Каждый запрос на извлечение анализируется с помощью CodeQL, чтобы гарантировать безопасность кода.
Related MCP server: Bitbucket MCP Server
Обзор
Ознакомьтесь с официальным пакетом npm Этот сервер реализует стандарт Model Context Protocol для предоставления помощникам ИИ доступа к данным и операциям Bitbucket. Он включает в себя инструменты для:
Список и извлечение репозиториев
Получение данных репозитория
Получение запросов на извлечение
И многое другое...
Установка
Использование NPX (рекомендуется)
Самый простой способ использовать этот сервер MCP — через NPX, что позволяет запускать его без глобальной установки:
# Run with environment variables
BITBUCKET_URL="https://bitbucket.org/your-workspace" \
BITBUCKET_USERNAME="your-username" \
BITBUCKET_PASSWORD="your-app-password" \
npx -y bitbucket-mcp@latestРучная установка
Кроме того, вы можете установить его глобально или как часть своего проекта:
# Install globally
npm install -g bitbucket-mcp
# Or install in your project
npm install bitbucket-mcpЗатем запустите его с помощью:
# If installed globally
BITBUCKET_URL="https://bitbucket.org/your-workspace" \
BITBUCKET_USERNAME="your-username" \
BITBUCKET_PASSWORD="your-app-password" \
bitbucket-mcp
# If installed in your project
BITBUCKET_URL="https://bitbucket.org/your-workspace" \
BITBUCKET_USERNAME="your-username" \
BITBUCKET_PASSWORD="your-app-password" \
npx bitbucket-mcpКонфигурация
Переменные среды
Настройте сервер, используя следующие переменные среды:
Переменная | Описание | Необходимый |
| Базовый URL Bitbucket (например, « https://bitbucket.org/your-workspace ») | Да |
| Ваше имя пользователя Bitbucket | Да* |
| Ваш пароль к приложению Bitbucket | Да* |
| Ваш токен доступа Bitbucket (альтернатива имени пользователя/паролю) | Нет |
| Рабочее пространство по умолчанию, используемое, если не указано иное | Нет |
* Необходимо указать либо BITBUCKET_TOKEN , либо BITBUCKET_USERNAME и BITBUCKET_PASSWORD .
Создание пароля приложения Bitbucket
Войдите в свою учетную запись Bitbucket
Перейдите в раздел «Персональные настройки» > «Пароли приложений».
Создайте новый пароль приложения со следующими разрешениями:
Репозитории: Читать
Запросы на извлечение: чтение, запись
Скопируйте сгенерированный пароль и используйте его как переменную среды
BITBUCKET_PASSWORD
Интеграция с курсором
Чтобы интегрировать этот MCP-сервер с Cursor:
Открытый курсор
Перейдите в Настройки > Расширения.
Нажмите «Протокол контекста модели».
Добавьте новую конфигурацию MCP:
"bitbucket": {
"command": "npx",
"env": {
"BITBUCKET_URL": "https://bitbucket.org/your-workspace",
"BITBUCKET_USERNAME": "your-username",
"BITBUCKET_PASSWORD": "your-app-password"
},
"args": ["-y", "bitbucket-mcp@latest"]
}Сохранить конфигурацию
Используйте команду «/bitbucket» в Cursor для доступа к репозиториям Bitbucket и запросам на извлечение.
Использование локальной сборки с курсором
Если вы ведете локальную разработку и хотите протестировать свои изменения:
"bitbucket-local": {
"command": "node",
"env": {
"BITBUCKET_URL": "https://bitbucket.org/your-workspace",
"BITBUCKET_USERNAME": "your-username",
"BITBUCKET_PASSWORD": "your-app-password"
},
"args": ["/path/to/your/local/bitbucket-mcp/dist/index.js"]
}Доступные инструменты
Этот сервер MCP предоставляет инструменты для взаимодействия с репозиториями Bitbucket и pull-запросами. Ниже приведен полный список доступных операций:
Операции репозитория
listRepositories
Перечисляет репозитории в рабочей области.
Параметры:
workspace(необязательно): имя рабочего пространства Bitbucketlimit(необязательно): максимальное количество возвращаемых репозиториев
getRepository
Получает сведения о конкретном репозитории.
Параметры:
workspace: Имя рабочего пространства Bitbucketrepo_slug: Слаг репозитория
Операции по запросу на извлечение
getPullRequests
Получает запросы на извлечение изменений для репозитория.
Параметры:
workspace: Имя рабочего пространства Bitbucketrepo_slug: Слаг репозиторияstate(необязательно): состояние запроса на извлечение (OPEN,MERGED,DECLINED,SUPERSEDED)limit(необязательно): максимальное количество возвращаемых запросов на извлечение
createPullRequest
Создает новый запрос на извлечение.
Параметры:
workspace: Имя рабочего пространства Bitbucketrepo_slug: Слаг репозиторияtitle: заголовок запроса на извлечениеdescription: Описание запроса на извлечениеsourceBranch: Имя исходной веткиtargetBranch: Имя целевой веткиreviewers(необязательно): список имен пользователей рецензентов
getPullRequest
Получает сведения о конкретном запросе на извлечение.
Параметры:
workspace: Имя рабочего пространства Bitbucketrepo_slug: Слаг репозиторияpull_request_id: идентификатор запроса на извлечение
updatePullRequest
Обновляет запрос на извлечение.
Параметры:
workspace: Имя рабочего пространства Bitbucketrepo_slug: Слаг репозиторияpull_request_id: идентификатор запроса на извлечениеРазличные необязательные параметры обновления (название, описание и т. д.)
getPullRequestActivity
Получает журнал активности для запроса на извлечение.
Параметры:
workspace: Имя рабочего пространства Bitbucketrepo_slug: Слаг репозиторияpull_request_id: идентификатор запроса на извлечение
approvePullRequest
Одобряет запрос на извлечение.
Параметры:
workspace: Имя рабочего пространства Bitbucketrepo_slug: Слаг репозиторияpull_request_id: идентификатор запроса на извлечение
unapprovePullRequest
Удаляет одобрение из запроса на извлечение.
Параметры:
workspace: Имя рабочего пространства Bitbucketrepo_slug: Слаг репозиторияpull_request_id: идентификатор запроса на извлечение
declinePullRequest
Отклоняет запрос на извлечение.
Параметры:
workspace: Имя рабочего пространства Bitbucketrepo_slug: Слаг репозиторияpull_request_id: идентификатор запроса на извлечениеmessage(необязательно): Причина отклонения
mergePullRequest
Объединяет запрос на извлечение.
Параметры:
workspace: Имя рабочего пространства Bitbucketrepo_slug: Слаг репозиторияpull_request_id: идентификатор запроса на извлечениеmessage(необязательно): сообщение о слиянииstrategy(необязательно): стратегия слияния (merge-commit,squash,fast-forward)
requestChanges
Запрашивает изменения по запросу на извлечение.
Параметры:
workspace: Имя рабочего пространства Bitbucketrepo_slug: Слаг репозиторияpull_request_id: идентификатор запроса на извлечение
removeChangeRequest
Удаляет запрос на изменение из запроса на извлечение.
Параметры:
workspace: Имя рабочего пространства Bitbucketrepo_slug: Слаг репозиторияpull_request_id: идентификатор запроса на извлечение
Операции по комментированию запросов на извлечение
getPullRequestComments
Список комментариев к запросу на извлечение.
Параметры:
workspace: Имя рабочего пространства Bitbucketrepo_slug: Слаг репозиторияpull_request_id: идентификатор запроса на извлечение
createPullRequestComment
Создает комментарий к запросу на извлечение.
Параметры:
workspace: Имя рабочего пространства Bitbucketrepo_slug: Слаг репозиторияpull_request_id: идентификатор запроса на извлечениеcontent: Содержание комментарияinline(необязательно): Встроенная информация о комментарии
getPullRequestComment
Получает конкретный комментарий к запросу на извлечение.
Параметры:
workspace: Имя рабочего пространства Bitbucketrepo_slug: Слаг репозиторияpull_request_id: идентификатор запроса на извлечениеcomment_id: идентификатор комментария
updatePullRequestComment
Обновляет комментарий к запросу на извлечение.
Параметры:
workspace: Имя рабочего пространства Bitbucketrepo_slug: Слаг репозиторияpull_request_id: идентификатор запроса на извлечениеcomment_id: идентификатор комментарияcontent: Обновленное содержание комментария
deletePullRequestComment
Удаляет комментарий к запросу на извлечение.
Параметры:
workspace: Имя рабочего пространства Bitbucketrepo_slug: Слаг репозиторияpull_request_id: идентификатор запроса на извлечениеcomment_id: идентификатор комментария
resolveComment
Закрывает ветку комментариев по запросу на извлечение.
Параметры:
workspace: Имя рабочего пространства Bitbucketrepo_slug: Слаг репозиторияpull_request_id: идентификатор запроса на извлечениеcomment_id: идентификатор комментария
reopenComment
Повторно открывает решенную ветку комментариев по запросу на извлечение.
Параметры:
workspace: Имя рабочего пространства Bitbucketrepo_slug: Слаг репозиторияpull_request_id: идентификатор запроса на извлечениеcomment_id: идентификатор комментария
Операции по изменению запроса на извлечение
getPullRequestDiff
Получает разницу для запроса на извлечение.
Параметры:
workspace: Имя рабочего пространства Bitbucketrepo_slug: Слаг репозиторияpull_request_id: идентификатор запроса на извлечение
getPullRequestDiffStat
Получает статистику различий для запроса на извлечение.
Параметры:
workspace: Имя рабочего пространства Bitbucketrepo_slug: Слаг репозиторияpull_request_id: идентификатор запроса на извлечение
getPullRequestPatch
Получает патч для запроса на извлечение.
Параметры:
workspace: Имя рабочего пространства Bitbucketrepo_slug: Слаг репозиторияpull_request_id: идентификатор запроса на извлечение
Операции по выполнению задач запроса на извлечение
getPullRequestTasks
Перечисляет задачи по запросу на извлечение.
Параметры:
workspace: Имя рабочего пространства Bitbucketrepo_slug: Слаг репозиторияpull_request_id: идентификатор запроса на извлечение
createPullRequestTask
Создает задачу по запросу на извлечение.
Параметры:
workspace: Имя рабочего пространства Bitbucketrepo_slug: Слаг репозиторияpull_request_id: идентификатор запроса на извлечениеcontent: Содержание задачиcomment(необязательно): идентификатор комментария для связи с задачейpending(необязательно): находится ли задача в ожидании
getPullRequestTask
Получает конкретную задачу по запросу на извлечение.
Параметры:
workspace: Имя рабочего пространства Bitbucketrepo_slug: Слаг репозиторияpull_request_id: идентификатор запроса на извлечениеtask_id: идентификатор задачи
updatePullRequestTask
Обновляет задачу по запросу на извлечение.
Параметры:
workspace: Имя рабочего пространства Bitbucketrepo_slug: Слаг репозиторияpull_request_id: идентификатор запроса на извлечениеtask_id: идентификатор задачиcontent(необязательно): обновленное содержимое задачиstate(необязательно): обновленное состояние задачи
deletePullRequestTask
Удаляет задачу по запросу на извлечение.
Параметры:
workspace: Имя рабочего пространства Bitbucketrepo_slug: Слаг репозиторияpull_request_id: идентификатор запроса на извлечениеtask_id: идентификатор задачи
Другие операции по запросу на извлечение
getPullRequestCommits
Список коммитов по запросу на извлечение.
Параметры:
workspace: Имя рабочего пространства Bitbucketrepo_slug: Слаг репозиторияpull_request_id: идентификатор запроса на извлечение
getPullRequestStatuses
Список статусов коммитов для запроса на извлечение.
Параметры:
workspace: Имя рабочего пространства Bitbucketrepo_slug: Слаг репозиторияpull_request_id: идентификатор запроса на извлечение
Разработка
Предпосылки
Node.js 18 или выше
нпм или пряжа
Настраивать
# Clone the repository
git clone https://github.com/MatanYemini/bitbucket-mcp.git
cd bitbucket-mcp
# Install dependencies
npm install
# Build the project
npm run build
# Run in development mode
npm run devЛицензия
Данный проект лицензирован по лицензии MIT — подробности см. в файле LICENSE .
Ссылки
Available Tools
3 toolsgetPullRequestsD
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of pull requests to return | |
| repo_slug | Yes | Repository slug | |
| state | No | Pull request state | |
| workspace | Yes | Bitbucket workspace name |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
getRepositoryD
| Name | Required | Description | Default |
|---|---|---|---|
| repo_slug | Yes | Repository slug | |
| workspace | Yes | Bitbucket workspace name |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
listRepositoriesD
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of repositories to return | |
| workspace | No | Bitbucket workspace name |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v1.0.0- First observed
getPullRequests - First observed
getRepository - First observed
listRepositories
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: getPullRequests retrieves pull requests, getRepository fetches a specific repository, and listRepositories lists all repositories. There is no overlap or ambiguity between these operations.
The tools follow a consistent verb_noun pattern (getPullRequests, getRepository, listRepositories), but there is a minor deviation in verb choice between 'get' and 'list'. This is still highly readable and predictable.
With only 3 tools, the server feels thin for a Bitbucket integration, lacking essential operations like creating or updating repositories, managing pull requests (e.g., create, merge), or handling issues. The scope is incomplete for typical version control workflows.
The tool surface is severely incomplete for a Bitbucket server, missing core CRUD operations (e.g., create_repository, update_pull_request, delete_branch) and lifecycle management. Agents will face dead ends when trying to perform basic tasks like modifying repositories or pull requests.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
The Mercado Pago MCP Server implements the Model Context Protocol to provide AI agents and LLMs with access to Mercado Pago's APIs and tools within compatible development environments. It acts as an intermediary that translates Mercado Pago resources into executable functions (tools) that AI applications can invoke to perform actions and automate flows. The server simplifies integration, enables using documentation to implement or improve code, and optimizes operations through natural language interactions without manual implementations.
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.
Related MCP Servers
- 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.209,040 npm28MIT
- AlicenseAqualityDmaintenanceA Model Context Protocol server that integrates Cursor IDE with Bitbucket Cloud, allowing developers to fetch repository information and commit data directly from their Bitbucket workspace.1583 npm4MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to manage Bitbucket Cloud repositories, pull requests, branches, commits, pipelines, issues, and webhooks through the Model Context Protocol.8121 npmMIT
- AlicenseCqualityBmaintenanceMCP server for integrating with Bitbucket Cloud and Server APIs, enabling AI assistants to interact with repositories, pull requests, pipelines, and more.5951 npm3MIT