Provides examples and integration patterns for implementing GridStack.js drag-and-drop grid layouts in Angular applications
Provides custom CSS examples and styling resources for GridStack.js grid layouts and widget components
Provides component-scoped styling integration for GridStack.js widgets using CSS Modules methodology
Provides comprehensive access to GridStack.js API through MCP tools for creating dynamic drag-and-drop grid layouts and interactive widget systems
Runs as a Node.js-based MCP server providing access to GridStack.js functionality through the Model Context Protocol
Distributed and managed as an npm package with dependencies installable through npm package manager
Provides examples, hooks, and integration patterns for implementing GridStack.js drag-and-drop grid layouts in React applications
Provides comprehensive Tailwind CSS integration for styling GridStack.js grids with utility-first CSS classes and custom grid column configurations
Provides full TypeScript support with detailed schemas and type definitions for GridStack.js API interactions
Supports Yarn package manager for dependency installation and project build processes
GridStack MCP Server
A comprehensive Model Context Protocol (MCP) server for GridStack.js - the powerful drag-and-drop grid layout library. This server provides complete access to GridStack's API through MCP tools and resources, making it easy to build dynamic dashboard layouts, responsive grids, and interactive widget systems.
🚀 Features
Core GridStack Operations
- Grid Management: Initialize, destroy, enable/disable grids
- Widget Operations: Add, remove, update, move, resize widgets
- Layout Control: Compact, float mode, column management
- Responsive Design: Breakpoint configuration and responsive layouts
- Serialization: Save and load grid layouts to/from JSON
- Event Handling: Complete event system for grid interactions
Developer Experience
- 26+ Tools: Comprehensive coverage of GridStack API
- Rich Resources: Examples, templates, and documentation
- Framework Integration: React, Vue, Angular examples
- CSS Support: Tailwind CSS and CSS modules integration
- Type Safety: Full TypeScript support with detailed schemas
📦 Installation
Prerequisites
- Node.js 18+
- npm or yarn
Setup
- Clone the repository:
- Install dependencies:
- Build the project:
🏃♂️ Running the Server
Local Development
MCP Client Integration
The server runs on stdio and follows the MCP protocol. Here's how to integrate it with different MCP clients:
Claude Desktop Configuration
Add to your claude_desktop_config.json
:
Cursor/VSCode Integration
Testing the Server
Test with basic MCP commands:
🛠 Available Tools
Grid Management
Tool | Description |
---|---|
gridstack_init | Initialize new GridStack instance |
gridstack_destroy | Destroy grid instance |
gridstack_enable | Enable/disable grid interactions |
gridstack_add_grid | Create grid with options and children |
Widget Operations
Tool | Description |
---|---|
gridstack_add_widget | Add new widget to grid |
gridstack_remove_widget | Remove widget from grid |
gridstack_update_widget | Update widget properties |
gridstack_move_widget | Move widget to new position |
gridstack_resize_widget | Resize widget dimensions |
gridstack_make_widget | Convert DOM element to widget |
gridstack_remove_all | Remove all widgets |
Layout Management
Tool | Description |
---|---|
gridstack_compact | Compact grid layout |
gridstack_float | Enable/disable floating mode |
gridstack_column | Change number of columns |
gridstack_cell_height | Update cell height |
gridstack_margin | Update grid margins |
gridstack_batch_update | Batch multiple operations |
Data & State
Tool | Description |
---|---|
gridstack_save | Save layout to JSON |
gridstack_load | Load layout from JSON |
gridstack_get_grid_items | Get all grid items |
gridstack_get_margin | Get current margins |
gridstack_get_column | Get column count |
gridstack_get_float | Get float state |
Utilities
Tool | Description |
---|---|
gridstack_will_it_fit | Check if widget fits |
gridstack_is_area_empty | Check if area is empty |
gridstack_get_cell_height | Get current cell height |
gridstack_get_cell_from_pixel | Convert pixels to grid cells |
Events
Tool | Description |
---|---|
gridstack_on | Add event listener |
gridstack_off | Remove event listener |
Responsive
Tool | Description |
---|---|
gridstack_set_responsive | Configure breakpoints |
📚 Resources
The server provides several built-in resources:
gridstack://documentation/api
- Complete API documentationgridstack://examples/basic
- Basic GridStack implementationgridstack://examples/responsive
- Responsive grid examplegridstack://examples/react
- React integrationgridstack://examples/vue
- Vue integrationgridstack://templates/dashboard
- Dashboard templategridstack://css/custom
- Custom CSS examples
💡 Usage Examples
Basic Grid Initialization
Adding Widgets
Responsive Configuration
Save/Load Layout
🎨 CSS Framework Support
Tailwind CSS Integration
The server includes comprehensive Tailwind CSS support for modern, utility-first styling:
Installation
Tailwind Configuration
Tailwind GridStack Styles
Tailwind Widget Components
CSS Modules Integration
For component-scoped styling, the server supports CSS Modules:
CSS Module Example
React Component with CSS Modules
🔧 Advanced Configuration
Custom Widget Types
Event Handling
Performance Optimization
🚀 Framework Integration
React Hook
Vue Composable
📖 API Reference
Tool Parameters
Each tool accepts specific parameters. Here are the most commonly used:
Widget Configuration
Grid Options
🤝 Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- GridStack.js - The amazing grid layout library
- Model Context Protocol - The protocol this server implements
- Anthropic - For the MCP specification and Claude integration
📞 Support
Happy Grid Building! 🎯
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
Provides comprehensive access to GridStack.js functionality for building dynamic dashboard layouts and responsive drag-and-drop grid systems. Includes 26+ tools for widget management, layout control, and serialization with support for React, Vue, and modern CSS frameworks.