Skip to main content
Glama
guenichone

Atlassian Bitbucket MCP Server

by guenichone

Atlassian Bitbucket MCP Server

A Model Context Protocol (MCP) server that integrates Atlassian Bitbucket Server/Data Center with AI systems.

What It Does

This server enables AI systems to interact with Bitbucket repositories by providing:

  • Access to projects, repositories, branches, and files

  • Tools for working with pull requests

  • Type-safe API integration with official Bitbucket OpenAPI specs

Quick Setup

Prerequisites

  • Node.js (v20+ recommended)

  • npm

  • Python 3 (for OpenAPI filtering script)

  • Bitbucket Server access token

Installation

git clone [<atlassian-bitbucket-server-mcp>](https://github.com/guenichone/atlassian-bitbucket-server-mcp)
cd mcp-server-selfhosted-bitbucket
npm install
npm run build-app

Running the Server

# As STDIO server (default for AI integration)
ATLASSIAN_BITBUCKET_SERVER_URL=https://git.your-company.com/ \
ATLASSIAN_BITBUCKET_ACCESS_TOKEN=your-token \
npm start

# As HTTP/SSE server
MCP_TRANSPORT=sse \
ATLASSIAN_BITBUCKET_SERVER_URL=https://git.your-company.com/ \
ATLASSIAN_BITBUCKET_ACCESS_TOKEN=your-token \
npm start

Docker Usage

Using Docker CLI

# Build
docker build -t bitbucket-mcp-server .

# Run
docker run --rm -i \
  -e ATLASSIAN_BITBUCKET_SERVER_URL=https://git.your-company.com/ \
  -e ATLASSIAN_BITBUCKET_ACCESS_TOKEN=your-token \
  bitbucket-mcp-server

The project includes a Makefile for simplified Docker operations:

# Build the Docker image
make docker-build

# Run with your Bitbucket credentials
BITBUCKET_URL=https://git.your-company.com/ BITBUCKET_TOKEN=your-token make docker-run

# Build and run in one command
BITBUCKET_URL=https://git.your-company.com/ BITBUCKET_TOKEN=your-token make docker-all

# View all available make commands and examples
make help

Environment Variables

  • ATLASSIAN_BITBUCKET_SERVER_URL - Bitbucket server URL

  • ATLASSIAN_BITBUCKET_ACCESS_TOKEN - Your access token

  • MCP_TRANSPORT - stdio (default) or sse

  • PORT - HTTP port when using SSE (default: 3000)

Thanks

This project was inspired by aashari/mcp-server-atlassian-bitbucket.

License

MIT - See LICENSE file for details.

A
license - permissive license
-
quality - not tested
C
maintenance

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

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/guenichone/atlassian-bitbucket-server-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server