seolcu/commit-renamer-mcp
If you are the rightful owner of commit-renamer-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
Commit Renamer MCP is a server that assists AI agents in safely modifying Git commit messages.
Commit Renamer MCP
An MCP (Model Context Protocol) server that enables AI agents to safely rename Git commit messages.
Quick Start
No local installation needed:
npx @seolcu/commit-renamer-mcp
Installation
One-Click Installation (Recommended)
Manual Installation
Claude Desktop
Edit your config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"commit-renamer": {
"command": "npx",
"args": ["-y", "@seolcu/commit-renamer-mcp"]
}
}
}
Cursor
Edit ~/.cursor/mcp_settings.json:
{
"mcpServers": {
"commit-renamer": {
"command": "npx",
"args": ["-y", "@seolcu/commit-renamer-mcp"]
}
}
}
VSCode / VSCode Insiders
Edit your settings:
- VSCode:
~/.vscode/mcp_settings.json - VSCode Insiders:
~/.vscode-insiders/mcp_settings.json
{
"mcpServers": {
"commit-renamer": {
"command": "npx",
"args": ["-y", "@seolcu/commit-renamer-mcp"],
"type": "stdio"
}
}
}
Windsurf
Edit ~/.windsurf/mcp_settings.json:
{
"mcpServers": {
"commit-renamer": {
"command": "npx",
"args": ["-y", "@seolcu/commit-renamer-mcp"]
}
}
}
Cline (VSCode Extension)
Edit VSCode settings (settings.json):
{
"cline.mcpServers": {
"commit-renamer": {
"command": "npx",
"args": ["-y", "@seolcu/commit-renamer-mcp"]
}
}
}
Gemini CLI
Add to your Gemini CLI config:
gemini mcp add commit-renamer npx -y @seolcu/commit-renamer-mcp
OpenCode
Edit ~/.opencode/mcp_settings.json:
{
"mcpServers": {
"commit-renamer": {
"command": "npx",
"args": ["-y", "@seolcu/commit-renamer-mcp"]
}
}
}
Global Installation
npm install -g @seolcu/commit-renamer-mcp
From Source
git clone https://github.com/seolcu/commit-renamer-mcp.git
cd commit-renamer-mcp
npm install
npm run build
Features
This MCP server provides the following tools:
list_commits
List recent commits in the repository.
Parameters:
count(number, optional): Number of commits to list (1-100, default: 10)cwd(string, optional): Working directory (default: current directory)
Returns:
{
"commits": [
{
"hash": "full commit hash",
"shortHash": "short hash",
"message": "commit message",
"author": "author name",
"date": "commit date"
}
]
}
get_repo_status
Check the current repository status.
Parameters:
cwd(string, optional): Working directory
Returns:
{
"branch": "current branch name",
"isClean": true,
"hasUncommittedChanges": false,
"isRebaseInProgress": false
}
preview_rename
Preview commit message changes without actually applying them.
Parameters:
commit_hash(string, required): Commit hash to rename (full or short)new_message(string, required): New commit messagecwd(string, optional): Working directory
Returns:
{
"commit": {
"hash": "commit hash",
"shortHash": "short hash",
"currentMessage": "current message",
"newMessage": "new message",
"author": "author",
"date": "date"
},
"canProceed": true,
"warnings": ["warning messages"]
}
rename_commit
Actually rename a commit message. Warning: This rewrites Git history!
Parameters:
commit_hash(string, required): Commit hash to renamenew_message(string, required): New commit messageforce(boolean, optional): Bypass safety checks (default: false)cwd(string, optional): Working directory
Returns:
{
"success": true,
"oldHash": "old hash",
"newHash": "new hash",
"newMessage": "new message",
"warnings": ["warning messages"]
}
undo_rename
Undo the last commit message change using git reflog.
Parameters:
cwd(string, optional): Working directory
Returns:
{
"success": true,
"message": "Successfully reverted to previous state using reflog"
}
Safety Features
This tool provides several safety mechanisms:
- Working Directory Check: Refuses to operate if there are uncommitted changes
- Rebase Status Check: Refuses to operate if a rebase is in progress
- Remote Push Check: By default, prevents changing commits that have been pushed to remote (can be bypassed with
force=true) - Preview Feature: See what will happen before making actual changes
- Undo Feature: Revert changes using reflog if you make a mistake
Important Warnings
Renaming commits rewrites Git history!
- Only use on branches you work on alone
- Rewriting history on shared branches can cause serious problems
- After changing pushed commits, you'll need
git push --force - Always use
preview_renamefirst to verify changes
Development
Build and Run
# Run in development mode
npm run dev
# Build
npm run build
# Start production
npm start
Quality Checks
# Run all quality checks (typecheck + lint + format + test)
npm run quality
# Individual checks
npm run typecheck # TypeScript type checking
npm run lint # ESLint checking
npm run format # Prettier formatting
npm test # Run tests
See for more details.
Quality Assurance
- TypeScript Strict Mode: Type safety guaranteed
- ESLint: Automated code quality checks
- Prettier: Consistent code style
- Vitest: 13 unit tests (100% passing)
- Production Ready: All quality checks passing
License
MIT
Contributing
Issues and PRs are always welcome! See for details.