Skip to content
Back to search

bitbucket-mcp

Bitbucket MCP - A Model Context Protocol (MCP) server for integrating with Bitbucket Cloud and Server APIs

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/matanyemini--bitbucket-mcp/badge.svg)](/listings/matanyemini--bitbucket-mcp)

HTML

<a href="/listings/matanyemini--bitbucket-mcp"><img src="/api/listings/matanyemini--bitbucket-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

-- Since it has been asked, in many cases we have seen - "BITBUCKET_USERNAME" is usually your email

Using NPX (Recommended)

The easiest way to use this MCP server is via NPX, which allows you to run it without installing it globally:

# Option A (recommended): API URL + explicit workspace
BITBUCKET_URL="https://api.bitbucket.org/2.0" \
BITBUCKET_WORKSPACE="your-workspace" \
BITBUCKET_USERNAME="your-username" \
BITBUCKET_PASSWORD="your-app-password" \
npx -y bitbucket-mcp@latest

# Option B (legacy-compatible): web URL only; workspace is auto-extracted
BITBUCKET_URL="https://bitbucket.org/your-workspace" \
BITBUCKET_USERNAME="your-username" \
BITBUCKET_PASSWORD="your-app-password" \
npx -y bitbucket-mcp@latest

Manual Installation

Alternatively, you can install it globally or as part of your project:

# Install globally
npm install -g bitbucket-mcp

# Or install in your project
npm install bitbucket-mcp

Then run it with:

# If installed globally (Option A)
BITBUCKET_URL="https://api.bitbucket.org/2.0" \
BITBUCKET_WORKSPACE="your-workspace" \
BITBUCKET_USERNAME="your-username" \
BITBUCKET_PASSWORD="your-app-password" \
bitbucket-mcp

# If installed globally (Option B - legacy-compatible)
BITBUCKET_URL="https://bitbucket.org/your-workspace" \
BITBUCKET_USERNAME="your-username" \
BITBUCKET_PASSWORD="your-app-password" \
bitbucket-mcp

# If installed in your project (Option A)
BITBUCKET_URL="https://api.bitbucket.org/2.0" \
BITBUCKET_WORKSPACE="your-workspace" \
BITBUCKET_USERNAME="your-username" \
BITBUCKET_PASSWORD="your-app-password" \
npx bitbucket-mcp

# If installed in your project (Option B - legacy-compatible)
BITBUCKET_URL="https://bitbucket.org/your-workspace" \
BITBUCKET_USERNAME="your-username" \
BITBUCKET_PASSWORD="your-app-password" \
npx bitbucket-mcp

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 757 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Bitbucket MCP
  2. A Model Context Protocol (MCP) server for integrating with Bitbucket Cloud and Server APIs. This MCP server enables AI assistants like Cursor to interact with your Bitbucket repositories, pull requests, and other resources.
  3. ## Safety First
  4. This is a safe and responsible package — no DELETE operations are used, so there's no risk of data loss.
  5. Every pull request is analyzed with CodeQL to ensure the code remains secure.
  6. [![CodeQL](https://github.com/MatanYemini/bitbucket-mcp/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/MatanYemini/bitbucket-mcp/actions/workflows/github-code-scanning/codeql)
  7. [![GitHub Repository](https://img.shields.io/badge/GitHub-Repository-blue.svg)](https://github.com/MatanYemini/bitbucket-mcp)
  8. [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
  9. [![npm version](https://badge.fury.io/js/bitbucket-mcp.svg)](https://www.npmjs.com/package/bitbucket-mcp)
  10. ## Overview
  11. Checkout out the [official npm package](https://www.npmjs.com/package/bitbucket-mcp)
  12. This server implements the Model Context Protocol standard to provide AI assistants with access to Bitbucket data and operations. It includes tools for:
  13. - Listing and retrieving repositories
  14. - Getting repository details
  15. - Fetching pull requests
  16. - And more...
  17. ## Installation
  18. -- Since it has been asked, in many cases we have seen - "BITBUCKET_USERNAME" is usually your email
  19. ### Using NPX (Recommended)
  20. The easiest way to use this MCP server is via NPX, which allows you to run it without installing it globally:
  21. ```bash
  22. # Option A (recommended): API URL + explicit workspace
  23. BITBUCKET_URL="https://api.bitbucket.org/2.0" \
  24. BITBUCKET_WORKSPACE="your-workspace" \
  25. BITBUCKET_USERNAME="your-username" \
  26. BITBUCKET_PASSWORD="your-app-password" \
  27. npx -y bitbucket-mcp@latest
  28. # Option B (legacy-compatible): web URL only; workspace is auto-extracted
  29. BITBUCKET_URL="https://bitbucket.org/your-workspace" \
  30. BITBUCKET_USERNAME="your-username" \
  31. BITBUCKET_PASSWORD="your-app-password" \
  32. npx -y bitbucket-mcp@latest
  33. ```
  34. ### Manual Installation
  35. Alternatively, you can install it globally or as part of your project:
  36. ```bash
  37. # Install globally
  38. npm install -g bitbucket-mcp
  39. # Or install in your project
  40. npm install bitbucket-mcp
  41. ```
  42. Then run it with:
  43. ```bash
  44. # If installed globally (Option A)
  45. BITBUCKET_URL="https://api.bitbucket.org/2.0" \
  46. BITBUCKET_WORKSPACE="your-workspace" \
  47. BITBUCKET_USERNAME="your-username" \
  48. BITBUCKET_PASSWORD="your-app-password" \
  49. bitbucket-mcp
  50. # If installed globally (Option B - legacy-compatible)
  51. BITBUCKET_URL="https://bitbucket.org/your-workspace" \
  52. BITBUCKET_USERNAME="your-username" \
  53. BITBUCKET_PASSWORD="your-app-password" \
  54. bitbucket-mcp
  55. # If installed in your project (Option A)
  56. BITBUCKET_URL="https://api.bitbucket.org/2.0" \
  57. BITBUCKET_WORKSPACE="your-workspace" \
  58. BITBUCKET_USERNAME="your-username" \
  59. BITBUCKET_PASSWORD="your-app-password" \
  60. npx bitbucket-mcp
  61. # If installed in your project (Option B - legacy-compatible)
  62. BITBUCKET_URL="https://bitbucket.org/your-workspace" \
  63. BITBUCKET_USERNAME="your-username" \
  64. BITBUCKET_PASSWORD="your-app-password" \
  65. npx bitbucket-mcp
  66. ```
  67. ## Configuration
  68. ### Environment Variables
  69. Configure the server using the following environment variables:
  70. | Variable | Description | Required |
  71. | ---------------------------- | ------------------------------------------------------------------------------ | -------- |
  72. | `BITBUCKET_URL` | Bitbucket API base URL. Defaults to `https://api.bitbucket.org/2.0` | No |
  73. | `BITBUCKET_USERNAME` | Your Bitbucket username | Yes\* |
  74. | `BITBUCKET_PASSWORD` | Your Bitbucket app password | Yes\* |
  75. | `BITBUCKET_TOKEN` | Your Bitbucket access token (alternative to username/password) | No |
  76. | `BITBUCKET_WORKSPACE` | Default workspace to use. If omitted and `BITBUCKET_URL` contains it, auto-set | No |
  77. | `BITBUCKET_ENABLE_DANGEROUS` | Set to `true` to enable dangerous tools (e.g., deletions). Default: disabled | No |
  78. | `BITBUCKET_LOG_DISABLE` | Disable file logging when set to `true`/`1` | No |
  79. | `BITBUCKET_LOG_FILE` | Absolute path to a specific log file | No |
  80. | `BITBUCKET_LOG_DIR` | Directory to store logs (defaults to OS-specific app log dir) | No |
  81. | `BITBUCKET_LOG_PER_CWD` | When `true`, nest logs under a per-working-directory subfolder | No |
  82. Either `BITBUCKET_TOKEN` or both `BITBUCKET_USERNAME` and `BITBUCKET_PASSWORD` must be provided.
  83. ### Creating a Bitbucket App Password
  84. 1. Log in to your Bitbucket account
  85. 2. Go to Personal Settings > App Passwords
  86. 3. Create a new app password with the following permissions:
  87. - Repositories: Read
  88. - Pull requests: Read, Write
  89. - Pipelines: Read (required for pipeline operations)
  90. 4. Copy the generated password and use it as the `BITBUCKET_PASSWORD` environment variable
  91. ## Troubleshooting
  92. ### 401 Authentication Errors
  93. If you're getting 401 authentication errors, check the following:
  94. 1. **Verify your app password**: Make sure you're using an App Password, not your regular Bitbucket password
  95. 1. **Verify app password permissions**: Your app password needs at least "Repositories: Read" permission
  96. 1. **Try the API URL format**: If you're still getting 401 errors, try using the direct API URL format:
  97. ```bash
  98. BITBUCKET_URL="https://api.bitbucket.org/2.0"
  99. ```
  100. 1. **Test API access**: Verify your credentials work by testing the Bitbucket API directly:
  101. ```bash
  102. # Test with curl (replace with your actual values)
  103. curl -u "your-username:your-app-password" \
  104. "https://api.bitbucket.org/2.0/repositories/your-workspace"
  105. ```
  106. ### Atlassian API Key
  107. 1. Put the Atlassian API Key in the `BITBUCKET_PASSWORD` variable, not `BITBUCKET_TOKEN`
  108. 2. Use your Bitbucket email as `BITBUCKET_USERNAME` instead of your regular username
  109. For reference you can check the [API token documentation](https://support.atlassian.com/bitbucket-cloud/docs/using-api-tokens/)
  110. ### Getting Help
  111. If you encounter issues:
  112. 1. Check the [Bitbucket REST API documentation](https://developer.atlassian.com/cloud/bitbucket/rest/intro/) for API details
  113. 2. Review the [Bitbucket Cloud documentation](https://support.atlassian.com/bitbucket-cloud/) for general help
  114. ## Integration with Cursor
  115. To integrate this MCP server with Cursor:
  116. 1. Open Cursor
  117. 2. Go to Settings > Extensions
  118. 3. Click on "Model Context Protocol"
  119. 4. Add a new MCP configuration:
  120. ```json
  121. "bitbucket": {
  122. "command": "npx",
  123. "env": {
  124. "BITBUCKET_URL": "https://api.bitbucket.org/2.0",
  125. "BITBUCKET_WORKSPACE": "your-workspace",
  126. "BITBUCKET_USERNAME": "your-username",
  127. "BITBUCKET_PASSWORD": "your-app-password"
  128. },
  129. "args": ["-y", "bitbucket-mcp@latest"]
  130. }
  131. ```
  132. 1. Save the configuration
  133. 2. Use the "/bitbucket" command in Cursor to access Bitbucket repositories and pull requests
  134. ### Using a Local Build with Cursor
  135. If you're developing locally and want to test your changes:
  136. ```json
  137. "bitbucket-local": {
  138. "command": "node",
  139. "env": {
  140. "BITBUCKET_URL": "https://api.bitbucket.org/2.0",
  141. "BITBUCKET_WORKSPACE": "your-workspace",
  142. "BITBUCKET_USERNAME": "your-username",
  143. "BITBUCKET_PASSWORD": "your-app-password"
  144. },
  145. "args": ["/path/to/your/local/bitbucket-mcp/dist/index.js"]
  146. }
  147. ```
  148. ## Available Tools
  149. This MCP server provides tools for interacting with Bitbucket repositories and pull requests. Below is a comprehensive list of the available operations:
  150. ### Pagination
  151. Unless noted otherwise, listing tools accept the following optional parameters:
  152. - `pagelen`: Number of items per page (Bitbucket `pagelen`). Defaults to 10 and is capped at 100.
  153. - `page`: 1-based Bitbucket page number to fetch. When omitted, the first page is returned.
  154. - `all`: When `true` (and `page` is not provided), the server automatically follows Bitbucket `next` links until all items are fetched or a safety cap of 1,000 entries is reached.
  155. - `limit`: Deprecated alias for `pagelen` kept for backward compatibility.
  156. Use these knobs to page through large collections without hitting CLI truncation.
  157. ### Repository Operations
  158. #### `listRepositories`
  159. Lists repositories in a workspace.
  160. **Parameters:**
  161. - `workspace` (optional): Bitbucket workspace name
  162. - `name` (optional): Filter repositories by partial name match
  163. - Pagination controls described in [Pagination](#pagination)
  164. #### `getRepository`
  165. Gets details for a specific repository.
  166. **Parameters:**
  167. - `workspace`: Bitbucket workspace name
  168. - `repo_slug`: Repository slug
  169. ### Pull Request Operations
  170. #### `getPullRequests`
  171. Gets pull requests for a repository.
  172. **Parameters:**
  173. - `workspace`: Bitbucket workspace name
  174. - `repo_slug`: Repository slug
  175. - `state` (optional): Pull request state (`OPEN`, `MERGED`, `DECLINED`, `SUPERSEDED`)
  176. - Pagination controls described in [Pagination](#pagination)
  177. #### `createPullRequest`
  178. Creates a new pull request.
  179. **Parameters:**
  180. - `workspace`: Bitbucket workspace name
  181. - `repo_slug`: Repository slug
  182. - `title`: Pull request title
  183. - `description`: Pull request description
  184. - `sourceBranch`: Source branch name
  185. - `targetBranch`: Target branch name
  186. - `reviewers` (optional): List of reviewer usernames
  187. - `draft` (optional): Whether to create the pull request as a draft
  188. #### `getPullRequest`
  189. Gets details for a specific pull request.
  190. **Parameters:**
  191. - `workspace`: Bitbucket workspace name
  192. - `repo_slug`: Repository slug
  193. - `pull_request_id`: Pull request ID
  194. - Pagination controls described in [Pagination](#pagination)
  195. - Pagination controls described in [Pagination](#pagination)
  196. - Pagination controls described in [Pagination](#pagination)
  197. - Pagination controls described in [Pagination](#pagination)
  198. #### `updatePullRequest`
  199. Updates a pull request.
  200. **Parameters:**
  201. - `workspace`: Bitbucket workspace name
  202. - `repo_slug`: Repository slug
  203. - `pull_request_id`: Pull request ID
  204. - Pagination controls described in [Pagination](#pagination)
  205. - Pagination controls described in [Pagination](#pagination)
  206. - Various optional update parameters (title, description, etc.)
  207. #### `getPullRequestActivity`
  208. Gets the activity log for a pull request.
  209. **Parameters:**
  210. - `workspace`: Bitbucket workspace name
  211. - `repo_slug`: Repository slug
  212. - `pull_request_id`: Pull request ID
  213. #### `approvePullRequest`
  214. Approves a pull request.
  215. **Parameters:**
  216. - `workspace`: Bitbucket workspace name
  217. - `repo_slug`: Repository slug
  218. - `pull_request_id`: Pull request ID
  219. #### `unapprovePullRequest`
  220. Removes an approval from a pull request.
  221. **Parameters:**
  222. - `workspace`: Bitbucket workspace name
  223. - `repo_slug`: Repository slug
  224. - `pull_request_id`: Pull request ID
  225. #### `declinePullRequest`
  226. Declines a pull request.
  227. **Parameters:**
  228. - `workspace`: Bitbucket workspace name
  229. - `repo_slug`: Repository slug
  230. - `pull_request_id`: Pull request ID
  231. - `message` (optional): Reason for declining
  232. #### `mergePullRequest`
  233. Merges a pull request.
  234. **Parameters:**
  235. - `workspace`: Bitbucket workspace name
  236. - `repo_slug`: Repository slug
  237. - `pull_request_id`: Pull request ID
  238. - `message` (optional): Merge commit message
  239. - `strategy` (optional): Merge strategy (`merge-commit`, `squash`, `fast-forward`)
  240. #### `requestChanges`
  241. Requests changes on a pull request.
  242. **Parameters:**
  243. - `workspace`: Bitbucket workspace name
  244. - `repo_slug`: Repository slug
  245. - `pull_request_id`: Pull request ID
  246. #### `removeChangeRequest`
  247. Removes a change request from a pull request.
  248. **Parameters:**
  249. - `workspace`: Bitbucket workspace name
  250. - `repo_slug`: Repository slug
  251. - `pull_request_id`: Pull request ID
  252. #### `createDraftPullRequest`
  253. Creates a new draft pull request.
  254. **Parameters:**
  255. - `workspace`: Bitbucket workspace name
  256. - `repo_slug`: Repository slug
  257. - `title`: Pull request title
  258. - `description`: Pull request description
  259. - `sourceBranch`: Source branch name
  260. - `targetBranch`: Target branch name
  261. - `reviewers` (optional): List of reviewer usernames
  262. **Note:** This is equivalent to calling `createPullRequest` with `draft: true`.
  263. #### `publishDraftPullRequest`
  264. Publishes a draft pull request to make it ready for review.
  265. **Parameters:**
  266. - `workspace`: Bitbucket workspace name
  267. - `repo_slug`: Repository slug
  268. - `pull_request_id`: Pull request ID
  269. #### `convertTodraft`
  270. Converts a regular pull request to draft status.
  271. **Parameters:**
  272. - `workspace`: Bitbucket workspace name
  273. - `repo_slug`: Repository slug
  274. - `pull_request_id`: Pull request ID
  275. ### Pull Request Comment Operations
  276. #### `getPullRequestComments`
  277. Lists comments on a pull request.
  278. **Parameters:**
  279. - `workspace`: Bitbucket workspace name
  280. - `repo_slug`: Repository slug
  281. - `pull_request_id`: Pull request ID
  282. #### `addPullRequestComment`
  283. Creates a comment on a pull request (general or inline).
  284. **Parameters:**
  285. - `workspace`: Bitbucket workspace name
  286. - `repo_slug`: Repository slug
  287. - `pull_request_id`: Pull request ID
  288. - `content`: Comment content in markdown format
  289. - `inline` (optional): Inline comment information for commenting on specific lines
  290. **Inline Comment Format:**
  291. The `inline` parameter allows you to create comments on specific lines of code in the pull request diff:
  292. ```json
  293. {
  294. "path": "src/file.ts",
  295. "to": 15, // Line number in NEW version (for added/modified lines)
  296. "from": 10 // Line number in OLD version (for deleted/modified lines)
  297. }
  298. ```
  299. **Examples:**
  300. - **General comment**: Omit the `inline` parameter for a general pull request comment
  301. - **Comment on new line**: Use only `to` parameter
  302. - **Comment on deleted line**: Use only `from` parameter
  303. - **Comment on modified line**: Use both `from` and `to` parameters
  304. **Usage:**
  305. ```javascript
  306. // General comment
  307. addPullRequestComment(workspace, repo, pr_id, "Great work!");
  308. // Inline comment on new line 25
  309. addPullRequestComment(workspace, repo, pr_id, "Consider error handling here", {
  310. path: "src/service.ts",
  311. to: 25,
  312. });
  313. ```
  314. #### `getPullRequestComment`
  315. Gets a specific comment on a pull request.
  316. **Parameters:**
  317. - `workspace`: Bitbucket workspace name
  318. - `repo_slug`: Repository slug
  319. - `pull_request_id`: Pull request ID
  320. - `comment_id`: Comment ID
  321. #### `updatePullRequestComment`
  322. Updates a comment on a pull request.
  323. **Parameters:**
  324. - `workspace`: Bitbucket workspace name
  325. - `repo_slug`: Repository slug
  326. - `pull_request_id`: Pull request ID
  327. - `comment_id`: Comment ID
  328. - `content`: Updated comment content
  329. #### `deletePullRequestComment`
  330. Deletes a comment on a pull request.
  331. **Parameters:**
  332. - `workspace`: Bitbucket workspace name
  333. - `repo_slug`: Repository slug
  334. - `pull_request_id`: Pull request ID
  335. - `comment_id`: Comment ID
  336. #### `resolveComment`
  337. Resolves a comment thread on a pull request.
  338. **Parameters:**
  339. - `workspace`: Bitbucket workspace name
  340. - `repo_slug`: Repository slug
  341. - `pull_request_id`: Pull request ID
  342. - `comment_id`: Comment ID
  343. #### `reopenComment`
  344. Reopens a resolved comment thread on a pull request.
  345. **Parameters:**
  346. - `workspace`: Bitbucket workspace name
  347. - `repo_slug`: Repository slug
  348. - `pull_request_id`: Pull request ID
  349. - `comment_id`: Comment ID
  350. ### Pull Request Diff Operations
  351. #### `getPullRequestDiff`
  352. Gets the diff for a pull request.
  353. **Parameters:**
  354. - `workspace`: Bitbucket workspace name
  355. - `repo_slug`: Repository slug
  356. - `pull_request_id`: Pull request ID
  357. #### `getPullRequestDiffStat`
  358. Gets the diff statistics for a pull request.
  359. **Parameters:**
  360. - `workspace`: Bitbucket workspace name
  361. - `repo_slug`: Repository slug
  362. - `pull_request_id`: Pull request ID
  363. #### `getPullRequestPatch`
  364. Gets the patch for a pull request.
  365. **Parameters:**
  366. - `workspace`: Bitbucket workspace name
  367. - `repo_slug`: Repository slug
  368. - `pull_request_id`: Pull request ID
  369. ### Pull Request Task Operations
  370. #### `getPullRequestTasks`
  371. Lists tasks on a pull request.
  372. **Parameters:**
  373. - `workspace`: Bitbucket workspace name
  374. - `repo_slug`: Repository slug
  375. - `pull_request_id`: Pull request ID
  376. #### `createPullRequestTask`
  377. Creates a task on a pull request.
  378. **Parameters:**
  379. - `workspace`: Bitbucket workspace name
  380. - `repo_slug`: Repository slug
  381. - `pull_request_id`: Pull request ID
  382. - `content`: Task content
  383. - `comment` (optional): Comment ID to associate with the task
  384. - `pending` (optional): Whether the task is pending
  385. #### `getPullRequestTask`
  386. Gets a specific task on a pull request.
  387. **Parameters:**
  388. - `workspace`: Bitbucket workspace name
  389. - `repo_slug`: Repository slug
  390. - `pull_request_id`: Pull request ID
  391. - `task_id`: Task ID
  392. #### `updatePullRequestTask`
  393. Updates a task on a pull request.
  394. **Parameters:**
  395. - `workspace`: Bitbucket workspace name
  396. - `repo_slug`: Repository slug
  397. - `pull_request_id`: Pull request ID
  398. - `task_id`: Task ID
  399. - `content` (optional): Updated task content
  400. - `state` (optional): Updated task state
  401. #### `deletePullRequestTask`
  402. Deletes a task on a pull request.
  403. **Parameters:**
  404. - `workspace`: Bitbucket workspace name
  405. - `repo_slug`: Repository slug
  406. - `pull_request_id`: Pull request ID
  407. - `task_id`: Task ID
  408. ### Other Pull Request Operations
  409. #### `getPullRequestCommits`
  410. Lists commits on a pull request.
  411. **Parameters:**
  412. - `workspace`: Bitbucket workspace name
  413. - `repo_slug`: Repository slug
  414. - `pull_request_id`: Pull request ID
  415. #### `getPullRequestStatuses`
  416. Lists commit statuses for a pull request.
  417. **Parameters:**
  418. - `workspace`: Bitbucket workspace name
  419. - `repo_slug`: Repository slug
  420. - `pull_request_id`: Pull request ID
  421. ### Pipeline Operations
  422. #### `listPipelineRuns`
  423. Lists pipeline runs for a repository.
  424. **Parameters:**
  425. - `workspace`: Bitbucket workspace name
  426. - `repo_slug`: Repository slug
  427. - Pagination controls described in [Pagination](#pagination)
  428. - `status` (optional): Filter pipelines by status (`PENDING`, `IN_PROGRESS`, `SUCCESSFUL`, `FAILED`, `ERROR`, `STOPPED`)
  429. - `target_branch` (optional): Filter pipelines by target branch
  430. - `trigger_type` (optional): Filter pipelines by trigger type (`manual`, `push`, `pullrequest`, `schedule`)
  431. #### `getPipelineRun`
  432. Gets details for a specific pipeline run.
  433. **Parameters:**
  434. - `workspace`: Bitbucket workspace name
  435. - `repo_slug`: Repository slug
  436. - `pipeline_uuid`: Pipeline UUID
  437. - Pagination controls described in [Pagination](#pagination)
  438. #### `runPipeline`
  439. Triggers a new pipeline run.
  440. **Parameters:**
  441. - `workspace`: Bitbucket workspace name
  442. - `repo_slug`: Repository slug
  443. - `target`: Pipeline target configuration (object with `ref_type`, `ref_name`, and optional `commit_hash`, `selector_type`, `selector_pattern`)
  444. - `variables` (optional): Array of pipeline variables (objects with `key`, `value`, and optional `secured` fields)
  445. #### `stopPipeline`
  446. Stops a running pipeline.
  447. **Parameters:**
  448. - `workspace`: Bitbucket workspace name
  449. - `repo_slug`: Repository slug
  450. - `pipeline_uuid`: Pipeline UUID
  451. #### `getPipelineSteps`
  452. Lists steps for a pipeline run.
  453. **Parameters:**
  454. - `workspace`: Bitbucket workspace name
  455. - `repo_slug`: Repository slug
  456. - `pipeline_uuid`: Pipeline UUID
  457. #### `getPipelineStep`
  458. Gets details for a specific pipeline step.
  459. **Parameters:**
  460. - `workspace`: Bitbucket workspace name
  461. - `repo_slug`: Repository slug
  462. - `pipeline_uuid`: Pipeline UUID
  463. - `step_uuid`: Step UUID
  464. #### `getPipelineStepLogs`
  465. Gets logs for a specific pipeline step.
  466. **Parameters:**
  467. - `workspace`: Bitbucket workspace name
  468. - `repo_slug`: Repository slug
  469. - `pipeline_uuid`: Pipeline UUID
  470. - `step_uuid`: Step UUID
  471. ## Development
  472. ### Prerequisites
  473. - Node.js 18 or higher
  474. - npm or yarn
  475. ### Setup
  476. ```bash
  477. # Clone the repository
  478. git clone https://github.com/MatanYemini/bitbucket-mcp.git
  479. cd bitbucket-mcp
  480. # Install dependencies
  481. npm install
  482. # Build the project
  483. npm run build
  484. # Run in development mode
  485. npm run dev
  486. ```
  487. ## Publishing to the MCP Registry
  488. Use the official Model Context Protocol publishing guide when you are ready to make a new server release. The repository includes
  489. everything that guide expects:
  490. 1. Build the project so `dist/index.js` is up to date:
  491. ```bash
  492. npm run build
  493. ```
  494. 2. Generate the registry manifest (this reads `package.json` and emits `registry/bitbucket-mcp.manifest.json`):
  495. ```bash
  496. npm run registry:manifest
  497. ```
  498. 3. Follow the [publish-server guide](https://github.com/modelcontextprotocol/registry/blob/main/docs/guides/publishing/publish-server.md)
  499. to push the manifest with `smithery publish` or the recommended workflow from the guide.
  500. The generated manifest captures the CLI command (`node dist/index.js`), all documented configuration options, and pointers back to
  501. this README for setup instructions, so it can be submitted directly to the MCP registry.
  502. ## License
  503. This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
  504. ## Links
  505. - [GitHub Repository](https://github.com/MatanYemini/bitbucket-mcp)
  506. - [npm Package](https://www.npmjs.com/package/bitbucket-mcp)
  507. - [Model Context Protocol](https://modelcontextprotocol.io/)
  508. - [Bitbucket REST API Documentation](https://developer.atlassian.com/cloud/bitbucket/rest/intro/)
  509. - [Bitbucket Cloud Documentation](https://support.atlassian.com/bitbucket-cloud/)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.