gitlab-mcp: `remove_source_branch` in `create_merge_request` not working
⏺ Now I'll create the merge request using the GitLab API:
⏺ GitLab:create_merge_request (MCP)(project_id: "xxx", title: "xxx
xxx", description: "xxx", source_branch:
"xxx", target_branch: "main",
assignee_ids: [84], remove_source_branch: "true")
⎿ {
"id": 19248,
"iid": 12386,
"project_id": 2,
"title": "xxx",
"description": "xxx",
"state": "opened",
"draft": false,
"author": {
"username": "xxx",
"id": 84,
"name": "xxx",
"avatar_url": "https://xxx/uploads/-/system/user/avatar/84/avatar.png",
"web_url": "https://xxx/xxx"
},
"assignees": [
{
"username": "xxx",
"id": 84,
"name": "xxx",
"avatar_url": "https://xxx/uploads/-/system/user/avatar/84/avatar.png",
"web_url": "https://xxx/xxx"
}
],
"reviewers": [],
"source_branch": "xxx",
"target_branch": "main",
"diff_refs": {
"base_sha": "xxx",
"head_sha": "xxx",
"start_sha": "xxx"
},
"web_url": "https://xxx/xxx/-/merge_requests/12386",
"created_at": "2025-07-07T21:10:33.533+08:00",
"updated_at": "2025-07-07T21:10:33.583+08:00",
"merged_at": null,
"closed_at": null,
"merge_commit_sha": null,
"merge_status": "checking",
"merge_error": null,
"work_in_progress": false,
"blocking_discussions_resolved": true,
"should_remove_source_branch": null,
"force_remove_source_branch": null,
"changes_count": "7",
"merge_when_pipeline_succeeds": false,
"squash": false,
"labels": []
}
When I edit the MR on GitLab, it show this:
Query MR with GitLab API:
curl -fsSL --header "xxx" 'https://xxx/api/v4/projects/xxx/merge_requests/12386' | jq '{ should_remove_source_branch, force_remove_source_branch}'
{
"should_remove_source_branch": null,
"force_remove_source_branch": null
}
After manually check Delete source branch when merge request is accepted. and save:
curl -fsSL --header "xxx" 'https://xxx/api/v4/projects/xxx/merge_requests/12386' | jq '{ should_remove_source_branch, force_remove_source_branch}'
{
"should_remove_source_branch": null,
"force_remove_source_branch": true
}
GitLab version: 15.4
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 22
Commits related to this issue
- FEAT: format boolean issue: #142 — committed to zereight/gitlab-mcp by iwakitakuma33 a year ago
- FIX: CreateMergeRequestSchema issue: #142 — committed to zereight/gitlab-mcp by iwakitakuma33 a year ago
- FIX: format boolean for claude issue: #142 — committed to zereight/gitlab-mcp by iwakitakuma33 a year ago
- FIX: number of string for gemini issue: #142 — committed to zereight/gitlab-mcp by iwakitakuma33 a year ago
- FEAT: enable string for boolean for claude issue: #142 — committed to zereight/gitlab-mcp by iwakitakuma33 a year ago
- FEAT: enable string for boolean for claude (#150) * FEAT: enable string for boolean for claude issue: #142 * REVERT — committed to zereight/gitlab-mcp by iwakitakuma33 a year ago
@kfstorm yeeees!!! so long our trip!! thanks!