loading…
Search for a command to run...
loading…
Provides AI assistants with comprehensive access to Gluestack UI components, source code, and examples for React Native development.
Provides AI assistants with comprehensive access to Gluestack UI components, source code, and examples for React Native development.
npm version License: MIT React Native Expo
📱 The definitive MCP server for React Native development with Gluestack UI - Build universal apps with AI assistance!
This Model Context Protocol (MCP) server provides AI assistants with comprehensive access to Gluestack UI - the premier React Native-first component library that delivers true cross-platform experiences. Whether you're building for iOS, Android, or the web, this server intelligently provides components, source code, and examples optimized for React Native development workflows.
Go beyond basic styling with variants designed for different React Native use cases:
react-native-css-interopPlatform.OS checks and platform-specific codenpm install -g gluestack-ui-mcp-server
# Clone this repository
git clone https://github.com/gluestack/gluestack-ui-mcp-server
cd gluestack-ui-mcp-server
# Install dependencies
npm install
# Build the project
npm run build
# Set your Gluestack UI path
export GLUESTACK_PATH="/path/to/your/gluestack-ui"
# Test the server
npm test
Add to your Claude Desktop configuration file (~/.config/claude/config.json):
{
"mcpServers": {
"gluestack-ui": {
"command": "npx",
"args": ["gluestack-ui-mcp-server"],
"env": {
"GLUESTACK_PATH": "/path/to/your/gluestack-ui"
}
}
}
}
Or for GitHub mode:
{
"mcpServers": {
"gluestack-ui": {
"command": "npx",
"args": ["gluestack-ui-mcp-server"],
"env": {
"GITHUB_TOKEN": "ghp_your_token_here"
}
}
}
}
Add to your Claude Desktop configuration file (~/.config/claude/config.json):
{
"mcpServers": {
"gluestack-ui": {
"command": "node",
"args": ["/path/to/gluestack-ui-mcp-server/build/index.js"],
"env": {
"GLUESTACK_PATH": "/path/to/your/gluestack-ui"
}
}
}
}
Or for GitHub mode:
{
"mcpServers": {
"gluestack-ui": {
"command": "node",
"args": ["/path/to/gluestack-ui-mcp-server/build/index.js"],
"env": {
"GITHUB_TOKEN": "ghp_your_token_here"
}
}
}
}
list_componentsGet a full inventory of all 126+ available Gluestack UI components, including which variants are available for each.
list_component_variantsCompare and choose the perfect variant by getting detailed information and features for a specific component's NativeWind, Themed, and Unstyled versions.
get_directory_structureNavigate the entire gluestack-ui monorepo from your AI assistant with a powerful directory browsing tool.
get_componentRetrieve the complete, unmodified source code for any component variant, providing perfect context for code generation.
get_component_demoAccess battle-tested usage examples directly from Storybook to understand how components are meant to be used in practice.
get_component_metadataGo beyond the code to understand its API. This tool extracts TypeScript props, dependencies from import statements, and documentation from comments.
GLUESTACK_PATH: Path to local Gluestack UI installation.GITHUB_TOKEN: GitHub Personal Access Token for API access.LOG_LEVEL: Logging level (debug, info, warn, error).# Local mode
gluestack-mcp --gluestack-path /path/to/gluestack-ui --log-level debug
# GitHub mode
gluestack-mcp --github-token ghp_xxxxxxxxxxxx --log-level debug
Instead of requiring a local Gluestack UI installation, you can use GitHub mode to fetch the latest components directly from the official repository.
public_repo scopeghp_)For Claude Desktop:
{
"mcpServers": {
"gluestack-ui": {
"command": "npx",
"args": ["gluestack-ui-mcp-server"],
"env": {
"GITHUB_TOKEN": "ghp_your_token_here"
}
}
}
}
For Command Line:
export GITHUB_TOKEN="ghp_your_token_here"
gluestack-mcp
The server provides access to 126+ Gluestack UI components including:
Layout: Box, Center, HStack, VStack, Grid, Divider
Forms: Input, Textarea, Button, Checkbox, Radio, Select, Slider, Switch
Feedback: Alert, Toast, Progress, Spinner, Skeleton
Overlay: Modal, AlertDialog, Popover, Tooltip, ActionSheet
Data Display: Avatar, Badge, Card, Image, Table
Navigation: Tabs, Menu, Link
Media: Image, ImageViewer
Utilities: Portal, Pressable, SafeAreaView
The server includes comprehensive tests for both local and GitHub modes:
# Run basic tests
npm test
# Test local mode (requires GLUESTACK_PATH)
npm run test:local
# Test GitHub mode (requires GITHUB_TOKEN)
npm run test:github
# Test both modes
npm run test:both
# Test component discovery
npm run test:components
# Run comprehensive test suite
npm run test:comprehensive
For Local Mode Testing:
export GLUESTACK_PATH=/path/to/gluestack-ui
npm run test:local
For GitHub Mode Testing:
export GITHUB_TOKEN=ghp_your_token_here
npm run test:github
We welcome contributions! Please see our Contributing Guide for details.
The Gluestack UI MCP Server has been successfully implemented with all planned features and capabilities.
@modelcontextprotocol/sdk--gluestack-path, --log-level, --help)GLUESTACK_PATH, LOG_LEVEL)list_components - Lists all 70+ available componentsget_component - Retrieves component source codeget_component_demo - Gets component examples and storiesget_component_metadata - Extracts props, dependencies, exampleslist_component_variants - Shows all variants for a componentgluestack-ui-mcp-server/
├── src/
│ ├── index.ts # Entry point
│ ├── server/ # MCP server core
│ │ ├── index.ts # Server startup logic
│ │ ├── createServer.ts # Server instance creation
│ │ ├── handler.ts # Request handlers
│ │ ├── capabilities.ts # Server capabilities
│ │ └── version.ts # Version management
│ ├── tools/ # MCP tool implementations
│ │ └── components/ # Component-related tools
│ │ ├── list-components.ts
│ │ ├── get-component.ts
│ │ ├── get-component-demo.ts
│ │ ├── get-component-metadata.ts
│ │ └── list-component-variants.ts
│ ├── utils/ # Utilities and helpers
│ │ ├── component-discovery.ts # Component detection engine
│ │ └── logger.ts # Logging system
│ └── cli/ # Command-line interface
│ └── args.ts # Argument parsing
├── build/ # Compiled JavaScript
└── README.md # Complete documentation
# List all components
echo '{"method": "tools/call", "params": {"name": "list_components"}}' | npx gluestack-ui-mcp-server
# Get Button component source
echo '{"method": "tools/call", "params": {"name": "get_component", "arguments": {"componentName": "Button"}}}' | npx gluestack-ui-mcp-server
{
"mcpServers": {
"gluestack-ui": {
"command": "npx",
"args": ["gluestack-ui-mcp-server"],
"env": {
"GLUESTACK_PATH": "/path/to/gluestack-ui"
}
}
}
}
example/storybook-nativewind/src/components/ for rich examplesThe Gluestack UI MCP Server is now complete and ready for:
gluestack-ui-mcp-server)This implementation provides AI assistants with comprehensive access to the Gluestack UI ecosystem, enabling rapid development of high-quality React Native applications with modern styling and cross-platform compatibility.
MIT
Built in Melbourne with ❤️ for the Gluestack and AI development communities
Run in your terminal:
claude mcp add gluestack-ui-mcp-server -- npx Security
Low riskAutomated heuristic from public metadata — not a security guarantee.