Is your feature request related to a problem? Please describe.
I've been using mcp-server-git for local development, it's freakin' awesome, great job everyone. But I don't see git_merge as a tool, I'm wondering if there is any good reason why it's not included at the moment? I can do checkout, status, commit, etc. so it seems like it would be a great thing for my local workflow.
Describe the solution you'd like
Add a git_merge tool that takes these inputs:
repo_path (string): Path to Git repository
source_branch (string): Name of branch to merge FROM. (git merge foo) if source_branch = foo
target_branch (string): Name of the branch to merge INTO (by default, the current working branch)
ff-only (boolean): Whether to require the merge to be ff-only (true by default)
squash (boolean): Whether the merge should be a squash (false by default)
Returns: Confirmation of git merge <source_branch> --ff-only command, or a message describing why the merge failed (merge conflict encountered, merge is not fast-forward when ff-only = true, source_branch does not exist), etc.
If any of these conditions are not met, or there are conflicts, the merge will be aborted with git merge --abort.
Describe alternatives you've considered
None (or just do it manually).
Additional context
For an initial implementation, due to the nuances of merging, the tool can be configured to ONLY allow ff-only from source_branch to target_branch, where target_branch is the current checked-out branch, and will fail if there are any conflicts, if the merge is not fast-forward, if target_branch is not the current branch (as revealed by git_status), etc. Basically, this will ONLY succeed if I have a local branch dev and I am on main and I can successfully run git merge dev --ff-only. I can imagine a lot of ways to enhance this tool, but this would still be a really useful addition, even in this primitive form.
Is your feature request related to a problem? Please describe.
I've been using
mcp-server-gitfor local development, it's freakin' awesome, great job everyone. But I don't seegit_mergeas a tool, I'm wondering if there is any good reason why it's not included at the moment? I can docheckout,status,commit, etc. so it seems like it would be a great thing for my local workflow.Describe the solution you'd like
Add a
git_mergetool that takes these inputs:repo_path(string): Path to Git repositorysource_branch(string): Name of branch to merge FROM. (git merge foo) ifsource_branch=footarget_branch(string): Name of the branch to merge INTO (by default, the current working branch)ff-only(boolean): Whether to require the merge to beff-only(trueby default)squash(boolean): Whether the merge should be asquash(falseby default)Returns: Confirmation of
git merge <source_branch> --ff-onlycommand, or a message describing why the merge failed (merge conflict encountered, merge is not fast-forward whenff-only = true,source_branchdoes not exist), etc.If any of these conditions are not met, or there are conflicts, the merge will be aborted with
git merge --abort.Describe alternatives you've considered
None (or just do it manually).
Additional context
For an initial implementation, due to the nuances of merging, the tool can be configured to ONLY allow
ff-onlyfromsource_branchtotarget_branch, wheretarget_branchis the current checked-out branch, and will fail if there are any conflicts, if the merge is not fast-forward, iftarget_branchis not the current branch (as revealed bygit_status), etc. Basically, this will ONLY succeed if I have a local branchdevand I am onmainand I can successfully rungit merge dev --ff-only. I can imagine a lot of ways to enhance this tool, but this would still be a really useful addition, even in this primitive form.