Bitbucket Server MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| BITBUCKET_URL | Yes | Base URL of your Bitbucket Server (e.g., https://bitbucket.yourcompany.com). Must use HTTPS. | |
| BITBUCKET_TOKEN | Yes | HTTP access token (create in Bitbucket > User Settings > HTTP Access Tokens) | |
| BITBUCKET_LOG_LEVEL | No | Log level for stderr output: DEBUG, INFO, WARNING, ERROR (default: INFO) | INFO |
| BITBUCKET_ALLOW_DANGEROUS_DELETE | No | Set to '1' to enable Tier-1 delete tools (branch, tag, PR, comment, task, attachment) | |
| BITBUCKET_ALLOW_DESTRUCTIVE_DELETE | No | Set to '1' to enable Tier-2 delete tools (project, repository). Requires BITBUCKET_ALLOW_DANGEROUS_DELETE=1 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_projectsA | List all projects visible to the current user (paginated). Args: start: Page start index (default 0). limit: Number of results per page (default 25, max 1000). |
| get_projectA | Get details of a specific project by its key. Args: project_key: The project key (e.g., 'PROJ'). |
| list_repositoriesA | List all repositories in a project (paginated). Args: project_key: The project key. start: Page start index (default 0). limit: Number of results per page (default 25, max 1000). |
| get_repositoryB | Get details of a specific repository. Args: project_key: The project key. repo_slug: The repository slug. |
| create_repositoryB | Create a new repository in a project. Args: project_key: The project key to create the repo in. name: Name for the new repository. scm_id: SCM type, typically 'git' (default). forkable: Whether the repo can be forked (default True). description: Optional description for the repository. |
| list_branchesA | List branches in a repository (paginated). Args: project_key: The project key. repo_slug: The repository slug. filter_text: Optional text to filter branch names. start: Page start index (default 0). limit: Number of results per page (default 25). |
| get_default_branchB | Get the default branch of a repository. Args: project_key: The project key. repo_slug: The repository slug. |
| create_branchB | Create a new branch in a repository. Args: project_key: The project key. repo_slug: The repository slug. name: Name for the new branch. start_point: Commit ID or branch name to branch from. |
| list_tagsA | List tags in a repository (paginated). Args: project_key: The project key. repo_slug: The repository slug. filter_text: Optional text to filter tag names. start: Page start index (default 0). limit: Number of results per page (default 25). |
| browse_filesB | Browse the file tree of a repository at a given path and revision. Args: project_key: The project key. repo_slug: The repository slug. path: Path within the repository to browse (empty for root). at: Optional branch name, tag, or commit ID (defaults to default branch). start: Page start index (default 0). limit: Number of results per page (default 25). |
| get_file_contentA | Get the raw content of a file from a repository. Args: project_key: The project key. repo_slug: The repository slug. path: Full path to the file within the repository. at: Optional branch name, tag, or commit ID (defaults to default branch). |
| list_filesA | List file paths in a repository directory (paginated). Returns a flat list of file paths (strings), unlike browse_files which returns structured entries. Args: project_key: The project key. repo_slug: The repository slug. path: Path within the repository (empty for root). at: Optional branch name, tag, or commit ID (defaults to default branch). start: Page start index (default 0). limit: Number of results per page (default 25). |
| list_commitsA | List commits in a repository (paginated), optionally filtered by branch or path. Args: project_key: The project key. repo_slug: The repository slug. until: Optional branch, tag, or commit to list commits up to (inclusive). since: Optional commit to list commits after (exclusive). path: Optional file path to restrict commits to those affecting this path. start: Page start index (default 0). limit: Number of results per page (default 25). |
| get_commitB | Get details of a specific commit. Args: project_key: The project key. repo_slug: The repository slug. commit_id: The full commit hash. |
| get_commit_diffA | Get the diff for a specific commit. Args: project_key: The project key. repo_slug: The repository slug. commit_id: The full commit hash. context_lines: Number of context lines around changes (default 10, max 100). src_path: Optional path to restrict the diff to a specific file. |
| get_commit_changesA | Get the list of files changed in a commit (paginated). Args: project_key: The project key. repo_slug: The repository slug. commit_id: The full commit hash. start: Page start index (default 0). limit: Number of results per page (default 25). |
| list_pull_requestsA | List pull requests in a repository (paginated). Args: project_key: The project key. repo_slug: The repository slug. state: PR state filter - 'OPEN', 'DECLINED', 'MERGED', or 'ALL' (default 'OPEN'). direction: PR direction - 'INCOMING' or 'OUTGOING' (default 'INCOMING'). at: Optional target branch ref filter (e.g., 'refs/heads/main'). filter_text: Optional text to filter PR titles. order: Sort order - 'OLDEST' or 'NEWEST' (default 'NEWEST'). participant: Optional username to filter by participant. draft: Optional draft filter - True for drafts only, False for non-drafts, None for all. start: Page start index (default 0). limit: Number of results per page (default 25). |
| get_pull_requestB | Get details of a specific pull request. Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. |
| create_pull_requestA | Create a new pull request. Branch names should be bare (e.g., 'feature/x'), the 'refs/heads/' prefix is added automatically. Args: project_key: The project key. repo_slug: The repository slug. title: Title of the pull request. source_branch: Source branch name (e.g., 'feature/my-feature'). target_branch: Target branch name (e.g., 'main'). description: Optional description/body for the pull request. reviewers: Optional list of reviewer usernames. draft: Whether to create the PR as a draft (default False). |
| update_pull_requestA | Update a pull request's title, description, reviewers, target branch, or draft status. The version parameter is required for optimistic locking. Get it from get_pull_request. Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. version: Current version of the PR (required for optimistic locking). title: New title (leave empty to keep current). description: New description (None to keep current, empty string to clear). reviewers: New list of reviewer usernames (None to keep current). target_branch: New target branch (leave empty to keep current). draft: Set draft status (None to keep current, True/False to change). |
| create_draft_pull_requestA | Create a new pull request in draft mode. Draft PRs are not yet ready for review. Use publish_draft_pull_request to publish when ready. Branch names should be bare (e.g., 'feature/x'), the 'refs/heads/' prefix is added automatically. Args: project_key: The project key. repo_slug: The repository slug. title: Title of the pull request. source_branch: Source branch name (e.g., 'feature/my-feature'). target_branch: Target branch name (e.g., 'main'). description: Optional description/body for the pull request. reviewers: Optional list of reviewer usernames. |
| publish_draft_pull_requestA | Publish a draft pull request, making it ready for review. The version parameter is required for optimistic locking. Get it from get_pull_request. Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. version: Current version of the PR (required for optimistic locking). |
| convert_to_draftA | Convert an open pull request back to draft mode. The version parameter is required for optimistic locking. Get it from get_pull_request. Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. version: Current version of the PR (required for optimistic locking). |
| can_merge_pull_requestB | Check whether a pull request can be merged. Returns merge readiness including canMerge status, conflicted state, and any vetoes. Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. |
| merge_pull_requestA | Merge a pull request. Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. version: Current version of the PR (required for optimistic locking). strategy: Optional merge strategy (e.g., 'merge-commit', 'squash', 'rebase-no-ff'). |
| decline_pull_requestC | Decline a pull request. Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. version: Current version of the PR (required for optimistic locking). |
| reopen_pull_requestC | Reopen a previously declined pull request. Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. version: Current version of the PR (required for optimistic locking). |
| approve_pull_requestC | Approve a pull request as the authenticated user. Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. |
| unapprove_pull_requestC | Remove your approval from a pull request. Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. |
| request_changes_pull_requestC | Request changes on a pull request as the authenticated user. Sets the user's participant status to NEEDS_WORK. Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. |
| remove_change_request_pull_requestA | Remove your change request from a pull request. Resets the user's participant status to UNAPPROVED. Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. |
| list_pull_request_participantsA | List participants (reviewers) of a pull request with their roles and approval statuses. Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. start: Page start index (default 0). limit: Number of results per page (default 25). |
| watch_pull_requestC | Subscribe as a watcher on a pull request. Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. |
| unwatch_pull_requestC | Unsubscribe from watching a pull request. Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. |
| get_commit_message_suggestionB | Get a suggested commit message for merging a pull request. Based on the PR title and included commits. Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. |
| get_pull_request_diffB | Get the diff of a pull request. Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. context_lines: Number of context lines around changes (default 10, max 100). src_path: Optional path to restrict the diff to a specific file. |
| get_pull_request_diff_statA | Get the per-file change list for a pull request (added, modified, deleted, moved). Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. start: Page start index (default 0). limit: Number of results per page (default 25). |
| list_pull_request_commitsC | List commits included in a pull request (paginated). Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. start: Page start index (default 0). limit: Number of results per page (default 25). |
| get_pull_request_activitiesC | Get the activity feed for a pull request (paginated). Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. start: Page start index (default 0). limit: Number of results per page (default 25). |
| list_pull_request_commentsB | List comments on a pull request (paginated). Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. start: Page start index (default 0). limit: Number of results per page (default 25). |
| get_pull_request_commentC | Get a specific comment on a pull request. Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. comment_id: The comment ID. |
| add_pull_request_commentA | Add a comment to a pull request. Supports general, inline (on a file/line), and reply comments. Use severity='BLOCKER' to create a task/blocker comment. Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. text: The comment text/body. severity: Optional severity - 'NORMAL' or 'BLOCKER' (creates a task). parent_comment_id: Optional parent comment ID to create a reply thread. file_path: Optional file path for an inline comment. line: Optional line number for an inline comment. line_type: Line type for inline comment: 'ADDED', 'REMOVED', or 'CONTEXT'. file_type: File type for inline comment: 'FROM' (old) or 'TO' (new). |
| update_pull_request_commentB | Update the text of a comment on a pull request. Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. comment_id: The comment ID to update. version: Current version of the comment (required for optimistic locking). text: The new comment text. |
| resolve_pull_request_commentA | Resolve a comment thread on a pull request. Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. comment_id: The comment ID to resolve. version: Current version of the comment (required for optimistic locking). |
| reopen_pull_request_commentB | Reopen a previously resolved comment thread on a pull request. Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. comment_id: The comment ID to reopen. version: Current version of the comment (required for optimistic locking). |
| list_pull_request_tasksC | List tasks on a pull request (paginated). Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. start: Page start index (default 0). limit: Number of results per page (default 25). |
| create_pull_request_taskA | Create a task on a pull request, optionally linked to a comment. Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. text: The task description. comment_id: Optional comment ID to attach the task to. |
| get_pull_request_taskC | Get a specific task on a pull request. Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. task_id: The task ID. |
| update_pull_request_taskA | Update a task's content or state on a pull request. Args: project_key: The project key. repo_slug: The repository slug. pr_id: The pull request ID. task_id: The task ID. text: New task description (leave empty to keep current). state: New task state - 'OPEN' or 'RESOLVED' (leave empty to keep current). |
| list_dashboard_pull_requestsA | List pull requests visible to the authenticated user across all repositories (paginated). Returns PRs from all projects/repos where the user has access, filtered by state and role. Args: state: PR state filter - 'OPEN', 'DECLINED', 'MERGED', or 'ALL' (default 'OPEN'). role: Filter by user's role - 'AUTHOR', 'REVIEWER', or 'PARTICIPANT' (optional). closed_since: Only include PRs closed after this epoch timestamp in milliseconds (optional). order: Sort order - 'OLDEST' or 'NEWEST' (default 'NEWEST'). start: Page start index (default 0). limit: Number of results per page (default 25). |
| list_inbox_pull_requestsA | List pull requests in the authenticated user's inbox (PRs needing review action). The inbox contains PRs where the user has been added as a reviewer and has not yet completed their review. Args: role: Filter by role - typically 'REVIEWER' (default 'REVIEWER'). start: Page start index (default 0). limit: Number of results per page (default 25). |
| search_codeB | Search for code across repositories using Bitbucket Server's code search. Requires the Bitbucket Server instance to have code search enabled (Elasticsearch). Args: query: Search query string. project_key: Optional project key to restrict search scope. repo_slug: Optional repository slug to restrict search (requires project_key). limit: Maximum number of results (default 25, max 1000). |
| find_fileA | Find files by name or path pattern using Bitbucket Server's code search. Supports Lucene wildcards (e.g., 'SPREMRG*', '.pks', 'src/main/.java'). Args: query: File name or path pattern to search for. project_key: Optional project key to restrict search scope. repo_slug: Optional repository slug to restrict search (requires project_key). limit: Maximum number of results (default 25, max 1000). |
| find_userA | Search for users by partial name, username, or email address. Returns user details including the slug needed for reviewer fields. Args: filter: Search text to match against usernames, display names, and email addresses. start: Page start index (default 0). limit: Number of results per page (default 25). |
| get_attachmentA | Download an attachment from a repository by its numeric ID. Returns content for text files or a size summary for binary files. Args: project_key: The project key. repo_slug: The repository slug. attachment_id: The numeric attachment ID. |
| get_attachment_metadataB | Retrieve the metadata (JSON) associated with an attachment. Args: project_key: The project key. repo_slug: The repository slug. attachment_id: The numeric attachment ID. |
| save_attachment_metadataC | Create or update metadata for an attachment. The metadata field must be valid JSON. Args: project_key: The project key. repo_slug: The repository slug. attachment_id: The numeric attachment ID. metadata: JSON string of metadata to save. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/ManpreetShuann/bitbucket-server-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server