Skip to main content
Glama

Atlassian Bitbucket MCP Server

by aashari

bb_clone_repo

Clone a Bitbucket repository to your local system using SSH or HTTPS. Provide workspace slug, repository name, and target directory path. Ensures proper SSH key setup for secure cloning.

Instructions

Clones a Bitbucket repository to your local filesystem using SSH (preferred) or HTTPS. Requires Bitbucket credentials and proper SSH key setup for optimal usage.

Parameters:

  • workspaceSlug: The Bitbucket workspace containing the repository (optional - will use default if not provided)
  • repoSlug: The repository name to clone (required)
  • targetPath: Parent directory where repository will be cloned (required)

Path Handling:

  • Absolute paths are strongly recommended (e.g., "/home/user/projects" or "C:\Users\name\projects")
  • Relative paths (e.g., "./my-repos" or "../downloads") will be resolved relative to the server's working directory, which may not be what you expect
  • The repository will be cloned into a subdirectory at targetPath/repoSlug
  • Make sure you have write permissions to the target directory

SSH Requirements:

  • SSH keys must be properly configured for Bitbucket
  • SSH agent should be running with your keys added
  • Will automatically fall back to HTTPS if SSH is unavailable

Example Usage:

// Clone a repository to a specific absolute path bb_clone_repo({repoSlug: "my-project", targetPath: "/home/user/projects"}) // Specify the workspace and use a relative path (less reliable) bb_clone_repo({workspaceSlug: "my-team", repoSlug: "api-service", targetPath: "./downloads"})

Returns: Success message with clone details or an error message with troubleshooting steps.

Input Schema

NameRequiredDescriptionDefault
repoSlugYesRepository name/slug to clone. This is the short name of the repository. Example: "project-api"
targetPathYesDirectory path where the repository will be cloned. IMPORTANT: Absolute paths are strongly recommended (e.g., "/home/user/projects" or "C:\Users\name\projects"). Relative paths will be resolved relative to the server's working directory, which may not be what you expect. The repository will be cloned into a subdirectory at targetPath/repoSlug. Make sure you have write permissions to this location.
workspaceSlugNoBitbucket workspace slug containing the repository. If not provided, the tool will use your default workspace (either configured via BITBUCKET_DEFAULT_WORKSPACE or the first workspace in your account). Example: "myteam"

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "repoSlug": { "description": "Repository name/slug to clone. This is the short name of the repository. Example: \"project-api\"", "minLength": 1, "type": "string" }, "targetPath": { "description": "Directory path where the repository will be cloned. IMPORTANT: Absolute paths are strongly recommended (e.g., \"/home/user/projects\" or \"C:\\Users\\name\\projects\"). Relative paths will be resolved relative to the server's working directory, which may not be what you expect. The repository will be cloned into a subdirectory at targetPath/repoSlug. Make sure you have write permissions to this location.", "minLength": 1, "type": "string" }, "workspaceSlug": { "description": "Bitbucket workspace slug containing the repository. If not provided, the tool will use your default workspace (either configured via BITBUCKET_DEFAULT_WORKSPACE or the first workspace in your account). Example: \"myteam\"", "type": "string" } }, "required": [ "repoSlug", "targetPath" ], "type": "object" }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aashari/mcp-server-atlassian-bitbucket'

If you have feedback or need assistance with the MCP directory API, please join our Discord server