Back to MCP directory
publicPublicdnsLocal runtime

bitbucket-mcp

Bitbucket MCP是一个用于与Bitbucket Cloud和Server API集成的模型上下文协议(MCP)服务器,为AI助手提供安全访问Bitbucket仓库和拉取请求的功能。

article

README

🚀 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',
    // 这里原文档代码未完整,保持原样

✨ 主要特性

  • 拉取请求操作

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

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

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

    • 可获取拉取请求的提交记录。
    • 能获取拉取请求的状态。
help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client