Title:
Incorrect diff content and PR sync handling in MCP Bitbucket integration
Description:
Hi,
The MCP server for fetching PRs from Bitbucket appears to be misconfigured. When it retrieves the diff content, it incorrectly interprets the changes:
- Added lines are shown as deleted.
- Deleted lines are shown as added.
This inversion causes significant issues for PR reviews, especially when using agentic IDEs.
Additionally, if the PR is not synced with the master branch, the MCP fetch results are miscalculated. The reported number of changed lines does not match the actual changes in the PR.
Expected Behavior:
- MCP should correctly distinguish between added and deleted lines in PR diffs.
- MCP should properly handle unsynced PRs and retrieve accurate change data.
Actual Behavior:
- Diff content is inverted (added ↔ deleted).
- Incorrect change count when the PR is behind master.
Steps to Reproduce:
- Open a PR in Bitbucket that is a few commits behind
master. - Use MCP to fetch the PR diff.
- Observe:
- Added lines are shown as deleted.
- Deleted lines are shown as added.
- Line count mismatch with Bitbucket UI.
Environment:
- MCP Server:
mcp-server-atlassian-bitbucket - IDE: (e.g. Cursor)
- Bitbucket: (Cloud/Data Center)
- Version: (if applicable)
Additional Context:
This issue severely impacts automated PR review workflows and agentic IDE integrations that rely on accurate diff content.
Can this be fixed or added to the roadmap?