home / mcp / git workflow automation mcp server
MCP Server for automated Git workflows with GitHub CLI integration
Configuration
View docs{
"mcpServers": {
"arcia125-git-workflow-mcp-server": {
"command": "node",
"args": [
"/path/to/git-workflow-mcp-server/build/index.js"
]
}
}
}You can automate Git workflows end-to-end with an MCP server that handles commits, pushes, pull requests, and merges while managing GitHub authentication and safety checks. This makes it faster to ship features and ensures consistent commit messages and branch handling across your projects.
You interact with the MCP server through your MCP client to perform common Git operations in a single workflow. Start by committing changes, then push to the remote, create a pull request, and optionally merge the PR all in one sequence. The server handles authentication issues, clears problematic tokens when needed, and can run in a dry-run mode to preview actions before executing them.
Prerequisites: you need Node.js installed, Git configured with a remote repository, and the GitHub CLI (gh) installed and authenticated. Ensure you have proper permissions on the GitHub repository.
Installation flow and runtime start are described in the following steps. You will clone the MCP server project, install dependencies, build the server, and then wire it into your MCP client configuration. The server exposes tools for creating commits, pushing changes, creating pull requests, and merging PRs with support for conventional commits and automatic branch management.
Key features include automated Git operations, conventional commits support, automatic branch creation and switching, and comprehensive error reporting with rollback capabilities. Dry-run mode lets you preview the exact sequence of actions without making any changes. For authentication, the server clears problematic environment tokens and relies on GitHub CLI keyring authentication to maintain secure access.
Always start with a dry run to validate the sequence of operations before executing them. Use conventional commit messages like feat(ui): improve button layout or fix(api): resolve timing issue. When creating PRs, provide meaningful titles and descriptions to clearly communicate changes and testing steps.
If you encounter issues, check for repository state problems, authentication failures with GitHub CLI, and potential network issues. The server provides detailed error messages and can rollback on errors during complex sequences such as merges or force-push scenarios.
Commits staged changes and pushes to the remote repository, with optional file selection, branch switching, and a dry-run mode to preview actions.
Creates a GitHub pull request with a proper authentication flow, including title, body, and branch selection, with dry-run support.
Merges a GitHub pull request using the selected method (merge, squash, or rebase) and optional deletion of the merged branch, with dry-run support.
Executes the full sequence: commit, push, create PR, and optionally merge, with configurable base and feature branches and an optional dry-run.