lenis-mcp-server
Integrates with GSAP (GreenSock) for ScrollTrigger, enabling advanced scroll-driven animations such as parallax effects, timeline synchronization, and scroll-based interactions.
Provides Next.js-specific setup and configuration for Lenis smooth scroll, including server-side rendering considerations, app router compatibility, and integration with Next.js projects.
Generates setup code for React applications, handling component integration, hooks, and smooth scrolling configuration specific to React environments.
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., "@lenis-mcp-server set up Lenis with GSAP ScrollTrigger in my React app"
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.
π― 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 |
π§ | Generate setup code for vanilla JS, React, Vue, Next.js (+ GSAP, snap) |
π | Query settings, methods, events, properties with search |
π | Diagnose scroll issues against known limitations |
π¨ | Production-ready patterns: parallax, snap, horizontal, WebGL sync |
β‘ | 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
Via npx (recommended)
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 buildThen 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 |
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:
Fork this repository.
Create a branch:
git checkout -b feature/your-feature.Commit your changes:
git commit -m "feat: my contribution".Push to the branch:
git push origin feature/your-feature.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 toolslenis_create_scroll_patternCreate Lenis Scroll PatternARead-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 IssueARead-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 SetupARead-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 ReferenceARead-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 PerformanceARead-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
Scored across 5 tools
Each tool has a clearly distinct purpose: pattern generation, debugging, setup code, API reference, and optimization. There is no overlap or ambiguity.
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.
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.
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
Related MCP Connectors
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
Official Duck Framework MCP server for AI-assisted development and project scaffolding.
MCP server that lets your AI assistant build and deploy apps, hosting each one at a live URL.
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Related MCP Servers
- AlicenseBqualityDmaintenanceAn MCP server that supercharges AI assistants with powerful tools for software development, enabling research, planning, code generation, and project scaffolding through natural language interaction.1169 npm102MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI assistants to access up-to-date documentation for Python libraries like LangChain, LlamaIndex, and OpenAI through dynamic fetching from official sources.1MIT
- AlicenseBqualityBmaintenanceSmart 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.21713 PyPI3MIT
- AlicenseAqualityDmaintenanceA robust MCP server with tools to search, install, configure, repair, and uninstall MCP servers, automating setup and maintenance across multiple AI and developer tools.417MIT