mcp-bitbucket-config
Bitbucket MCP Server configuration for Kiro IDE - Easy setup guide for integrating Bitbucket with Kiro
This repository provides a ready-to-use configuration for integrating Bitbucket with Kiro IDE using the @aashari/mcp-server-atlassian-bitbucket MCP server. With this setup, you can interact with Bitbucket directly from Kiro: - π List repositories in your workspaces - π View and manage pull requests - π Read PR diffs and comments - πΏ List branches and commits - π Search across your Bitbucket workspace β οΈ Important: Bitbucket App Passwords are deprecated and will be removed on July 28, 2026. Use the new API tokens with scopes instead.
Summary extracted from the README.
Bitbucket MCP Server for Kiro
This repository provides a ready-to-use configuration for integrating Bitbucket with Kiro IDE using the @aashari/mcp-server-atlassian-bitbucket MCP server.
What You Get
With this setup, you can interact with Bitbucket directly from Kiro:
- π List repositories in your workspaces
- π View and manage pull requests
- π Read PR diffs and comments
- πΏ List branches and commits
- π Search across your Bitbucket workspace
Prerequisites
- Kiro IDE installed
- Bitbucket Cloud account
- Node.js installed (for
npx)
Setup Instructions
1. Generate a Bitbucket API Token
β οΈ Important: Bitbucket App Passwords are deprecated and will be removed on July 28, 2026. Use the new API tokens with scopes instead.
- Go to https://id.atlassian.com/manage-profile/security/api-tokens
- Click Create API token
- Give it a name (e.g., "Kiro MCP")
- The token will automatically have access to all your Atlassian products (Jira, Confluence, Bitbucket)
- Copy the generated token (format:
ATATT3xFfGF0...)
Required Scopes:
Your token needs these Bitbucket permissions:
- β
read:repository:bitbucketβ View repos, branches, commits - β
read:pipeline:bitbucketβ View pipeline status - β
read:issue:bitbucketβ View issues (optional) - β
write:repository:bitbucketβ Create PRs, push branches (optional) - β
write:pipeline:bitbucketβ Trigger pipelines (optional)
2. Add Configuration to Kiro
Option A: User-level config (Recommended)
Works across all your workspaces.
Edit ~/.kiro/settings/mcp.json and add the Bitbucket server configuration:
{
"mcpServers": {
"bitbucket": {
"command": "npx",
"args": ["-y", "@aashari/mcp-server-atlassian-bitbucket"],
"env": {
"ATLASSIAN_USER_EMAIL": "your-email@company.com",
"ATLASSIAN_API_TOKEN": "ATATT3xFfGF0..."
},
"disabled": false,
"autoApprove": [
"bb_list_repositories",
"bb_get_repository",
"bb_list_pull_requests",
"bb_get_pull_request",
"bb_get_pull_request_diff",
"bb_list_repository_branches",
"bb_list_pull_request_comments"
]
}
}
}
Option B: Workspace-level config
Only applies to the current workspace.
Create or edit .kiro/settings/mcp.json in your project root with the same configuration.
3. Reconnect the MCP Server
- Open Kiro IDE
- Go to the MCP Server view in the Kiro panel
- Find bitbucket in the list
- Click Reconnect
- Or simply restart Kiro
4. Test the Connection
Ask Kiro:
List all repositories in my Bitbucket workspace
If you see your repos, you're all set! π
Available Commands
Once connected, you can ask Kiro to:
| What to Ask | What It Does |
|---|---|
| "List all repos in workspace X" | Shows all repositories |
| "Show open PRs in repo Y" | Lists pull requests |
| "Get the diff for PR #42" | Shows code changes |
| "List branches in repo Z" | Shows all branches |
| "Show comments on PR #15" | Displays PR discussion |
Configuration Reference
Environment Variables
| Variable | Required | Description |
|---|---|---|
ATLASSIAN_USER_EMAIL |
Yes | Your Bitbucket account email |
ATLASSIAN_API_TOKEN |
Yes | API token from Atlassian |
Auto-Approved Tools
The config includes autoApprove for read-only operations:
bb_list_repositoriesbb_get_repositorybb_list_pull_requestsbb_get_pull_requestbb_get_pull_request_diffbb_list_repository_branchesbb_list_pull_request_comments
Write operations (creating PRs, commenting) will prompt for confirmation.
Troubleshooting
401 Unauthorized Error
Cause: Invalid or expired token, or missing Bitbucket scopes.
Fix:
- Go to https://id.atlassian.com/manage-profile/security/api-tokens
- Check your token has Bitbucket scopes (click "View scopes")
- If missing scopes, revoke and create a new token
- Update your
mcp.jsonwith the new token - Reconnect the MCP server in Kiro
404 Workspace Not Found
Cause: Incorrect workspace name.
Fix: Use the workspace slug (lowercase, dashes), not the display name.
Example:
- β "Devopsx Vietnam" (display name)
- β "devopsx-vietnam" (slug)
410 Deprecated API Endpoint
Cause: The MCP server may use deprecated Bitbucket APIs.
Fix: The server should handle this automatically by using newer endpoints. If you still see this error, report it to the MCP server maintainer.
Token Shows as Expired
Atlassian API tokens expire after 1 year. Check the "Expires" column at https://id.atlassian.com/manage-profile/security/api-tokens and generate a new one if needed.
Security Best Practices
β οΈ Never commit your API token to Git!
- Keep tokens in
~/.kiro/settings/mcp.json(outside your repo) - If using workspace-level config, add to
.gitignore:.kiro/settings/mcp.json - Revoke tokens you're no longer using
- Use separate tokens for different tools/environments
Example Workflow
Here's a typical workflow using Kiro + Bitbucket:
- List repos: "Show me all repos in the esoft-vietnam workspace"
- Check PRs: "Are there any open PRs in the esoft-core repo?"
- Review code: "Show me the diff for PR #23"
- Read discussion: "What are the comments on PR #23?"
- Check branches: "List all branches in esoft-payment"
Resources
Contributing
Found an issue or have a suggestion? Open an issue or submit a pull request!
License
MIT License - see LICENSE for details.
Author
Created by @devopsxvn-svg
β If this helped you, consider giving it a star!