Bitbucket Mcp

Bitbucket Mcp

🚀 Bitbucket 模型上下文协议(MCP)插件

本插件用于与 Bitbucket 仓库进行交互,支持拉取请求、评论、任务等多种操作,能有效提升仓库管理效率。

🚀 快速开始

📦 安装插件

npm install bitbucket-mcp

💻 使用示例

🔍 基础用法

创建拉取请求
const { BitbucketMCP } = require('bitbucket-mcp');

async function createPullRequest() {
const bitbucket = new BitbucketMCP({
host: 'https://api.bitbucket.org',
username: 'your-username',
password: 'your-password'
});

try {
const response = await bitbucket.prisms.pull_requests.create({
workspace: 'your-workspace',
repo_slug: 'your-repository',
title: 'New Feature',
description: 'Implement new feature',
source_branch: 'feature-branch',
destination_branch: 'main'
});

console.log('Pull request created:', response.data);
} catch (error) {
console.error('Error creating pull request:', error.message);
}
}

createPullRequest();
更新拉取请求
async function updatePullRequest() {
const bitbucket = new BitucketMCP({
host: 'https://api.bitbucket.org',
username: 'your-username',
// 这里原文档代码未完整,保持原样

✨ 主要特性

  • 拉取请求操作

    • 可获取所有拉取请求。
    • 能获取特定拉取请求。
    • 支持创建新的拉取请求。
    • 可以更新现有拉取请求。
    • 能够删除拉取请求。
  • 评论操作

    • 可在拉取请求上创建评论。
    • 能获取所有拉取请求评论。
    • 支持更新拉取请求评论。
    • 可以删除拉取请求评论。
    • 能够解决或重新打开评论线程。
  • 任务操作

    • 可在拉取请求上创建任务。
    • 能获取所有拉取请求任务。
    • 支持更新拉取请求任务。
    • 可以删除拉取请求任务。
  • 其他功能

    • 可获取拉取请求的提交记录。
    • 能获取拉取请求的状态。
  • 0 关注
  • 0 收藏,12 浏览
  • system 提出于 2025-09-27 09:06

相似服务问题

相关AI产品