Skip to main content
Glama

gsap-mcp

MCP server for generating GSAP animation code — no runtime dependency, pure static code generation.

Installation

npm install
npm run build

Related MCP server: Ultimate GSAP Master MCP Server

Configuration

Add to your Claude Desktop config (~/.claude/claude_desktop_config.json):

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

Tools (18)

Core (4)

Tool

Description

Example Input

gsap_tween

Generate gsap.to/from/fromTo tweens

{ "target": ".box", "method": "to", "properties": { "opacity": 1, "x": 100 } }

gsap_timeline

Build multi-step GSAP timelines

{ "steps": [{ "target": ".a", "method": "to", "properties": { "x": 100 } }] }

gsap_easing

Look up and preview GSAP easing functions

{ "action": "lookup", "ease": "power2.out" }

gsap_preset

Generate common animation presets (fadeIn, slideUp, etc.)

{ "preset": "fadeIn", "target": ".hero" }

Plugins (7)

Tool

Description

Example Input

gsap_scrolltrigger

ScrollTrigger-powered scroll animations

{ "target": ".section", "mode": "standalone", "trigger": ".section" }

gsap_splittext

SplitText character/word/line animations

{ "target": ".heading", "splitType": "chars", "animation": "from" }

gsap_morphsvg

SVG shape morphing with MorphSVGPlugin

{ "target": "#shape1", "shape": "#shape2" }

gsap_drawsvg

SVG stroke drawing animations

{ "target": ".path", "from": "0%", "to": "100%" }

gsap_motionpath

Animate elements along motion paths

{ "target": ".dot", "path": "#circuit" }

gsap_flip

FLIP animation state transitions

{ "targets": ".cards", "action": "full" }

gsap_textplugin

Text replacement and scramble effects

{ "target": ".text", "text": "Hello!", "type": "replace" }

Dev (7)

Tool

Description

Example Input

gsap_analyze

Static analysis for performance, best practices, accessibility

{ "code": "gsap.to('.box', { width: 100 })" }

gsap_controls

Play/pause/reverse/seek control code

{ "action": "play", "target": "timeline" }

gsap_utilities

GSAP utility methods (clamp, mapRange, snap, etc.)

{ "method": "clamp", "params": { "min": 0, "max": 100, "value": 150 } }

gsap_matchmedia

Responsive animations with gsap.matchMedia()

{ "breakpoints": [{ "name": "Mobile", "query": "(max-width: 768px)", "animations": [] }] }

gsap_debug

Debug utilities: markers, GSDevTools, logging, slow-motion

{ "action": "slowmo", "options": { "timeScale": 0.25 } }

gsap_performance

FPS monitoring, code optimization, frame profiling

{ "action": "monitor", "options": { "metrics": ["fps"] } }

gsap_framework_integration

Framework-specific code for React/Vue/Angular/Svelte

{ "framework": "react", "type": "hook" }

Architecture

gsap-mcp/
├── src/
│   ├── index.ts                  # Entry point — registers all 18 tools
│   ├── generators/
│   │   ├── code-builder.ts       # Fluent builder for imports + body assembly
│   │   └── templates.ts          # formatGsapVars, formatPosition, wrapInFunction
│   ├── knowledge/
│   │   ├── easings.ts            # Easing function database
│   │   ├── properties.ts         # CSS/GSAP property mappings + performance data
│   │   └── best-practices.ts     # Optimization rules, performance tips, pitfalls
│   └── tools/
│       ├── core/                 # Tween, timeline, easing, presets
│       ├── plugins/              # ScrollTrigger, SplitText, MorphSVG, etc.
│       └── dev/                  # Analyze, controls, utilities, debug, etc.
├── tests/                        # Mirrors src/ structure, 23 test files
├── dist/                         # Built output (tsc)
├── package.json
└── tsconfig.json

Key design decisions:

  • No GSAP runtime dependency — the server generates code strings using static knowledge bases and template builders. It never imports or executes GSAP itself.

  • Testable core functions — every tool exports a generateXxxCode(params) function that is directly testable without MCP infrastructure.

  • MCP SDK pattern — each tool exports a registerXxxTool(server) function that calls server.registerTool() with Zod v4 input schemas.

  • CodeBuilder — fluent builder that manages imports, plugin registration, and body lines, then assembles them with build() (full) or buildSnippet() (body only).

Development

# Run all tests
npx vitest run

# Watch mode
npx vitest

# Type-check
npx tsc --noEmit

# Build
npx tsc

# Dev mode (tsx)
npx tsx src/index.ts

Adding a new tool

  1. Create src/tools/<category>/<name>.ts

  2. Export generateXxxCode(params): XxxResult (testable core logic)

  3. Export registerXxxTool(server: McpServer) (MCP registration)

  4. Add import + register call in src/index.ts

  5. Create tests/tools/<name>.test.ts

  6. Run npx tsc --noEmit && npx vitest run

License

MIT

Available Tools

18 tools
gsap_analyzeGSAP Code AnalyzerA

Audit existing GSAP animation code for performance, optimization, and accessibility issues. Use when you want to check code before delivering it — detects layout-triggering properties, GSAP v2 syntax, missing registerPlugin(), stagger risks, and missing prefers-reduced-motion handling. Returns scored issues with severity and fix suggestions. For generating new animation code use gsap_tween or gsap_timeline instead.

Inputs: code (required), checkPerformance, checkAccessibility, suggestOptimizations.

gsap_controlsGSAP Animation ControlsA

Generate playback control code for an existing tween or timeline variable (play, pause, reverse, seek, timeScale, kill, progress). Use when you need runtime control over an animation you have already created. Provide the JS variable name (e.g. tl, heroAnimation) in variableName — NOT a CSS selector. For generating the animation itself use gsap_tween or gsap_timeline instead.

Inputs: action (required), value, target, selector, +2 more.

gsap_debugGSAP Debug HelperA

Generate debugging utilities for GSAP animations during development. Modes: visualize (ScrollTrigger markers + timeline info log), gsdevtools (GSDevTools panel — requires Club GSAP membership), log (onUpdate progress/time logging), slowmo (slow down all animations via globalTimeline.timeScale), labelDump (print all timeline labels). Use only during development — remove all debug code before production.

Inputs: action (required), target, options.

gsap_drawsvgGSAP DrawSVGA

Animate SVG stroke drawing progress using DrawSVGPlugin. Use for line-drawing and reveal effects on SVG paths. For morphing between shapes use gsap_morphsvg instead.

Inputs: target (required), to, from, options, +3 more.

gsap_easingGSAP Easing ReferenceA

Look up GSAP easing functions by name or category. Returns descriptions, parameters, and preview code. Use this to explore available easings — not to generate animations (use gsap_tween or gsap_timeline for that).

Inputs: name, preview, category.

gsap_flipGSAP FlipA

Animate smooth layout transitions using GSAP Flip (capture-change-animate). Use for reordering, reparenting, or class-toggle DOM changes. For regular positional animations use gsap_tween instead.

Inputs: targets (required), action, options, stateChange, +1 more.

gsap_framework_integrationGSAP Framework IntegrationA

Generate framework-specific GSAP integration boilerplate with proper animation cleanup. Frameworks: react (hook or component — uses useLayoutEffect + gsap.context for scoped cleanup), vue (composable or component — uses onMounted/onUnmounted + gsap.context), angular (directive or component — uses ngAfterViewInit/ngOnDestroy), svelte (action or component — uses onMount/onDestroy). Always includes cleanup to prevent memory leaks on component unmount.

Inputs: framework (required), type, options, plugins, +1 more.

gsap_matchmediaGSAP MatchMediaA

Generate gsap.matchMedia() code that runs different animations per breakpoint or media query. Use when animations need to change based on screen size or prefers-reduced-motion. Each breakpoint specifies a CSS media query string (e.g. '(max-width: 768px)') and its own animations — GSAP auto-reverts them when the breakpoint stops matching. For a single animation without breakpoints use gsap_tween instead.

Inputs: breakpoints (required), includeImports.

gsap_morphsvgGSAP MorphSVGA

Morph one SVG path into another using MorphSVGPlugin. Target and endShape must be SVG path elements or path data strings. For drawing SVG strokes use gsap_drawsvg instead.

Inputs: target (required), endShape (required), ease, options, +3 more.

gsap_motionpathGSAP MotionPathA

Animate an element along an SVG path or array of points using MotionPathPlugin. Use for curved movement paths. For straight-line positional animation use gsap_tween instead.

Inputs: path (required), target (required), ease, options, +2 more.

gsap_performanceGSAP Performance ProfilerB

Generate performance measurement and optimization code for GSAP animations. Three modes: monitor (FPS counter, memory logger, or reflow detector — provide options.metrics), optimize (analyze existing code and annotate performance issues inline — requires code param), profile (measure animation creation time and per-frame render timings). Use monitor and profile during development only.

Inputs: action (required), code, options.

gsap_presetGSAP Animation PresetsA

Generate ready-to-use code for common animation patterns (fadeIn, slideUp, bounceIn, staggerReveal, parallax, etc.). Use when the animation matches a standard pattern. For custom animations with specific properties use gsap_tween instead.

Inputs: type (required), target, options, includeImports.

gsap_scrolltriggerGSAP ScrollTriggerB

Animate elements based on scroll position using ScrollTrigger. Use for scroll-driven animations (scrub), pin sections, or trigger-on-scroll effects. For scroll-independent animations use gsap_tween or gsap_timeline instead.

Inputs: trigger (required), animation (required), mode, batchOptions, +1 more.

gsap_splittextGSAP SplitTextB

Split text into chars, words, or lines then animate with stagger using SplitText. Use when animating individual characters or words. For plain text replacement use gsap_textplugin instead.

Inputs: target (required), animation (required), type, revert, +5 more.

gsap_textpluginGSAP TextPluginA

Animate text content replacement character-by-character using TextPlugin or ScrambleTextPlugin. Use type 'replace' for typewriter effect, 'scramble' for randomized scramble reveal. For animating split characters use gsap_splittext instead.

Inputs: text (required), target (required), ease, type, +3 more.

gsap_timelineGSAP Timeline CreatorA

Build a GSAP timeline with multiple sequenced or overlapping tweens, labels, and position parameters. Use when you need 2+ animations coordinated together. For a single animation use gsap_tween instead.

Inputs: animations (required), labels, settings, variableName, +1 more.

gsap_tweenGSAP Tween GeneratorA

Generate a single GSAP tween (gsap.to, gsap.from, gsap.fromTo, gsap.set). Use for one-off animations on a single target. For sequenced multi-step animations use gsap_timeline instead. For common patterns like fadeIn or slideUp use gsap_preset instead.

Inputs: method (required), target (required), properties (required), ease, +9 more.

gsap_utilitiesGSAP UtilitiesA

Generate code using GSAP utility functions for math, range mapping, and DOM helpers. Use for value interpolation, clamping, wrapping, snapping, and scoped DOM selection within animation logic. Not for generating animations — use gsap_tween or gsap_timeline for that.

Inputs: method (required), params (required), example.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 18 tools

    Disambiguation5/5

    Each tool targets a distinct GSAP feature or operation, with cross-references to guide agents away from overlapping choices. For example, gsap_tween is for single tweens, gsap_timeline for sequenced animations, and gsap_preset for standard patterns, eliminating ambiguity.

    Naming Consistency5/5

    All tools follow a uniform gsap_<noun> pattern, using snake_case. The names are descriptive and predictable, e.g., gsap_tween, gsap_timeline, gsap_scrolltrigger, gsap_preset.

    Tool Count4/5

    At 18 tools, the set is slightly above the typical range but warranted given the breadth of GSAP features (tweens, timelines, SVG, text, scroll, frameworks, debugging). Each tool serves a well-defined purpose, so the count feels justified rather than bloated.

    Completeness5/5

    The tool surface covers nearly all major GSAP capabilities: basic animations, timelines, presets, easing, scroll-driven effects, SVG manipulation, text effects, framework integration, matchMedia, performance monitoring, and debugging. No obvious gaps for typical GSAP use cases.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      A comprehensive GSAP animation generation tool that offers AI-driven intent analysis, full API coverage, and production-ready animation modes, helping developers quickly create high-performance animations.
      6
      1
      Apache 2.0
    • A
      license
      B
      quality
      D
      maintenance
      Enables AI models to generate production-ready, 60fps-optimized GSAP animation code from natural language requests. It provides expert-level tools for creating complex sequences, debugging performance issues, and setting up GSAP within modern web frameworks.
      6
      68 npm
      5
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Transforms Claude into a GSAP animation expert with AI-powered natural language animation creation, complete API coverage, and production-ready patterns for all GSAP features and plugins.
      127 npm
      125
      MIT
    • F
      license
      Not graded
      quality
      B
      maintenance
      A local/global MCP server that enables AI agents to generate GSAP v3 animation code, search documentation, validate CSS selectors, and provide best practice guidance.
      -