{
  "info": {
    "name": "Bitbucket — mcp.ai",
    "description": "REST API for the Bitbucket MCP. Set {{apiKey}} to a workspace key (sk_live_…) created at https://mcp.ai/settings/api-keys.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiKey}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.mcp.ai/api/bitbucket",
      "type": "string"
    },
    {
      "key": "apiKey",
      "value": "sk_live_...",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "bitbucket_create_branch",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/create/branch",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "create",
            "branch"
          ]
        },
        "description": "Creates a new branch in a bitbucket repository from a target commit hash; the branch name must be unique, adhere to bitbucket's naming conventions, and not include the 'refs/heads/' prefix.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"name\": \"\",\n  \"repo_slug\": \"\",\n  \"workspace\": \"\",\n  \"target_hash\": \"\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "bitbucket_create_issue",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/create/issue",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "create",
            "issue"
          ]
        },
        "description": "Creates a new issue in a bitbucket repository, setting the authenticated user as reporter; ensures assignee (if provided) has repository access, and that any specified milestone, version, or component",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"kind\": \"\",\n  \"title\": \"\",\n  \"due_on\": \"\",\n  \"content\": \"\",\n  \"assignee\": \"\",\n  \"priority\": \"\",\n  \"repo_slug\": \"\",\n  \"workspace\": \"\",\n  \"version_id\": 0,\n  \"component_id\": 0,\n  \"milestone_id\": 0\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "bitbucket_create_issue_comment",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/create/issue/comment",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "create",
            "issue",
            "comment"
          ]
        },
        "description": "Adds a new comment with markdown support to an existing bitbucket issue.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"content\": \"\",\n  \"issue_id\": \"\",\n  \"repo_slug\": \"\",\n  \"workspace\": \"\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "bitbucket_create_pull_request",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/create/pull/request",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "create",
            "pull",
            "request"
          ]
        },
        "description": "Creates a new pull request in a specified bitbucket repository, ensuring the source branch exists and is distinct from the (optional) destination branch.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"title\": \"\",\n  \"repo_slug\": \"\",\n  \"reviewers\": \"\",\n  \"workspace\": \"\",\n  \"description\": \"\",\n  \"source_branch\": \"\",\n  \"destination_branch\": \"\",\n  \"close_source_branch\": false\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "bitbucket_create_repository",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/create/repository",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "create",
            "repository"
          ]
        },
        "description": "Creates a new bitbucket 'git' repository in a specified workspace, defaulting to the workspace's oldest project if `project key` is not provided.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"has_wiki\": false,\n  \"language\": \"\",\n  \"repo_slug\": \"\",\n  \"workspace\": \"\",\n  \"has_issues\": false,\n  \"is_private\": false,\n  \"description\": \"\",\n  \"fork_policy\": \"\",\n  \"project_key\": \"\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "bitbucket_create_snippet_comment",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/create/snippet/comment",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "create",
            "snippet",
            "comment"
          ]
        },
        "description": "Posts a new top-level comment or a threaded reply to an existing comment on a specified bitbucket snippet.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"content\": \"\",\n  \"parent_id\": 0,\n  \"workspace\": \"\",\n  \"encoded_id\": \"\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "bitbucket_delete_issue",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/delete/issue",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "delete",
            "issue"
          ]
        },
        "description": "Permanently deletes a specific issue, identified by its `issue id`, from the repository specified by `repo slug` within the given `workspace`.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"issue_id\": \"\",\n  \"repo_slug\": \"\",\n  \"workspace\": \"\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "bitbucket_delete_repository",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/delete/repository",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "delete",
            "repository"
          ]
        },
        "description": "Permanently deletes a specified bitbucket repository; this action is irreversible and does not affect forks.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"repo_slug\": \"\",\n  \"workspace\": \"\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "bitbucket_get_current_user",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/get/current/user",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "get",
            "current",
            "user"
          ]
        },
        "description": "Retrieves the profile information (uuid, display name, links, creation date) for the currently authenticated bitbucket user.",
        "body": {
          "mode": "raw",
          "raw": "{}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "bitbucket_get_file_from_repository",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/get/file/from/repository",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "get",
            "file",
            "from",
            "repository"
          ]
        },
        "description": "Retrieves a specific file's content from a bitbucket repository at a given commit (hash, branch, or tag), failing if the file path is invalid for that commit.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"path\": \"\",\n  \"commit\": \"\",\n  \"repo_slug\": \"\",\n  \"workspace\": \"\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "bitbucket_get_pull_request",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/get/pull/request",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "get",
            "pull",
            "request"
          ]
        },
        "description": "Get a single pull request by id with complete details.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"repo_slug\": \"\",\n  \"workspace\": \"\",\n  \"pull_request_id\": 0\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "bitbucket_get_snippet",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/get/snippet",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "get",
            "snippet"
          ]
        },
        "description": "Retrieves a specific bitbucket snippet by its encoded id from an existing workspace, returning its metadata and file structure.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"workspace\": \"\",\n  \"encoded_id\": \"\",\n  \"accept_format\": \"\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "bitbucket_list_pull_requests",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/list/pull/requests",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "list",
            "pull",
            "requests"
          ]
        },
        "description": "Lists pull requests in a specified, accessible bitbucket repository, optionally filtering by state (open, merged, declined).",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"page\": 0,\n  \"state\": \"\",\n  \"pagelen\": 0,\n  \"repo_slug\": \"\",\n  \"workspace\": \"\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "bitbucket_list_repositories_in_workspace",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/list/repositories/in/workspace",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "list",
            "repositories",
            "in",
            "workspace"
          ]
        },
        "description": "Lists repositories in a specified bitbucket workspace, accessible to the authenticated user, with options to filter by role or query string, and sort results.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"q\": \"\",\n  \"role\": \"\",\n  \"sort\": \"\",\n  \"workspace\": \"\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "bitbucket_list_workspace_members",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/list/workspace/members",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "list",
            "workspace",
            "members"
          ]
        },
        "description": "Lists all members of a specified bitbucket workspace; the workspace must exist.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"workspace\": \"\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "bitbucket_list_workspaces",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/list/workspaces",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "list",
            "workspaces"
          ]
        },
        "description": "Lists bitbucket workspaces accessible to the authenticated user, optionally filtered and sorted.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"q\": \"\",\n  \"sort\": \"\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "bitbucket_update_issue",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/update/issue",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "update",
            "issue"
          ]
        },
        "description": "Updates an existing issue in a bitbucket repository by modifying specified attributes; requires `workspace`, `repo slug`, `issue id`, and at least one attribute to update.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"kind\": \"\",\n  \"state\": \"\",\n  \"title\": \"\",\n  \"content\": \"\",\n  \"version\": \"\",\n  \"issue_id\": \"\",\n  \"priority\": \"\",\n  \"component\": \"\",\n  \"milestone\": \"\",\n  \"repo_slug\": \"\",\n  \"workspace\": \"\",\n  \"assignee_account_id\": \"\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    }
  ]
}