CodeTour
CodeTour
Animados e impulsados por LLM, "explica como si tuviera cinco años" recorridos de los pull requests de GitHub.
CodeTour es un servidor MCP que se complementa con un visor local en el navegador. Claude (o cualquier LLM que maneje MCP) llama a las herramientas de CodeTour paso a paso; el visor anima el pull request — árbol de archivos, diffs, resaltados de línea pulsantes — mientras la narración se muestra como subtítulos y se dice en voz alta mediante la función de texto a voz integrada en el navegador. Cada parada enlaza de vuelta a GitHub para que los espectadores puedan profundizar en los detalles por su cuenta.
Cómo funciona
Claude ──(MCP stdio)──▶ codetour ──(WebSocket)──▶ your browser
│
└──(REST)──▶ GitHub APIEl LLM llama a
get_pr_info/get_file_diffpara leer el PR a través de CodeTour, de modo que su narración coincida exactamente con lo que se muestra.start_tourabre el visor en tu navegador y espera a que hagas clic en Iniciar (el clic también activa el audio).show_overviewy una serie de llamadas ashow_stepaniman los cambios. Cada llamada se bloquea hasta que la narración termina de hablar, por lo que el recorrido se marca su propio ritmo de forma natural.end_tourmuestra un resumen final con un enlace al PR en GitHub.
Related MCP server: Code Review MCP Server
Instalación
Requiere Python 3.11+ y uv.
git clone <this repo> && cd CodeTour
uv syncRegístralo con Claude Code en el ámbito de usuario para que las herramientas estén disponibles en todos los repositorios:
claude mcp add --scope user codetour -- uv --directory /path/to/CodeTour run codetourEntonces solo pregunta:
Dame un recorrido ejecutivo de https://github.com/owner/repo/pull/123
La habilidad codetour
El repositorio incluye una habilidad de Claude Code (skills/codetour/SKILL.md) que enseña a Claude el arte de un buen recorrido: detectar automáticamente el PR de la rama actual mediante gh, planificar de 3 a 7 paradas antes de abrir el visor, reglas de estilo de narración ELI5 y cómo recuperarse cuando se cierra el visor. Instálala enlazándola (o copiándola) en tu directorio personal de habilidades:
ln -s /path/to/CodeTour/skills/codetour ~/.claude/skills/codetourCon la habilidad instalada, un simple "recorre este PR" en cualquier repositorio hace lo correcto. Reinicia tu sesión de Claude Code después de instalar el servidor MCP o la habilidad.
Autenticación de GitHub
Los PR públicos funcionan sin autenticación (límite de tasa bajo). Para repositorios privados o un límite mayor, CodeTour usa el primero de: GITHUB_TOKEN, GH_TOKEN o el token almacenado de la CLI gh (gh auth login).
Configuración
Variable de entorno | Predeterminado | Significado |
|
| Puerto del visor (prueba hacia arriba si está ocupado) |
| sin definir | Establécelo en |
|
| Máximo de archivos modificados obtenidos por PR |
|
| Límite de diff por archivo antes de truncar |
Desarrollo
uv run pytest # unit tests
uv run ruff check . # lint
uv run codetour --demo # web viewer only, replays a canned tour on a loopEl modo demo es la forma más rápida de iterar en el frontend: no necesita ningún cliente MCP ni acceso a GitHub — abre la URL impresa, haz clic en Iniciar y mira el recorrido de muestra.
Herramientas MCP
Herramienta | Propósito |
| Metadatos del PR + rangos de líneas de los hunks por archivo (llamar primero) |
| Diff completo analizado para un archivo |
| Abre el visor y espera a Iniciar |
| Tarjeta de resumen del PR, hablada |
| Parada animada en un archivo/líneas |
| Tarjeta de cierre con enlace a GitHub |
| Diagnósticos |
Available Tools
7 toolsend_tourA
Finish the tour: shows a closing summary card with a 'View on GitHub' button and speaks the summary. Blocks until spoken.
Inputs: summary (required).
get_file_diffA
Return the full parsed diff for one changed file in the PR: every hunk with every line (kind add/del/ctx, old/new line numbers, text). Use this to read the actual code changes so your show_step narration is accurate.
Inputs: path (required), pr_url (required).
get_pr_infoA
Fetch a GitHub pull request's metadata and a compact summary of every changed file. Call this FIRST, before start_tour, so your narration matches what will be displayed.
Each file includes its diff hunk ranges: {old_start, old_end, new_start, new_end}. Those are the line numbers you pass to show_step (side="new" uses new_start/new_end). Use get_file_diff to read the actual changed lines of a specific file.
Inputs: pr_url (required).
show_overviewA
Show the PR overview card (title, author, +/- stats, file count) with your narration as a spoken caption, plus optional short bullet key_points. Blocks until the narration finishes speaking. Keep narration to 1-3 short, plain-language sentences.
Inputs: narration (required), key_points.
show_stepA
Show one tour step: selects file in the file tree, animates its diff into
view, scrolls to line_start..line_end (line numbers on the side version, as
returned by get_pr_info/get_file_diff), and pulses a highlight ("highlight") or
dims everything else ("spotlight"). The narration appears as a caption and is
spoken aloud; the call BLOCKS until speech completes, so call show_step
sequentially to pace the tour. Omit line_start/line_end to frame the whole file.
Out-of-range lines are snapped to the nearest hunk and reported in warnings.
Inputs: file (required), narration (required), side, style, +2 more.
start_tourA
Start an animated tour of the pull request. Fetches the PR, opens the viewer in the user's browser, and shows a title/start screen. Blocks up to ~30s waiting for the viewer to connect and the user to click Start (which also enables audio). Replaces any previous tour. Call get_pr_info first so you can plan your steps.
Inputs: pr_url (required), tour_title.
tour_statusA
Diagnostics: whether a tour is active, whether a browser viewer is connected, audio state, steps shown, and the viewer URL. Use this if a call timed out or you suspect the viewer window was closed.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool has a distinctly different role: fetching PR metadata, fetching file diffs, starting the tour, showing overview/step/end screens, and checking diagnostics. No two tools overlap in purpose, making selection unambiguous.
Most tools follow a clear verb_noun pattern (get_pr_info, get_file_diff, start_tour, show_overview, show_step, end_tour). 'tour_status' is the one outlier, reading as a noun phrase rather than a verb-driven action.
Seven tools is well-scoped for a PR tour workflow: two for data retrieval, four for tour progression, and one for diagnostics. Each tool serves a necessary function without redundancy.
The tool surface covers the full tour lifecycle: retrieving PR context, reading diffs, starting the tour, showing overview and steps, ending cleanly, and diagnosing state. No obvious dead ends or missing operations for the stated purpose.
Maintenance
Related MCP Connectors
Create narrated product walkthrough videos and written guides from your AI coding tool.
Make narrated, on-brand product videos of your real app from your coding agent or AI assistant.
Make AI-drawn video from chat: your LLM draws every frame in code; add narration, music and SFX.
Make narrated demo videos of web apps from your AI assistant.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceGenerates 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.-
- AlicenseBqualityDmaintenanceConnects LLMs to GitHub and GitLab to analyze pull and merge requests for logic, security, and architectural alignment. It provides tools for fetching diffs, file contents, and project metadata, alongside guided prompts for professional code reviews.10ISC
- AlicenseAqualityCmaintenanceEnables AI agents to present interactive code walkthroughs with voice narration, opening files, highlighting code, and showing inline explanations with synchronized text-to-speech.538 npmMIT
- FlicenseAqualityDmaintenanceEnables LLM clients to list, read, review, and comment on GitHub pull requests, turning an AI assistant into a fully capable code reviewer.61-