mcp-server-wrapper-bitbucket

This is a MCP bridge for existing TypeScript Bitbucket MCP server in a Python UV-based API layer, essentially making UV act as a proxy/bridge.

GitHub Stars

0

User Rating

Not Rated

Forks

0

Issues

0

Views

1

Favorites

0

README

āœ… README.md
# Bitbucket MCP Server - FastAPI Wrapper

This project is a Python-based FastAPI wrapper around a TypeScript MCP (Model Context Protocol) server for managing Bitbucket Server pull requests. It bridges the original MCP server with a modern HTTP/REST interface.

![FastAPI](https://img.shields.io/badge/FastAPI-API-green.svg)
![Node.js](https://img.shields.io/badge/Node.js-MCP-yellow.svg)
![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)

---

## šŸš€ Features

- Launches the MCP server (written in Node.js)
- Communicates over stdio for performance & flexibility
- Exposes clean REST endpoints via FastAPI
- Auto-generated OpenAPI docs
- Docker-ready

---

## 🧩 Endpoints

| Method | Path                    | Description                 |
|--------|-------------------------|-----------------------------|
| POST   | `/create-pull-request` | Create a new pull request   |
| POST   | `/get-pull-request`    | Retrieve a PR's details     |
| POST   | `/merge-pull-request`  | Merge a pull request        |
| POST   | `/decline-pull-request`| Decline a pull request      |
| POST   | `/add-comment`         | Add comment to a PR         |
| POST   | `/get-diff`            | Get diff of a pull request  |
| POST   | `/get-reviews`         | Fetch review history        |
| POST   | `/mcp`                 | Direct MCP protocol access  |

šŸ“˜ Swagger UI available at: [http://localhost:8000/docs](http://localhost:8000/docs)

---

## 🧰 Requirements

- Python 3.10+
- Node.js 18+
- Bitbucket Server instance + token
- (Optional) Docker

---

## šŸ”§ Setup

### 1. Install Python dependencies

```bash
pip install -r requirements.txt
2. Install & Build MCP Server (Node.js)
npm install
npm run build
3. Start the FastAPI Server
uvicorn app.main:app --reload

🐳 Docker

To run everything inside Docker:

docker build -t bitbucket-mcp-wrapper .
docker run -p 8000:8000 bitbucket-mcp-wrapper

šŸŒ Environment Variables

Set these to configure the Bitbucket MCP server:

BITBUCKET_URL=https://your-bitbucket-server.com
BITBUCKET_TOKEN=your-access-token
# Or use BITBUCKET_USERNAME + BITBUCKET_PASSWORD

šŸ“‚ Project Structure
mcp_uv_wrapper/
ā”œā”€ā”€ app/
│   ā”œā”€ā”€ main.py         # FastAPI entry point
│   └── mcp_bridge.py   # Communicates with MCP server
ā”œā”€ā”€ requirements.txt
└── Dockerfile

šŸ§‘ā€šŸ’» Maintainer

This wrapper was generated and managed via AI assistance.
Feel free to fork, open issues, or contribute!


Author Information
Vishnudhat Natarajan
GE healthcare Munich

1

Followers

22

Repositories

0

Gists

7

Total Contributions

Top Contributors

Threads