home / mcp / bitbucket mcp server

Bitbucket MCP Server

Node.js/TypeScript MCP server for Atlassian Bitbucket. Enables AI systems (LLMs) to interact with workspaces, repositories, and pull requests via tools (list, get, comment, search). Connects AI directly to version control workflows through the standard MCP interface.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "aashari-mcp-server-atlassian-bitbucket": {
      "command": "npx",
      "args": [
        "-y",
        "@aashari/mcp-server-atlassian-bitbucket"
      ],
      "env": {
        "ATLASSIAN_API_TOKEN": "YOUR_API_TOKEN",
        "ATLASSIAN_USER_EMAIL": "YOUR_EMAIL",
        "ATLASSIAN_BITBUCKET_USERNAME": "your_username",
        "ATLASSIAN_BITBUCKET_APP_PASSWORD": "your_app_password"
      }
    }
  }
}

You can connect Bitbucket to your AI assistants using this MCP server to ask questions about your code, inspect pull requests, and automate repository workflows. It lets you access Bitbucket Cloud data directly from your AI workspace, enabling fast insights and natural-language interactions with your codebase.

How to use

Use the MCP server to interact with Bitbucket through your AI assistant. You can list workspaces, view repositories, fetch pull requests, and perform actions like creating PRs or commenting on PRs. Leverage JMESPath filtering to extract exactly what you need and use the default TOON output for token-efficient responses.

What you can do with Bitbucket through AI

  • Ask questions about your codebase and latest commits
  • Get open PRs that need review
  • Search for files or code patterns across repositories
  • Compare changes between branches or commits
  • Create or comment on pull requests
  • Automate routine workflow updates and checks

Typical workflow with an AI assistant

1) Set up authentication and connect the MCP server to your AI assistant.

2) Use natural language prompts to query Bitbucket data or perform actions, for example asking for PR statuses or requesting a code search.

3) Refine results with JMESPath filters to minimize token usage and tailor the response to your needs.

Available tools

bb_get

GET to any Bitbucket Cloud REST API endpoint to read data, with optional query parameters and JMESPath filtering

bb_post

POST to any Bitbucket Cloud REST API endpoint to create resources, with body and optional filters

bb_put

PUT to any Bitbucket Cloud REST API endpoint to replace resources

bb_patch

PATCH to any Bitbucket Cloud REST API endpoint for partial updates

bb_delete

DELETE any Bitbucket Cloud REST API endpoint to remove resources

bb_clone

Clone a repository locally from Bitbucket using workspace and repository slugs