Prerequisites

  • Claude Code installed (Get Claude Code)
  • Node.js 18+ installed
  • ShadowGit desktop app running with tracked repositories

Quick Setup

Install and configure ShadowGit in one command:
# Install MCP server globally
npm install -g shadowgit-mcp-server

# Add to Claude Code
claude mcp add shadowgit -- shadowgit-mcp-server

# Restart Claude Code
That’s it. Claude now has perfect memory of your code changes.

Verify Installation

Ask Claude:
Can you list my ShadowGit repositories?
Claude should respond with your tracked repositories. If not, see troubleshooting below.

What Claude can now do

Debug recent changes

Claude, what changed in my auth.ts file in the last hour?

Find when bugs appeared

Claude, when did the login function last work correctly?

Understand code evolution

Claude, show me how the payment processing evolved this week

Compare implementations

Claude, what approach worked better - yesterday's or today's refactor?

Example Commands

Claude can now execute these commands for you:
// See recent commits
await shadowgit.git({
  repo: "my-app",
  command: "log --oneline -20"
})

// Check what broke
await shadowgit.git({
  repo: "my-app",
  command: "diff HEAD~10 HEAD"
})

// Find who changed a line
await shadowgit.git({
  repo: "my-app",
  command: "blame src/api.ts"
})

// See file history
await shadowgit.git({
  repo: "my-app",
  command: "log -p -- src/components/Header.tsx"
})

Advanced Usage

Working with multiple repositories

Claude can analyze across all your projects:
Claude, check if I've solved similar authentication issues in my other projects

Time-based debugging

Claude, what was I working on yesterday between 2-4 PM?

Pattern detection

Claude, do you see any patterns in when my tests fail?

Troubleshooting

Claude doesn’t see ShadowGit

  1. Restart Claude Code after adding the MCP server
  2. Check installation:
    # Verify MCP server is installed
    npm list -g shadowgit-mcp-server
    
    # Test it works
    shadowgit-mcp-server --version
    

“No repositories found”

  1. Open ShadowGit desktop app
  2. Add at least one repository
  3. Wait for first snapshot (usually within 3 minutes)
  4. Ask Claude again

Permission errors

On macOS, you might need to grant Terminal permissions:
  1. System Preferences → Security & Privacy
  2. Privacy tab → Full Disk Access
  3. Add Terminal or your terminal app

Claude can’t execute git commands

Make sure git is installed:
git --version
If not installed, download Git.

Best Practices

1. Let ShadowGit run for a while

The more history ShadowGit captures, the smarter Claude becomes. Let it run for at least a day before expecting deep insights.

2. Be specific with time ranges

Instead of “recent changes”, say “changes in the last 2 hours” or “changes from yesterday”.

3. Use repository names

Always specify which repository when you have multiple:
Claude, in my 'frontend' repo, what changed in the last hour?

4. Combine with file context

Claude Code already reads your files. ShadowGit adds the history dimension:
Claude, looking at this error and my recent changes, what broke?

Security

  • Read-only: Claude can only read history, never modify code
  • Local only: No code leaves your machine
  • Safe commands: Only non-destructive git commands allowed

Next Steps