Skip to main content
Glama

mcp-bitbucket

Servidor MCP (stdio) para Bitbucket Cloud REST API 2.0. Funciona con Cursor: pull requests, pipelines, logs, clone.

Las herramientas siguen el conjunto típico bb_get / bb_post / bb_put / bb_patch / bb_delete / bb_clone.

Requisitos

  • Node.js 18+

  • Scoped API Token de Atlassian (App Passwords no funcionan)

Token: id.atlassian.com → API tokens.
Ámbitos útiles: lectura de repositorios, pull requests, pipelines y usuario (read:repository:bitbucket, read:pullrequest:bitbucket, read:pipeline:bitbucket, read:user:bitbucket). Para escritura, añade los write:* correspondientes.

Related MCP server: bitbucket-mcp

Instalación

git clone https://github.com/genkis/mcp-bitbucket.git
cd mcp-bitbucket
npm install

Copia .env.example a .env y completa los valores localmente. No hagas commit del archivo .env.

Cursor (~/.cursor/mcp.json)

Guarda el token y el correo solo en la configuración local de Cursor, no en este repositorio.

{
  "mcpServers": {
    "bitbucket": {
      "type": "stdio",
      "command": "node",
      "args": ["/absolute/path/to/mcp-bitbucket/index.js"],
      "env": {
        "ATLASSIAN_USER_EMAIL": "you@example.com",
        "ATLASSIAN_API_TOKEN": "your-scoped-api-token",
        "BITBUCKET_DEFAULT_WORKSPACE": "your-workspace-slug"
      }
    }
  }
}

Después del cambio, recarga los servidores MCP en Cursor.

Variables:

Variable

Descripción

ATLASSIAN_USER_EMAIL

Correo de la cuenta de Atlassian

ATLASSIAN_API_TOKEN

Scoped API Token

BITBUCKET_DEFAULT_WORKSPACE

Workspace por defecto (usado por bb_clone)

Alias: BITBUCKET_USERNAME, BITBUCKET_API_TOKEN.

Herramientas

El prefijo /2.0 se añade automáticamente. La ruta comienza con /, p. ej. /workspaces.

Herramienta

Uso

bb_get

Lectura (PR, pipelines, logs, archivos)

bb_post

Creación (PR, comentario, merge)

bb_put

Reemplazo completo del recurso

bb_patch

Actualización parcial

bb_delete

Eliminación / decline de PR

bb_clone

git clone (SSH, luego HTTPS)

Parámetros comunes: path, opcionalmente queryParams, jq (JMESPath), outputFormat (toon o json). bb_post / bb_put / bb_patch requieren body.

Ejemplos de rutas:

  • /workspaces

  • /repositories/{workspace}/{repo}/pullrequests/{id}

  • /repositories/{workspace}/{repo}/pullrequests/{id}/diff

  • /repositories/{workspace}/{repo}/pipelines/?pagelen=50&sort=-created_on

  • /repositories/{workspace}/{repo}/pipelines/{uuid}/steps/{stepUuid}/log

El filtro jq conviene aplicarlo siempre en las listas, para no arrastrar todo el JSON al modelo.

Seguridad

  • No hagas commit de tokens, .env ni mcp.json con secretos.

  • Este servidor solo reenvía solicitudes a api.bitbucket.org con Basic Auth (correo + token).

  • Los logs y errores no muestran el token.

Related MCP Connectors

Related MCP Servers

  • F
    license
    B
    quality
    B
    maintenance
    Enables interaction with a Bitbucket Server/Data Center instance, exposing its REST v1.0 API as MCP tools to manage projects, repositories, branches, pull requests, comments, diffs, commits, files, search, and build status.
    41
    -
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables AI assistants to interact with Bitbucket workspaces, repositories, branches, commits, and pull requests through MCP tools for listing, retrieving, commenting, searching, and managing version control workflows. It supports generic GET, POST, PUT, PATCH, DELETE, and clone operations against Bitbucket Cloud REST API endpoints.
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables AI assistants to interact with Bitbucket Cloud workspaces, repositories, pull requests, commits, branches, diffs, comments, issues, pipelines, and deployments through MCP tools for listing, reading, creating, updating, deleting, searching, commenting, and cloning via the Bitbucket API.
    MIT