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 instance | |
| BITBUCKET_TOKEN | No | Personal access token | |
| BITBUCKET_PASSWORD | No | Password for basic auth | |
| BITBUCKET_USERNAME | No | Username for basic auth | |
| BITBUCKET_CACHE_TTL | No | Cache duration in seconds (default: 300). Set to 0 to disable caching. | |
| BITBUCKET_READ_ONLY | No | Set to true to disable all write operations | |
| BITBUCKET_ENABLED_TOOLS | No | Comma-separated list of tool names to enable. If not set, all tools are available. | |
| BITBUCKET_CUSTOM_HEADERS | No | Extra headers for all requests (Key=Value,Key2=Value2) | |
| BITBUCKET_DEFAULT_PROJECT | No | Default project key when not specified in tool calls | |
| BITBUCKET_STARTUP_HEALTHCHECK | No | Set to true to run a connectivity check against Bitbucket on startup (default: false). | |
| BITBUCKET_DIFF_MAX_LINES_PER_FILE | No | Max lines per file in diffs. Set to 0 for no limit. |
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": true
} |
| prompts | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_projectsA | List all Bitbucket projects you have access to. Use this first to discover project keys. Supports custom field selection via the |
| list_repositoriesA | List repositories in a project. Use this to find repository slugs for other operations. Supports custom field selection via the |
| browse_repositoryC | Browse files and directories in a repository to understand project structure. |
| get_file_contentA | Read file contents from a repository with pagination support for large files. |
| upload_attachmentB | Upload a file attachment to a repository. Returns a markdown reference to embed in PR comments or descriptions. |
| edit_fileA | Edit a file in a repository by committing a new version via the Bitbucket REST API. Returns the commit metadata. |
| get_file_blameA | Get blame/history information for a file. Returns line-by-line commit authorship data. |
| create_repositoryB | Create a new repository in a project. |
| delete_repositoryA | Delete a repository. This action is irreversible. |
| list_forksA | List forks of a repository. Supports custom field selection via the |
| fork_repositoryA | Fork a repository into a target project. Creates a copy of the source repository in the specified target project. |
| list_branch_restrictionsA | List branch restrictions for a repository. These control which users/groups can push to or delete specific branches or branch patterns. |
| list_branchesA | List branches in a repository. Also returns the default branch when available. Supports custom field selection via the |
| list_commitsA | List commits in a repository, optionally filtered by branch and author. Supports custom field selection via the |
| manage_branchesA | Manage branches in a repository. Actions: "create" (create a new branch), "delete" (delete a branch). Refuses to delete the default branch. |
| get_commitA | Get details of a specific commit by its ID. Supports custom field selection via the |
| compare_refsA | Compare two refs and list commits accessible from |
| list_tagsA | List tags in a repository. Supports custom field selection via the |
| get_tagA | Get details of a specific tag by its name. Supports custom field selection via the |
| manage_tagsB | Manage tags in a repository. Actions: "create" (create a new tag pointing to a commit), "delete" (delete a tag by name). |
| create_pull_requestA | Create a new pull request. Supports cross-repo PRs via sourceProject/sourceRepository and automatic default reviewer merging. |
| get_pull_requestA | Get details of a specific pull request including status, reviewers, and metadata. Supports custom field selection via the |
| update_pull_requestA | Update a pull request (title, description, target branch, or reviewers). Only changed fields are applied; reviewers are preserved if not provided. |
| merge_pull_requestA | Merge an approved pull request. Fetches the current version automatically for optimistic locking. |
| decline_pull_requestA | Decline a pull request. Fetches the current version automatically for optimistic locking. |
| list_pull_requestsA | List pull requests in a repository. Supports filtering by state, direction, order, and client-side author filtering. Supports custom field selection via the |
| list_dashboard_pull_requestsA | Get pull requests from the authenticated user dashboard. No project/repo needed. Supports custom field selection via the |
| get_pull_request_activityA | Get activity feed for a pull request. Optionally filter to only reviews or comments. |
| get_diffA | Get the diff of a pull request. Use stat=true for a lightweight summary of changed files (and line counts if the server supports it) instead of the full diff. |
| get_pull_request_commitsA | List commits for a specific pull request. Returns the commits that are part of the pull request with pagination support. |
| get_commit_pull_requestsA | List pull requests that contain a specific commit. Returns the PRs that include the given commit. |
| manage_commentA | Manage pull request comments. Actions: "create" (general, inline, threaded, or tasks), "edit" (update text/severity/state/threadResolved), "delete", "react" (add emoji reaction), "unreact" (remove reaction). |
| search_emoticonsA | Search available emoticons for comment reactions. Returns matching shortcut names to use with manage_comment react/unreact. |
| manage_reviewA | Approve, unapprove, or publish a review on a pull request. Use "approve" to approve, "unapprove" to remove your approval, and "publish" to submit a review with an optional overview comment and status. |
| searchA | Search for code or files across Bitbucket repositories. Supports filtering by project, repository, and search type. Supports custom field selection via the |
| get_code_insightsA | Get code insight reports and their annotations for a pull request. Shows build results, code quality, and other analysis. |
| get_build_statusA | Get CI build status for a commit or pull request. When prId is provided, automatically resolves the latest commit. Returns build state (SUCCESSFUL, FAILED, INPROGRESS), name, and URL to the CI build. |
| get_server_infoA | Get Bitbucket Server version and properties. Useful to check connectivity and server version. |
| list_default_reviewer_conditionsA | List default reviewer conditions for a repository. These conditions determine which users are automatically added as reviewers to pull requests. |
| get_user_profileA | Get a Bitbucket user profile by user slug. Returns user details including display name, email, and active status. |
| search_usersA | Search Bitbucket users by filter query. Returns matching users. |
| list_labelsB | List labels for a repository. |
| manage_labelsB | Manage repository labels. Actions: "add" (create a new label), "remove" (delete a label). |
| list_webhooksA | List webhooks configured for a repository. |
| manage_webhooksC | Manage repository webhooks. Actions: "create" (add a new webhook), "update" (modify an existing webhook), "delete" (remove a webhook). |
| list_commit_commentsA | Get comments for a specific commit. Returns all comments on the commit with pagination support. |
| manage_commit_commentsC | Manage comments on a commit. Actions: "create" (add a new comment), "edit" (update an existing comment), "delete" (remove a comment). |
| list_repository_hooksA | List repository hooks and their enabled/disabled state. |
| manage_repository_hooksA | Manage repository hook settings. Actions: "enable" (enable a hook), "disable" (disable a hook), "configure" (set hook settings). |
| list_merge_checksA | List merge check configurations for a repository. Merge checks control conditions that must be met before a pull request can be merged. |
| manage_merge_checksB | Configure merge check settings for a repository. |
| list_reviewer_groupsA | List reviewer groups configured for a repository. |
| manage_reviewer_groupsC | Manage reviewer groups for a repository. Actions: "create" (create a group), "delete" (remove a group). |
| list_secret_scanning_rulesA | List secret scanning allowlist rules for a repository. Requires Bitbucket Server 8.5+. |
| list_ssh_keysA | List SSH keys for the authenticated user. |
| manage_ssh_keysA | Manage SSH keys for the authenticated user. Actions: "add" (add a key), "delete" (remove a key). |
| list_gpg_keysA | List GPG keys for the authenticated user. |
| manage_gpg_keysB | Manage GPG keys for the authenticated user. Actions: "add" (add a key), "delete" (remove a key). |
| manage_deploymentsA | Manage deployments for a commit. Actions: "get" (retrieve a deployment), "create" (record a new deployment), "delete" (remove a deployment). GET requires key, environmentKey, and deploymentSequenceNumber. POST body requires deploymentSequenceNumber, description, displayName, environment (with displayName, key, optional type), key, state, and optional url. DELETE requires key, environmentKey, and deploymentSequenceNumber. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| review-pr | Step-by-step workflow for reviewing a Bitbucket pull request. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| projects | List of all accessible Bitbucket projects with their keys and names |
| schema-fields | Entity types available for the fields param |
| schema-pr | Available fields for pr |
| schema-project | Available fields for project |
| schema-repo | Available fields for repo |
| schema-branch | Available fields for branch |
| schema-commit | Available fields for commit |
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/Upendrasengar/bitbucket-server-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server