MCP Scroll Animation Analyzer
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Scroll Animation Analyzer analyze scroll animations on https://example.com"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Scroll Animation Analyzer
A Model Context Protocol (MCP) server that uses Playwright to analyze scroll-triggered animations on any webpage. Unlike GSAP generation MCPs, this focuses on analyzing existing websites to extract and understand animations built with GSAP, ScrollTrigger, Lenis, and CSS.
Features
AST-based extraction - Uses Acorn for reliable JavaScript parsing (not regex)
Open any webpage in a real Chromium browser
Scroll and record - capture video and screenshots as you scroll
Extract animation code - find GSAP, ScrollTrigger, and Lenis code
Interactive analysis - click, hover, and interact while recording
Watch specific elements - track style changes on individual elements
Generate reports - JSON, Markdown, or HTML reports
Export replicable code - generate standalone code (vanilla JS, React, Vue)
CLI support - use standalone without MCP integration
Related MCP server: motionspec
Installation
1. Install dependencies
cd mcp-scroll-analyzer
npm install2. Install Playwright browsers
npx playwright install chromium3. Build the TypeScript
npm run build4. Configure Claude Code
Add the MCP server to your Claude Code configuration.
For VSCode Claude Code extension, add to your .vscode/mcp.json:
{
"mcpServers": {
"scroll-analyzer": {
"command": "node",
"args": ["C:/path/to/mcp-scroll-analyzer/dist/index.js"]
}
}
}For Claude Code CLI, add to ~/.claude/claude_desktop_config.json:
{
"mcpServers": {
"scroll-analyzer": {
"command": "node",
"args": ["C:/path/to/mcp-scroll-analyzer/dist/index.js"]
}
}
}CLI Usage
The analyzer can also be used standalone via CLI:
# Analyze a webpage
npx scroll-analyzer analyze https://example.com
# With options
npx scroll-analyzer analyze https://example.com --output ./reports --format html
# Export replicable code
npx scroll-analyzer export https://example.com --target reactCLI Commands
analyze <url> - Analyze a webpage and generate a report
Options:
-o, --output <dir> Output directory (default: ./scroll-analysis-output)
-f, --format <type> Report format: json|markdown|html (default: markdown)
--no-headless Run browser in visible mode
-w, --width <pixels> Viewport width (default: 1920)
-h, --height <pixels> Viewport height (default: 1080)
export <url> - Analyze and export replicable code
Options:
-o, --output <dir> Output directory
-t, --target <fw> Framework: vanilla|react|vue (default: vanilla)Available MCP Tools
Page Management
Tool | Description |
| Open a URL in headless browser for analysis |
| Close browser and clean up resources |
| Set where screenshots/videos/reports are saved |
Scroll & Recording
Tool | Description |
| Scroll through page, record video, capture screenshots |
| Take screenshot at current scroll position |
Animation Analysis
Tool | Description |
| Extract GSAP, ScrollTrigger, Lenis code (AST-based) |
| Deep analysis of all JS for animation patterns |
| Get all ScrollTrigger instances and configs |
| Analyze Lenis smooth scroll configuration |
| Extract CSS animations and keyframes |
Element Inspection
Tool | Description |
| Watch element for style changes during scroll |
| Get all animations affecting a specific element |
| Capture GSAP calls in real-time during scroll |
Interaction
Tool | Description |
| Click, hover, scroll to, or type on elements |
Output
Tool | Description |
| Generate JSON, Markdown, or HTML report |
| Generate standalone code (vanilla/React/Vue) |
Usage Examples
Basic Analysis Workflow
1. open_page(url: "https://example.com")
2. scroll_and_record()
3. extract_animation_code()
4. get_scroll_triggers()
5. generate_report(format: "markdown")
6. close_browser()Watch a Specific Element
1. open_page(url: "https://example.com")
2. watch_element(selector: ".hero-title", scrollThrough: true)
3. get_element_animations(selector: ".hero-title")Extract and Replicate
1. open_page(url: "https://example.com")
2. scroll_and_record()
3. extract_animation_code()
4. export_replicable_code(framework: "react")Architecture
src/
├── index.ts # MCP server entry point
├── cli.ts # CLI entry point
├── types.ts # TypeScript interfaces
├── schemas.ts # Zod validation schemas
├── extractors/
│ ├── gsap-extractor.ts # AST-based GSAP extraction
│ ├── lenis-extractor.ts # Lenis extraction
│ └── css-extractor.ts # CSS animations (CSSOM)
├── browser/
│ ├── browser-manager.ts # Playwright lifecycle
│ └── page-controller.ts # Scroll, interact, capture
├── analyzers/
│ ├── runtime-analyzer.ts # GSAP/ScrollTrigger API queries
│ └── script-analyzer.ts # Orchestrates extractors
└── reporters/
├── markdown-reporter.ts
├── html-reporter.ts
└── code-exporter.tsDevelopment
# Build
npm run build
# Watch mode
npm run dev
# Run tests
npm test
# Test coverage
npm run test:coverageHow It Differs from GSAP Generation MCPs
Feature | Generation MCPs | This Analyzer MCP |
Purpose | Create new animations | Analyze existing sites |
Input | Natural language intent | URLs/existing pages |
Output | GSAP code to use | Analysis reports, extracted code |
Browser | Not needed | Playwright for real rendering |
Use case | Building new features | Learning, debugging, reverse engineering |
Technical Details
Built with TypeScript and MCP SDK
Uses Playwright for real browser automation
AST parsing with Acorn (not regex)
Zod for input validation
Supports headless Chromium
Records video automatically
Injects tracers to capture runtime GSAP calls
Known Limitations
AST Extraction on Minified Sites
The extract_animation_code tool uses AST parsing which skips minified JavaScript by default. This is intentional because:
Minified code is slow to parse and often fails
Variable names are mangled, making extraction less useful
Workaround: Use get_scroll_triggers for runtime detection - it queries the GSAP/ScrollTrigger APIs directly and works regardless of code minification.
watch_element Style Changes
The watch_element tool may report fewer style changes than expected because browser scroll event listeners don't always fire during programmatic scrolls (window.scrollTo()). For comprehensive element tracking, combine with scroll_and_record which captures animation state at each frame.
Tested Sites
Site | ScrollTriggers Found | Notes |
gsap.com | 35 | Runtime detection works; AST returns 0 (minified) |
Custom unminified sites | Full extraction | AST + runtime both work |
License
MIT
Available Tools
16 toolsanalyze_lenisA
Analyze Lenis smooth scroll configuration and behavior.
Inputs: no named parameters.
capture_current_stateB
Capture a screenshot and animation state at the current scroll position.
Inputs: filename.
close_browserA
Close the browser and clean up resources.
Inputs: no named parameters.
deep_script_analysisC
Perform deep analysis of all JavaScript for animation patterns.
Inputs: includeMinified.
export_replicable_codeC
Generate standalone code to recreate the observed animations.
Inputs: framework, targetElement.
extract_animation_codeB
Extract GSAP, ScrollTrigger, and Lenis code using AST parsing. Much more reliable than regex.
Inputs: includeExternalScripts.
generate_reportC
Generate a comprehensive report of the scroll animation analysis.
Inputs: format.
get_animation_cssA
Extract all CSS animations and keyframes from the page stylesheets.
Inputs: no named parameters.
get_element_animationsB
Get detailed animation information for a specific element.
Inputs: selector (required).
get_scroll_triggersA
Get all ScrollTrigger instances on the page with their configurations.
Inputs: no named parameters.
interact_with_pageB
Perform interactions on the page (click, hover, scroll to element, type).
Inputs: action (required), selector (required), value, waitAfter.
open_pageA
Open a webpage in headless browser for analysis. This initializes the browser and navigates to the URL.
Inputs: url (required), viewport, waitForAnimations.
scroll_and_recordB
Scroll through the entire page while recording video and capturing scroll-triggered animations.
Inputs: stepDelay, recordVideo, scrollSpeed, captureScreenshots.
set_output_directoryB
Set the directory where analysis output will be saved.
Inputs: path (required).
trace_animation_executionC
Inject tracing to capture GSAP calls in real-time during scroll.
Inputs: scrollRange.
watch_elementC
Watch a specific element for style/transform changes during scroll.
Inputs: selector (required), duration, scrollThrough.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 16 tools
Each tool targets a distinct aspect of scroll animation analysis, from opening and interacting with the page to extracting code, monitoring elements, and exporting replicas. Some tools like extract_animation_code and deep_script_analysis have overlapping domains, but their descriptions clarify different purposes.
Most tools follow a verb_noun pattern (open_page, get_scroll_triggers, generate_report), but a few deviations like scroll_and_record (two verbs) and deep_script_analysis (noun phrase) break the convention. This is mostly consistent with minor exceptions.
With 16 tools, the server is slightly above the typical well-scoped range but each tool serves a clear purpose in the analysis workflow. No tools are redundant, though some could potentially be consolidated.
The toolset covers the full analysis lifecycle: page opening, interaction, scrolling, recording, extracting CSS/JS code, monitoring elements, tracing execution, generating reports, and exporting code. There are no obvious gaps or dead ends.
Maintenance
Related MCP Connectors
See the rendered web: design tokens, fonts, animation timings, WebGL shaders and 3D from any URL.
Turn any live website into brand colors, fonts, design tokens, SVGs, Lottie and paste-ready code.
Read any page with its JavaScript run: Markdown, screenshots, metadata, console errors, Lighthouse.
Playwright browser automation — navigate, click, fill forms, extract, screenshot — 17 agent tools.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAnalyzes website UIs using Playwright and provides precise CSS/HTML fix instructions for AI coding assistants like GitHub Copilot and Cursor.4MIT
- AlicenseAqualityBmaintenanceDeterministic motion compiler + validator for AI-generated web apps: validated MotionSpec JSON compiles to reduced-motion-safe GSAP/CSS. Reports WCAG 2.2.2 pause-path candidates; missing reduced-motion guards flagged as 2.3.3/AAA best practice. Keyless read-only MCP tools: motion_catalog + motion_validate; compile/audit/stats need a key (full toolset free locally: npx motionspec). MIT core on npm.5157 npm2MIT
- AlicenseNot gradedqualityAmaintenanceEnables an AI agent to inspect live browser scene graphs, materials, shaders, lights, textures, animation, performance and memory, preview changes without touching project code, and convert the approved ones into vanilla or React Three Fiber source. It also provides website audits, smooth video frame capture, and Playwright/Puppeteer helpers.5,202 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to inspect and modify Three.js scenes live in the browser—objects, materials, shaders, textures, animation, lights and performance—then turn those previewed changes into code. Also supports website audits, video frame capture with Playwright and Puppeteer.5,202 npmMIT