Skip to main content
Glama
README.md
# frameforge

MCP server for generating UI mockups using Google Gemini image generation (Imagen / Nano Banana).

Generates high-fidelity web UI mockup PNGs and returns them inline in Claude Code.

## Install

```bash
npx -y frameforge
```

## Setup

Add to `~/.claude/mcp_config.json`:

```json
{
  "mcpServers": {
    "frameforge": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "frameforge"],
      "env": {
        "GEMINI_API_KEY": "your-api-key-here"
      }
    }
  }
}
```

### Local development

```json
{
  "mcpServers": {
    "frameforge": {
      "type": "stdio",
      "command": "node",
      "args": ["/path/to/frameforge/dist/index.js"],
      "env": {
        "GEMINI_API_KEY": "your-api-key-here"
      }
    }
  }
}
```

## Tool: `generate_ui_preview`

| Param | Type | Required | Default | Description |
|-------|------|----------|---------|-------------|
| `prompt` | string | yes | — | Description of the UI to generate |
| `component_name` | string | yes | — | Name used in the output filename |
| `style_hints` | string | no | — | Style guidance (e.g. "dark mode", "mobile") |
| `aspect_ratio` | string | no | "16:9" | Aspect ratio for the image |
| `model` | string | no | "gemini-2.0-flash-exp" | Gemini model ID |
| `output_dir` | string | no | "./previews" | Directory to save PNGs |

## Example

In Claude Code:

> Generate a UI preview of a dashboard with a sidebar, header with search bar, and a grid of analytics cards showing revenue, users, and conversion metrics.

The tool returns an inline image visible directly in the terminal, and saves the PNG to `./previews/`.

## Requirements

- Node.js 18+
- `GEMINI_API_KEY` environment variable

## License

MIT

TDQS

A3.5/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool in the set, there is no possibility of confusion or misselection. The single tool's purpose (generate a UI mockup image) is unambiguous.

Naming Consistency5/5

The one tool follows a clean verb_noun snake_case pattern (generate_ui_preview). No conflicting conventions exist since there is nothing to conflict with.

Tool Count3/5

A single tool is borderline thin for a server named 'frameforge', which implies broader UI scaffolding capability. The count is not wrong for the narrow image-generation purpose, but the surface feels under-scoped.

Completeness3/5

The tool covers its stated job (produce and save a preview image) but offers no companion operations like listing saved previews, regenerating with variations, or managing saved files. Agents can work with it, but the lifecycle is truncated after generation.

Maintenance

ActivityInactive
ResponsivenessNo recent community issues