Skip to main content
Glama
devAndreotti

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'

ParametersJSON Schema
NameRequiredDescriptionDefault
patternYesScroll pattern to generate: parallax, infinite-scroll, snap, horizontal, webgl-sync, or scroll-triggered
frameworkNoTarget frameworkvanilla
with_gsapNoInclude GSAP for animations (recommended for most patterns)

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false. Description adds output format details (HTML, CSS, JS, comments) which align with these hints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely concise with clear sections (available patterns, args, returns, examples). No filler, every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 3 parameters with full schema coverage, annotations present, and no output schema needed (description explains returns), the description fully covers the tool's purpose and usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline 3. Description adds default values (framework: vanilla, with_gsap: true) and concrete examples mapping patterns to parameters, enhancing usability.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states it generates production-ready code for Lenis scroll patterns, listing all available patterns. Distinct from sibling tools (debug, setup, API, optimization) by focusing on pattern generation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit context for when to use (generating pattern code) with examples. Doesn't explicitly exclude cases, but sibling coverage implies alternatives exist for other needs.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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

ParametersJSON Schema
NameRequiredDescriptionDefault
symptomYesDescription of the scroll issue (e.g., 'scroll not working', 'janky on Safari', 'nested scroll broken')
frameworkNoFramework being used, if known
using_gsapNoWhether GSAP ScrollTrigger is being used

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare readOnlyHint, idempotentHint, and destructiveHint, indicating no side effects. The description adds context about being diagnostic and returning a diagnosis, which is consistent and adds moderate value beyond annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise with four clear bullet points, front-loading the purpose. Every sentence adds value, and there is no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description includes a Returns section with expected output (diagnosis with causes, fixes, code snippets) and examples. For a 3-parameter tool, this is complete and helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%. The description's Args section provides clear explanations for each parameter, including defaults and examples, adding meaning beyond the schema (e.g., 'symptom' examples like 'janky on Safari').

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('diagnoses') and clearly identifies the resource ('Lenis smooth scroll issues'). It distinguishes itself from sibling tools, which focus on creating patterns, generating setup, API reference, and optimizing performance.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description indicates when to use the tool (for diagnosing scroll issues) and provides examples. However, it does not explicitly state when not to use it or mention alternatives, though the sibling tools give implicit context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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

ParametersJSON Schema
NameRequiredDescriptionDefault
settingsNoCustom Lenis settings to include (e.g., { lerp: 0.05, duration: 1.5 })
frameworkNoTarget framework: vanilla, react, vue, or nextjsvanilla
with_gsapNoInclude GSAP ScrollTrigger integration
with_snapNoInclude lenis/snap package for scroll snapping
custom_rafNoUse custom requestAnimationFrame loop instead of autoRaf

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare the tool as read-only (readOnlyHint=true), idempotent (idempotentHint=true), and non-destructive (destructiveHint=false). The description adds that it generates code, which is consistent. It does not disclose any behavioral traits beyond what annotations already provide; however, it details the output components (install, imports, code, CSS). No contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a summary, parameter list, return description, and examples. It is not overly verbose given the number of parameters and options. However, the Args section largely duplicates the schema, which could be trimmed for slightly better conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has 5 parameters (all optional), a nested object, and no output schema. The description adequately explains the generated output content and provides examples for common use cases. It covers the complexity sufficiently, though specifying the output format (e.g., string of code with markdown) would enhance completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already fully describes each parameter. The description's Args section mostly repeats schema info (defaults, types) and adds examples. This adds some clarity but does not substantially extend beyond the schema. The 'settings' object is described similarly in both.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it generates complete Lenis setup code for a given framework, listing supported frameworks and optional integrations. This verb+resource combination is specific and distinguishes it from sibling tools like debug or pattern creation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use the tool (e.g., 'Set up Lenis with GSAP in React') and includes examples. It lacks explicit 'when not to use' statements or direct comparison to alternatives, but the provided examples and parameter combinations effectively imply correct usage scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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'

ParametersJSON Schema
NameRequiredDescriptionDefault
searchNoSearch term to filter results (e.g., 'lerp', 'scrollTo', 'wheel')
categoryNoAPI category to query: settings, properties, methods, events, or allall

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, destructiveHint=false, and idempotentHint=true, so the description's main role is to add context. It explains the return format (formatted API documentation with types, defaults, descriptions), which is valuable beyond annotations. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a clear purpose sentence, followed by parameter details, return description, and concrete examples. It is concise, front-loaded, and every sentence contributes to understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (reading documentation) and the lack of output schema, the description sufficiently covers what the tool does, its parameters, return format, and usage examples. It is complete for an agent to invoke correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters. The description adds value by restating defaults, providing usage examples (e.g., 'lerp' for search), and clarifying the purpose of each parameter in the context of API lookups.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it queries the complete Lenis API documentation, listing specific categories (settings, methods, events, properties). It distinguishes itself from sibling tools that focus on creating patterns, debugging, generation, or optimization, making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides examples and mentions filtering by category and search term, which helps the agent understand how to use the tool. However, it lacks explicit guidance on when not to use it or direct comparison to siblings, though the context of sibling names implies differentiation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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

ParametersJSON Schema
NameRequiredDescriptionDefault
target_fpsNoTarget frames per second
mobile_optimizedNoWhether to include mobile-specific optimizations
setup_descriptionYesDescription of current Lenis setup (e.g., 'React app with 50 GSAP animations and parallax')

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate readOnlyHint, idempotentHint, and destructiveHint. The description adds valuable context about the return format (prioritized list with code examples) and input examples, which exceeds the annotation coverage without contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured: a single sentence summary followed by Args, Returns, and Examples sections. Every part adds value, and the most important information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the 3 parameters with full schema coverage, annotations, and no output schema, the description fully explains the tool's behavior, inputs, and output format (prioritized list with code examples). Examples illustrate typical use cases, making it complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with descriptions for all parameters. The description adds examples for setup_description (e.g., 'React app with 50 GSAP animations') and clarifies the default values and return structure, providing extra meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it provides performance optimization recommendations for Lenis setups, with specific verb 'provides' and resource 'performance optimization recommendations'. It distinguishes from sibling tools like debugging or setup generation by focusing solely on optimization.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for performance optimization but does not explicitly state when to use this tool versus alternative sibling tools (e.g., debug vs. optimize). No when-not guidance is provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 5 tool updatesv1.0.0
    • First observedlenis_create_scroll_pattern
    • First observedlenis_debug_scroll_issue
    • First observedlenis_generate_setup
    • First observedlenis_get_api_reference
    • First observedlenis_optimize_performance

TDQS

A4.4/5.0
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 issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    C
    quality
    C
    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.
    17
    3
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP server providing 33 verified Motion for React APIs with correct imports and defaults, enabling AI assistants to generate accurate animation code.
    18
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/devAndreotti/lenis-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server