Git Commit Video Walkthrough Generator

Git Commit Video Walkthrough Generator

Generates narrated video walkthroughs of git commits, staged/unstaged changes, or entire codebases with AI-powered analysis, syntax-highlighted code visualization, and text-to-speech narration.

Category
Visit Server

README

Git Commit Video Walkthrough Generator

An MCP (Model Context Protocol) server that generates narrated video walkthroughs of git commits, staged/unstaged changes, or entire codebases with AI-powered analysis and explanations.

Features

  • šŸŽ„ Automatic video generation from git commits, diffs, or codebases
  • šŸ¤– AI-powered code analysis and script generation
  • šŸ—£ļø Natural text-to-speech narration using system TTS
  • šŸŽØ Syntax-highlighted code visualization
  • šŸ“Š Multiple presentation styles (beginner, technical, overview)
  • šŸŽÆ Works with or without MCP sampling support

Installation

Prerequisites

  • FFmpeg: Required for video compilation

    • macOS: brew install ffmpeg
    • Linux: apt install ffmpeg
    • Windows: Download from ffmpeg.org
  • Node.js/Bun: For running the MCP server

    • Recommended: Bun 1.0+ (curl -fsSL https://bun.sh/install | bash)
    • Or Node.js 20+

Build from Source

# Install dependencies
bun install

# Build TypeScript
bun run build

Usage

This tool can be used in two ways, depending on whether your MCP client supports sampling:

Option 1: With MCP Sampling Support (Automatic)

If your MCP client supports the sampling capability, use the generate_walkthrough tool:

{
  "tool": "generate_walkthrough",
  "arguments": {
    "repoPath": "/path/to/repository",
    "target": {
      "type": "codebase"
    },
    "style": "technical",
    "theme": "dark",
    "outputPath": "./walkthrough.mp4"
  }
}

Target types:

  • "codebase" - Analyze entire codebase
  • "commit" - Analyze specific commit (requires commitHash)
  • "staged" - Analyze staged changes
  • "unstaged" - Analyze unstaged changes

Option 2: Without MCP Sampling Support (Manual)

If your MCP client doesn't support sampling (like Claude Code), use the two-step approach:

Step 1: Generate Analysis and Script

Ask your LLM to analyze the code:

Please analyze this codebase and provide a JSON response with the following structure:

{
  "summary": {
    "achievement": "What this codebase accomplishes",
    "approach": "How it accomplishes it"
  },
  "files": [
    {
      "path": "path/to/file.ts",
      "status": "added" | "modified" | "deleted",
      "explanation": "What this file does",
      "impact": "Why it's important"
    }
  ],
  "totalStats": {
    "additions": 0,
    "deletions": 0,
    "filesChanged": 5
  }
}

Analyze the following project: [project name/path]
Focus on: [specific files or areas to analyze]

Then ask for a script:

Based on this analysis, create a video script with the following JSON structure:

{
  "intro": "Introduction text for the video",
  "sections": [
    {
      "title": "Section title",
      "narration": "What to say in this section",
      "codeSnippet": "optional code to display",
      "duration": 5
    }
  ],
  "conclusion": "Concluding remarks",
  "estimatedDuration": 30
}

Style: technical|beginner|overview
Target audience: [describe your audience]

Analysis:
[paste the analysis JSON you received from the previous step]

Step 2: Generate Video

Call the generate_video_from_script tool with both JSONs:

{
  "tool": "generate_video_from_script",
  "arguments": {
    "analysis": { /* paste analysis JSON */ },
    "script": { /* paste script JSON */ },
    "style": "technical",
    "theme": "dark",
    "outputPath": "./walkthrough.mp4"
  }
}

See USAGE_WITHOUT_SAMPLING.md for detailed examples.

MCP Server Configuration

Add to your MCP client configuration (e.g., Claude Desktop):

{
  "mcpServers": {
    "walkthrough": {
      "command": "node",
      "args": ["/path/to/code-walkthrough-mcp/dist/src/index.js"]
    }
  }
}

Or with Bun:

{
  "mcpServers": {
    "walkthrough": {
      "command": "bun",
      "args": ["run", "/path/to/code-walkthrough-mcp/dist/src/index.js"]
    }
  }
}

Available Tools

generate_walkthrough

Requires: MCP sampling support

Fully automatic video generation from code analysis to final video.

Parameters:

  • repoPath (required): Path to git repository
  • target (required): What to analyze
    • type: "commit" | "staged" | "unstaged" | "codebase"
    • commitHash: Required if type is "commit"
  • style: "beginner" | "technical" | "overview" (default: "technical")
  • theme: "dark" | "light" | "github" (default: "dark")
  • outputPath: Where to save video (default: "./walkthrough.mp4")

generate_video_from_script

Requires: No special capabilities (works with any MCP client)

Generate video from pre-provided analysis and script.

Parameters:

  • analysis (required): Analysis JSON object
  • script (required): Script JSON object
  • style: "beginner" | "technical" | "overview" (default: "technical")
  • theme: "dark" | "light" | "github" (default: "dark")
  • outputPath: Where to save video (default: "./walkthrough.mp4")

Project Structure

.
ā”œā”€ā”€ src/
│   ā”œā”€ā”€ index.ts              # MCP server implementation
│   ā”œā”€ā”€ stages/
│   │   ā”œā”€ā”€ analysis.ts       # Code analysis via sampling
│   │   ā”œā”€ā”€ script.ts         # Script generation via sampling
│   │   └── video.ts          # Video generation pipeline
│   ā”œā”€ā”€ extractors/
│   │   ā”œā”€ā”€ commit.ts         # Extract commit info
│   │   ā”œā”€ā”€ staged.ts         # Extract staged changes
│   │   ā”œā”€ā”€ unstaged.ts       # Extract unstaged changes
│   │   └── codebase.ts       # Extract codebase info
│   ā”œā”€ā”€ types/
│   │   ā”œā”€ā”€ state.ts          # Type definitions
│   │   └── analysis.ts       # Analysis types
│   └── utils/
│       └── prompts.ts        # LLM prompts for analysis
ā”œā”€ā”€ dist/                     # Compiled JavaScript
└── video_output/             # Generated videos (default)

Development

# Watch mode (auto-rebuild on changes)
bun run watch

# Run MCP server
bun run dev

# Build TypeScript
bun run build

Architecture

This MCP server implements an inverted conversation flow using MCP's sampling capability:

  1. Client calls generate_walkthrough tool
  2. Server extracts code/commits from git
  3. Server calls back to client via sampling: "analyze this code"
  4. Client processes with LLM, returns analysis
  5. Server calls back again: "generate script from analysis"
  6. Client generates script, returns it
  7. Server creates video frames, audio, and compiles final video

For clients without sampling, the generate_video_from_script tool allows manual completion of steps 3-5.

Video Generation Pipeline

  1. Analysis: Code is analyzed to understand what it does
  2. Script: A narrated script is generated based on analysis
  3. Frames: HTML frames are created with syntax-highlighted code
  4. Screenshots: Puppeteer captures PNG screenshots of each frame
  5. Audio: Text-to-speech generates narration audio
  6. Compilation: FFmpeg combines frames and audio into MP4

Output

The generated video includes:

  • Introduction with project overview
  • Section-by-section code walkthrough
  • Syntax-highlighted code snippets
  • Professional narration
  • Conclusion summary

Example output structure:

walkthrough.mp4           # Final video
temp_frames/              # Temporary frame images (auto-deleted)
temp_audio.mp3           # Temporary audio (auto-deleted)

Troubleshooting

"Method not found -32601" Error

Your MCP client doesn't support sampling. Use the generate_video_from_script tool instead (see Option 2 above).

FFmpeg Not Found

Install FFmpeg:

  • macOS: brew install ffmpeg
  • Linux: apt install ffmpeg
  • Windows: Download from ffmpeg.org and add to PATH

No Audio in Video

The tool uses system text-to-speech. If TTS fails, video will be generated without audio (silent).

Puppeteer Issues

Puppeteer downloads Chromium automatically. If it fails:

# Reinstall dependencies
rm -rf node_modules
bun install

License

MIT

Contributing

Contributions welcome! Please ensure:

  • TypeScript code compiles without errors
  • Follow existing code style
  • Update documentation for new features

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured