Provides access to Motion.dev animation library documentation (previously Framer Motion), enabling code generation and best practices for React, JavaScript, and Vue animations
Provides vanilla JavaScript Motion animation guides, code generation, and API references for browser-based animations
Generates Motion animation components and provides comprehensive documentation access for React-based animation implementations
Motion.dev MCP Server
Overview
A Model Context Protocol (MCP) server that provides AI assistants with comprehensive access to Motion.dev animation library documentation, code examples, and best practices. This server uses a SQLite-based offline documentation system, similar to n8n-mcp, enabling LLMs to generate Motion animations for React, JavaScript, and Vue with proper documentation backing.
Project Structure
Key Features
🎯 SQLite-Based Documentation System
- Offline Storage: All Motion.dev documentation stored locally in SQLite
- Full-Text Search: FTS5 search across all documentation when supported
- Fast Queries: No internet dependency after initial population
- Structured Data: Organized docs, components, and examples by framework
📥 Documentation Rebuild System
- Automated Fetching: Downloads all Motion.dev documentation
- Smart Parsing: Extracts components, examples, and API references
- Multi-Framework: React, JavaScript, and Vue documentation
- Progress Tracking: Detailed statistics and validation reporting
🎯 Documentation Access
- React Documentation: Complete Motion for React (prev Framer Motion) docs
- JavaScript Documentation: Vanilla JS Motion animation guides
- Vue Documentation: Motion for Vue components and animations
- API References: Motion values, easing, springs, and utilities
🛠️ MCP Tools
Documentation Fetching Tools
get_motion_docs
- Fetch specific documentation pages by URL or topicsearch_motion_docs
- Search across all Motion.dev documentationget_component_api
- Get API reference for specific Motion componentsget_examples_by_category
- Fetch code examples by animation typeget_framework_guide
- Get complete framework-specific guides (React/JS/Vue)
Code Generation Tools
generate_motion_component
- Generate Motion components with proper syntaxcreate_animation_sequence
- Build complex animation timelinesoptimize_motion_code
- Performance optimization suggestionsconvert_between_frameworks
- Convert animations between React/JS/Vuevalidate_motion_syntax
- Validate Motion code syntax and patterns
📚 MCP Resources
motion_react_docs
- React-specific documentation and examplesmotion_js_docs
- JavaScript documentation and vanilla implementationsmotion_vue_docs
- Vue-specific guides and componentsmotion_examples
- Curated code examples by categorymotion_best_practices
- Performance and accessibility guidelines
Technology Stack
Database System
- SQLite: Primary database using better-sqlite3 with sql.js fallback
- FTS5: Full-text search when supported, LIKE search fallback
- Schema: Structured tables for docs, components, and examples
- Caching: Intelligent caching with TTL and compression
- Migrations: Schema versioning and safe updates
MCP Protocol
- Official SDK: @modelcontextprotocol/sdk for TypeScript
- Tools: 10+ tools for documentation access and code generation
- Resources: 5 resources for framework-specific documentation
- Streaming: Efficient handling of large documentation responses
- Error Handling: Comprehensive error types and graceful fallbacks
Motion.dev Documentation Endpoints
React Documentation
Based on sitemap analysis, key endpoints include:
JavaScript Documentation
Vue Documentation
Utility Documentation
Installation & Setup
Prerequisites
- Node.js 18+
- TypeScript 5+
- Claude Code or compatible MCP client
Quick Start
Documentation Rebuild
MCP Client Configuration
Add to your Claude Code configuration:
Development Workflow
Phase 1: Core Setup
- Initialize FastMCP server structure
- Implement documentation fetcher
- Create basic MCP resources
- Set up TypeScript configuration
Phase 2: SQLite Documentation System
- Design and implement SQLite database schema
- Create database adapter with better-sqlite3/sql.js fallback
- Build Motion repository for CRUD operations
- Implement documentation fetching and parsing service
- Create rebuild script for downloading all documentation
- Add FTS5 full-text search with LIKE fallback
- Implement MCP tools for documentation access
Phase 3: Code Generation Tools
- Build Motion component generators
- Create animation sequence builders
- Implement framework conversion tools
- Add performance optimization suggestions
Phase 4: Advanced Features
- Add streaming responses for large docs
- Implement session-based user preferences
- Create interactive code examples
- Build testing and validation tools
Usage Examples
Documentation Fetching Tools
Get Specific Documentation
Search Documentation
Get Component API Reference
Get Examples by Category
Code Generation Tools
Generate Motion Component
Create Animation Sequence
Convert Between Frameworks
Resource Access Examples
Access Framework Documentation
Get Cached Examples
Contributing
Development Guidelines
- Follow existing ClaudeUI project conventions
- Use TypeScript for all source code
- Include comprehensive JSDoc comments
- Add unit tests for all tools and resources
- Update documentation with new features
Testing Strategy
- Unit tests for documentation parsers
- Integration tests for MCP protocol compliance
- End-to-end tests with Claude Code client
- Performance benchmarks for large documentation sets
Integration with ClaudeUI
This MCP server directly supports the ClaudeUI project goals:
- Visual Design Agent: Motion animation code generation
- Component Assembly Agent: Animated component composition
- Full-Stack UI Agent: Complete app animations
- Mobile-First Agent: Touch gestures and mobile animations
Resources & References
Motion.dev Resources
- Website: https://motion.dev
- Documentation: https://motion.dev/docs
- Sitemap: https://motion.dev/sitemap.xml
- GitHub: https://github.com/motiondivision/motion
MCP Resources
- FastMCP: https://github.com/punkpeye/fastmcp
- Official SDK: https://github.com/modelcontextprotocol/typescript-sdk
- MCP Framework: https://github.com/QuantGeekDev/mcp-framework
- Protocol Docs: https://modelcontextprotocol.io
Development Resources
- FreeCodeCamp Guide: How to Build a Custom MCP Server with TypeScript
- Hackteam Tutorial: Build Your First MCP Server in Under 10 Minutes
- Medium Comparison: MCP Server Frameworks Analysis
Status: ✅ Production Ready
Next Steps: Deploy to Claude Code and integrate with ClaudeUI agents
SQLite Database Architecture
Database Schema
The system uses a comprehensive SQLite schema:
Rebuild Process
- Initialize Database: Create SQLite file with schema and FTS5 tables
- Fetch Documentation: Download all React, JavaScript, and Vue docs
- Parse Content: Extract HTML, convert to Markdown, identify components
- Store Data: Save structured data with proper relationships
- Generate Examples: Create framework-specific code examples
- Build Indexes: Create FTS5 search indexes for fast queries
- Validate: Check data integrity and provide statistics
Performance Features
- Connection Pooling: Efficient database connection management
- Prepared Statements: SQL injection protection and performance
- FTS5 Search: Lightning-fast full-text search when available
- Indexed Queries: Optimized queries for common access patterns
- Batch Operations: Efficient bulk insertions during rebuild
- Error Recovery: Graceful handling of network and parsing errors
Database Operations
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Provides AI assistants with comprehensive access to Motion.dev animation library documentation and code generation tools. Enables LLMs to generate Motion animations for React, JavaScript, and Vue with proper documentation backing and framework conversion capabilities.
Related MCP Servers
- -securityFlicense-qualityProvides tools to interact with RunwayML and Luma AI APIs for video and image generation, including text-to-video, image-to-video, prompt enhancement, and management of generations.Last updated -9
- AsecurityFlicenseAqualityAI-powered animation generator that transforms static images into animated SVG components using the Model Context Protocol, allowing users to create animations through natural language prompts.Last updated -103
- AsecurityAlicenseAqualityProvides up-to-date documentation for 9000+ libraries directly in your AI code editor, enabling accurate code suggestions and eliminating outdated information.Last updated -1505113MIT License
- AsecurityFlicenseAqualityEnables AI-driven frontend component design and code generation from natural language requirements. Supports Vue, React, and Angular with intelligent component decomposition, API design, and complete project generation.Last updated -43