Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

README.md

MCP Git Enhanced Examples

This directory contains usage examples for the MCP Git Enhanced server.

Claude Code Integration

1. Build From Source

git clone https://github.com/davidweb3-ctrl/mcp-git-enhanced.git
cd mcp-git-enhanced
npm install
npm run build

2. Configure Claude Code

Add to ~/.claude/settings.json:

{
  "mcpServers": {
    "git-enhanced": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-git-enhanced/dist/index.js"]
    }
  }
}

After npm publication, the server can also be configured through npx @davidweb3-ctrl/mcp-git-enhanced.

3. Example Prompts

Once configured, you can ask Claude:

Code Review

"Show me what changed between the last two commits"
"What's the diff between main and my feature branch?"
"Review the staged changes in this repo"

Commit Analysis

"Analyze the most recent commit"
"Show me commits from last week"
"Who contributed the most code this month?"

Branch Management

"List all branches in this repo"
"Compare this branch with main"
"Which branches can be safely deleted?"

Repository Health

"What's the current status of this repository?"
"Show me all uncommitted changes"
"List files modified in the last 3 commits"

Direct Tool Usage

You can also call the tools directly via JSON-RPC:

# List available tools
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | node dist/index.js

# Get git status
echo '{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "git_status",
    "arguments": {
      "repoPath": "/path/to/repo"
    }
  }
}' | node dist/index.js

Integration with Other MCP Clients

The server implements the Model Context Protocol and can be used with any MCP-compatible client:

  • Claude Desktop
  • Claude Code
  • Custom MCP clients
  • Any tool supporting MCP stdio transport