Skip to main content
Glama
Tai-DT

mcp-ui-expo-tamagui

by Tai-DT
README.md
# ๐ŸŽจ MCP UI Expo Tamagui Server

[![Node.js](https://img.shields.io/badge/Node.js-18+-green.svg)](https://nodejs.org/)
[![TypeScript](https://img.shields.io/badge/TypeScript-5.0+-blue.svg)](https://www.typescriptlang.org/)
[![Docker](https://img.shields.io/badge/Docker-Ready-blue.svg)](https://docker.com/)
[![MCP](https://img.shields.io/badge/MCP-Compatible-purple.svg)](https://modelcontextprotocol.io/)

**AI-Powered UI Component Generator for Expo + Tamagui with Claude Desktop Integration**

๐Ÿš€ Automatically generate React Native/Expo components using AI Gemini through Model Context Protocol (MCP)

## โœจ Features

- ๐Ÿค– **AI Component Generation**: Create components with natural language descriptions
- ๐Ÿ“š **Real-time Docs Search**: Search Expo & Tamagui documentation
- โšก **Code Optimization**: Optimize components for performance
- ๐ŸŽจ **Theme Configuration**: Generate theme configs automatically
- ๐Ÿ’ก **Smart Suggestions**: Intelligent component recommendations
- ๐Ÿณ **Docker Ready**: Production-ready containerization
- ๐Ÿ”ง **TypeScript Support**: Full type safety

## ๐Ÿš€ Quick Start

### 1. Installation & Build

```bash
git clone https://github.com/yourusername/mcp-ui-expo-tamagui.git
cd mcp-ui-expo-tamagui
npm install
npm run build
```

### 2. Configure API Key

```bash
export GEMINI_API_KEY=your-gemini-api-key
```

### 3. Test MCP Server

```bash
./test-mcp-tools.sh
```

## ๐Ÿ”Œ Claude Desktop Integration

Add to your `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "mcp-ui-expo-tamagui": {
      "command": "node",
      "args": ["/path/to/mcp-ui-expo-tamagui/build/index.js"],
      "env": {
        "GEMINI_API_KEY": "your-gemini-api-key"
      }
    }
  }
}
```

### Usage with Claude

```
๐Ÿ’ฌ "Create a Button component with title, onPress, and variant props"
๐Ÿ’ฌ "How to implement navigation in Expo?"
๐Ÿ’ฌ "Suggest components for an e-commerce screen"
๐Ÿ’ฌ "Optimize this component for performance"
๐Ÿ’ฌ "Create dark theme with purple primary color"
```

## ๐Ÿ› ๏ธ MCP Tools

| Tool | Description | Parameters |
|------|-------------|------------|
| `generate_ui_component` | Generate UI component with AI | name, description, props, styling, platform |
| `search_expo_docs` | Search Expo documentation | query |
| `search_tamagui_docs` | Search Tamagui documentation | query |
| `get_component_suggestions` | Get component suggestions | context, requirements |
| `optimize_component` | Optimize component code | code, optimizationType |
| `create_theme_config` | Create theme configuration | colorScheme, primaryColors, components |

## ๐Ÿณ Docker Deployment

### Build & Run

```bash
# Build Docker image
docker build -t mcp-ui-expo-tamagui .

# Run with Docker Compose
docker-compose up

# Run standalone
docker run -e GEMINI_API_KEY=your-key mcp-ui-expo-tamagui
```

## ๐Ÿงช Testing

```bash
# Test MCP tools
./test-mcp-tools.sh

# Test Docker
./test-docker.sh

# TypeScript validation
npm run lint

# Jest tests
npm test
```

## ๐Ÿ“ Project Structure

```
mcp-ui-expo-tamagui/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ index.ts                    # Main MCP server
โ”‚   โ”œโ”€โ”€ types/interfaces.ts         # Type definitions
โ”‚   โ”œโ”€โ”€ services/                   # Core services
โ”‚   โ””โ”€โ”€ utils/                      # Utilities
โ”œโ”€โ”€ build/                          # Compiled output
โ”œโ”€โ”€ Dockerfile                      # Docker configuration
โ”œโ”€โ”€ docker-compose.yml             # Docker Compose
โ””โ”€โ”€ README.md                       # Documentation
```

## ๐ŸŽฏ Example Use Cases

### E-commerce Product Card
```typescript
{
  name: "ProductCard",
  description: "Product card with image, title, price, rating, add to cart",
  props: [
    { name: "product", type: "Product", required: true },
    { name: "onAddToCart", type: "function", required: true }
  ]
}
```

### Social Media Post
```typescript
{
  name: "PostCard", 
  description: "Post card with avatar, content, reactions",
  styling: { theme: "dark", responsive: true }
}
```

## ๐Ÿ”ง Development

```bash
npm run dev          # Development mode
npm run build        # Build production
npm run test         # Run tests
npm run lint         # TypeScript check
```

## ๐Ÿšจ Environment Variables

- `GEMINI_API_KEY` - Google Gemini AI API key (required)
- `NODE_ENV` - Environment (optional)
- `LOG_LEVEL` - Logging level (optional)

## ๐Ÿ“„ License

MIT License - see [LICENSE](LICENSE) file for details.

## ๐ŸŽ‰ Ready to Go!

Start creating amazing UI components with AI! ๐Ÿš€โœจ

**Happy Coding!**

TDQS

B3.4/5.0

Scored across 6 tools

Disambiguation3/5

Most tools are distinct actions (search vs optimize vs theme creation), but generate_ui_component and get_component_suggestions both target new component creation, creating potential confusion about which to use for a given task. The descriptions hint at a difference (final code vs recommendations) but are brief enough to cause misselection.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case (generate, search, get, optimize, create). The two search tools are parallel (search_expo_docs, search_tamagui_docs), and every name clearly starts with an action verb. No mixed conventions or irregularities.

Tool Count5/5

With six tools, the set is well-scoped for the server's purpose of UI development with Expo and Tamagui. Each tool addresses a specific need (generation, documentation, suggestions, optimization, theming) without redundant or excess additions. The count feels complete and not bloated.

Completeness4/5

The tool surface covers the primary lifecycle of UI component development: design/generate, get suggestions, optimize, search docs, and configure themes. Minor gaps exist, such as no explicit tool for previewing components or managing component dependencies, but these are not critical for the core workflow and can be worked around with existing tools.

Maintenance

ActivityInactive
ResponsivenessNo issues