# ===================================================================
# Atlassian Bitbucket MCP Server - Environment Configuration
# ===================================================================
# === Required Configuration ===
# Bitbucket instance URL
# - For Bitbucket Cloud: https://bitbucket.org
# - For self-hosted: https://bitbucket.company.com
BITBUCKET_URL=https://bitbucket.org
# Personal Access Token for authentication
# How to create:
# - Bitbucket Cloud: Settings > Personal Access Tokens
# - Bitbucket Server/DC: Profile > Manage account > Personal access tokens
# Required permissions: Repository read/write, Pull request read/write
BITBUCKET_TOKEN=your_personal_access_token_here
# Default project key for operations
# Example: PROJ, DEV, TEAM
BITBUCKET_DEFAULT_PROJECT=PROJ
# === Optional - Permissions/Capabilities ===
# Comma-separated list of allowed MCP tool actions
# Leave empty or comment out to allow all actions
# Available actions:
# - read_pr: Read pull request information, diffs, comments
# - write_pr: Add/edit/delete comments, resolve comment threads
# - manage_pr: Approve/unapprove pull requests
# - search_code: Search code across repositories
# - read_repo: Read repository information, branches, commits, files
# - read_project: List and read project information
BITBUCKET_ALLOWED_ACTIONS=read_pr,write_pr,manage_pr,search_code,read_repo,read_project
# === Optional - Caching Configuration ===
# Enable/disable caching layer
BITBUCKET_CACHE_ENABLED=true
# Cache TTL for repository lists (in seconds)
# Default: 3600 (1 hour)
# Repositories are rarely created, so longer TTL is appropriate
BITBUCKET_CACHE_TTL_REPOS=3600
# Cache TTL for repository metadata (in seconds)
# Default: 1800 (30 minutes)
BITBUCKET_CACHE_TTL_METADATA=1800
# Cache TTL for user information (in seconds)
# Default: 3600 (1 hour)
BITBUCKET_CACHE_TTL_USER=3600
# === Optional - API Configuration ===
# Bitbucket API version (for Cloud instances)
# Default: 2.0
BITBUCKET_API_VERSION=2.0
# HTTP request timeout in milliseconds
# Default: 30000 (30 seconds)
BITBUCKET_REQUEST_TIMEOUT=30000
# Maximum number of retries for failed API requests
# Default: 3
BITBUCKET_MAX_RETRIES=3
# Delay between requests to avoid rate limiting (in milliseconds)
# Default: 1000 (1 second)
# Increase if you encounter rate limit errors
BITBUCKET_RATE_LIMIT_DELAY=1000