Skip to main content
Glama
lenis-mcp-server

lenis-mcp-server

by devAndreotti

🎯 Lenis MCP Server

MCP server that provides Lenis smooth scroll expertise to AI assistants. Knowledge-based β€” no external API calls, all documentation is embedded.

πŸ“‹ About

The Lenis MCP Server is a Model Context Protocol server that gives AI coding assistants deep knowledge about Lenis β€” the lightweight, performant smooth scroll library by darkroom.engineering.

All documentation (settings, methods, events, patterns, troubleshooting) is embedded directly in the server. When an AI assistant calls a tool, it receives structured, accurate information β€” no network requests, no API keys, zero latency.

Related MCP server: Documentation Retrieval MCP Server (DOCRET)

πŸ› οΈ Tools

Tool

Description

πŸ”§ lenis_generate_setup

Generate setup code for vanilla JS, React, Vue, Next.js (+ GSAP, snap)

πŸ“– lenis_get_api_reference

Query settings, methods, events, properties with search

πŸ› lenis_debug_scroll_issue

Diagnose scroll issues against known limitations

🎨 lenis_create_scroll_pattern

Production-ready patterns: parallax, snap, horizontal, WebGL sync

⚑ lenis_optimize_performance

Performance recommendations for your setup


πŸ—οΈ How It Works

graph LR
    A[πŸ€– AI Assistant] -->|Calls MCP tool| B[🎯 Lenis MCP Server]
    B -->|Queries| C[πŸ“š Embedded Knowledge Base]
    C -->|Returns| B
    B -->|Structured response| A
    A -->|Generates code| D[πŸ’» Your Project]

    style A fill:#6366f1,stroke:#4f46e5,color:#fff
    style B fill:#14b8a6,stroke:#0d9488,color:#fff
    style C fill:#f59e0b,stroke:#d97706,color:#fff
    style D fill:#10b981,stroke:#059669,color:#fff

πŸ“¦ Installation

Add to your MCP config (Claude Desktop, Cursor, Windsurf, etc.):

{
  "mcpServers": {
    "lenis-mcp": {
      "command": "npx",
      "args": ["-y", "lenis-mcp-server"]
    }
  }
}

From source

git clone https://github.com/devAndreotti/lenis-mcp-server.git
cd lenis-mcp-server
npm install
npm run build

Then add to your MCP config:

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

🌟 Features

Feature

Description

πŸš€ Zero Latency

All docs embedded β€” no network requests needed

🎯 Framework-Aware

Supports vanilla JS, React, Vue, and Next.js

πŸ”— GSAP Integration

Deep knowledge of ScrollTrigger integration

πŸ› Smart Debugging

Matches symptoms against known limitations

πŸ“± Mobile-Ready

Performance tips for touch & mobile optimization

🎨 Pattern Library

Parallax, snap, horizontal, WebGL sync, and more


πŸ’¬ Example Prompts

  • "Set up Lenis with GSAP ScrollTrigger in my React app"

  • "What are all the Lenis settings and their defaults?"

  • "My scroll is janky on Safari, help me fix it"

  • "Create a parallax effect with Lenis and GSAP"

  • "Optimize my Lenis setup for mobile devices"

  • "How do I handle nested scroll containers?"


πŸ“‚ Project Structure

lenis-mcp-server/
β”‚
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ index.ts              # MCP server with 5 tools
β”‚   └── knowledge/
β”‚       └── lenis-docs.ts     # Complete Lenis knowledge base
β”‚
β”œβ”€β”€ package.json
β”œβ”€β”€ tsconfig.json
β”œβ”€β”€ LICENSE
└── README.md

πŸ› Troubleshooting

Problem

Solution

Server won't start

Ensure Node.js β‰₯ 18 and run npm run build first

Tools not appearing

Check MCP config path is correct and restart your IDE

Outdated information

Open an issue or PR to update the knowledge base


πŸ’ͺ Contributing

Contributions are welcome! Follow the steps below:

  1. Fork this repository.

  2. Create a branch: git checkout -b feature/your-feature.

  3. Commit your changes: git commit -m "feat: my contribution".

  4. Push to the branch: git push origin feature/your-feature.

  5. Open a Pull Request with a summary of proposed changes.

Use Conventional Commits: feat:, fix:, docs:, style:, refactor:, test:, chore:.

πŸ“ License

This project is under the MIT license. See the LICENSE file for details.


Available Tools

5 tools
lenis_create_scroll_patternCreate Lenis Scroll PatternA
Read-onlyIdempotent

Generates production-ready code for common Lenis scroll patterns.

Available patterns: parallax, infinite-scroll, snap, horizontal scroll, WebGL sync, and scroll-triggered animations.

Args:

  • pattern ('parallax' | 'infinite-scroll' | 'snap' | 'horizontal' | 'webgl-sync' | 'scroll-triggered'): Pattern to generate

  • framework ('vanilla' | 'react' | 'vue' | 'nextjs'): Target framework (default: 'vanilla')

  • with_gsap (boolean): Include GSAP for animations (default: true)

Returns: Complete code with HTML structure, CSS, JavaScript setup, and explanatory comments.

Examples:

  • "Parallax effect with GSAP" β†’ pattern: 'parallax', with_gsap: true

  • "Horizontal scroll section" β†’ pattern: 'horizontal'

  • "Snap scrolling between sections" β†’ pattern: 'snap'

Inputs: pattern (required), framework, with_gsap.

lenis_debug_scroll_issueDebug Lenis Scroll IssueA
Read-onlyIdempotent

Diagnoses Lenis smooth scroll issues based on symptom descriptions.

Matches symptoms against known limitations, common pitfalls, and troubleshooting patterns from the official Lenis documentation.

Args:

  • symptom (string): Description of the scroll issue

  • framework (string): Framework being used, if known

  • using_gsap (boolean): Whether GSAP ScrollTrigger is being used (default: false)

Returns: Diagnosis with probable causes, step-by-step fixes, and relevant code snippets.

Examples:

  • "Scroll feels janky on Safari" β†’ symptom about Safari fps cap

  • "Nested modal scroll not working" β†’ nested scroll configuration

  • "ScrollTrigger not syncing" β†’ GSAP integration issue

Inputs: symptom (required), framework, using_gsap.

lenis_generate_setupGenerate Lenis SetupA
Read-onlyIdempotent

Generates complete Lenis smooth scroll setup code for a given framework.

Supports vanilla JS, React, Vue, and Next.js with optional GSAP ScrollTrigger integration, snap scrolling, and custom RAF loop configuration.

Args:

  • framework ('vanilla' | 'react' | 'vue' | 'nextjs'): Target framework (default: 'vanilla')

  • with_gsap (boolean): Include GSAP ScrollTrigger integration (default: false)

  • with_snap (boolean): Include lenis/snap package (default: false)

  • custom_raf (boolean): Use custom requestAnimationFrame loop (default: false)

  • settings (object): Custom Lenis settings to include

Returns: Complete setup code with installation commands, imports, initialization, CSS, and comments.

Examples:

  • "Set up Lenis with GSAP in React" β†’ framework: 'react', with_gsap: true

  • "Basic smooth scroll for vanilla JS" β†’ framework: 'vanilla'

  • "Next.js app with snap scrolling" β†’ framework: 'nextjs', with_snap: true

Inputs: settings, framework, with_gsap, with_snap, +1 more.

lenis_get_api_referenceLenis API ReferenceA
Read-onlyIdempotent

Queries the complete Lenis API documentation β€” settings, methods, events, and properties.

Supports filtering by category and search term for targeted lookups.

Args:

  • category ('settings' | 'properties' | 'methods' | 'events' | 'all'): Filter by API category (default: 'all')

  • search (string): Optional search term to filter results

Returns: Formatted API documentation with types, defaults, and descriptions.

Examples:

  • "What is the lerp setting?" β†’ category: 'settings', search: 'lerp'

  • "List all methods" β†’ category: 'methods'

  • "How do events work?" β†’ category: 'events'

Inputs: search, category.

lenis_optimize_performanceOptimize Lenis PerformanceA
Read-onlyIdempotent

Provides performance optimization recommendations for Lenis smooth scroll setups.

Analyzes the described setup and returns targeted tips for reducing jank, improving fps, and optimizing for mobile devices.

Args:

  • setup_description (string): Description of current Lenis setup

  • target_fps (number): Target frames per second (default: 60)

  • mobile_optimized (boolean): Include mobile-specific tips (default: true)

Returns: Prioritized list of optimization recommendations with code examples.

Examples:

  • "React app with 50 GSAP animations and parallax" β†’ heavy animation tips

  • "Simple landing page with smooth scroll" β†’ lightweight optimizations

  • "E-commerce site with lazy loaded images" β†’ scroll-aware loading tips

Inputs: setup_description (required), target_fps, mobile_optimized.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: pattern generation, debugging, setup code, API reference, and optimization. There is no overlap or ambiguity.

    Naming Consistency5/5

    All tools follow a consistent 'lenis_verb_noun' pattern in snake_case (e.g., lenis_create_scroll_pattern, lenis_debug_scroll_issue). The naming is predictable and uniform.

    Tool Count5/5

    With exactly 5 tools, the server is well-scoped for a focused library helper. Each tool serves a distinct purpose without redundancy or unnecessary breadth.

    Completeness4/5

    The set covers creation, debugging, setup, documentation, and optimization. Minor gap: no tool for updating or removing patterns, but core workflows are fully supported.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      B
      maintenance
      Smart MCP server that reads your code, understands file connections, and provides precise context to AI coding assistants, reducing token usage and preventing errors from outdated or irrelevant files.
      21
      713 PyPI
      3
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      A robust MCP server with tools to search, install, configure, repair, and uninstall MCP servers, automating setup and maintenance across multiple AI and developer tools.
      4
      17
      MIT