# Install — per IDE

This page shows the exact registration for every supported IDE. Every manifest below is regenerated by `npm run sync` from the SSOTs in `skills/`, `rules/`, and `.claude-plugin/`. Edit the SSOT, not the mirror.

## Prerequisites

```bash
git clone https://github.com/MohamedAbdallah-14/prompt-to-asset.git
cd prompt-to-asset
npm install
npm run build
npm run sync    # regenerates every IDE mirror
```

Optional:

```bash
# Platform fan-out and OG-image rendering use sharp (already in deps).
# Vector path uses vtracer or potrace when either is on PATH.
brew install vtracer potrace     # macOS
cargo install vtracer            # any OS with Rust
```

## Claude Code

```bash
claude mcp add prompt-to-asset -- node "$PWD/packages/mcp-server/dist/index.js"
```

Or use the plugin system:

```
/plugin marketplace add <this-repo>
/plugin install prompt-to-asset
```

Restart Claude Code. Type `/mcp` to confirm the 16 `asset_*` tools are registered.

## Cursor

`.cursor/mcp.json` is already generated. Cursor picks it up on restart. Verify under **Settings → Features → Model Context Protocol**.

```json
{
  "mcpServers": {
    "prompt-to-asset": {
      "command": "node",
      "args": ["${workspaceFolder}/packages/mcp-server/dist/index.js"]
    }
  }
}
```

## Windsurf

`.windsurf/mcp.json` is generated by `npm run sync`. Windsurf reads it automatically. Rules under `.windsurf/rules/` auto-apply.

## Cline

`.clinerules/01-prompt-to-asset.md` is generated. Cline picks it up automatically. MCP registration uses the same stdio entry as Cursor.

## Codex CLI (OpenAI)

`.codex/config.toml` is generated:

```toml
[mcp_servers.prompt-to-asset]
command = "node"
args = ["./packages/mcp-server/dist/index.js"]
```

`AGENTS.md` in the repo root drives the always-on behavior.

## Gemini CLI

`gemini-extension.json` and `GEMINI.md` are generated. Install the extension locally:

```bash
gemini extensions install ./
```

## VS Code (MCP preview)

`.vscode/mcp.json` is generated:

```json
{
  "servers": {
    "prompt-to-asset": {
      "type": "stdio",
      "command": "node",
      "args": ["${workspaceFolder}/packages/mcp-server/dist/index.js"]
    }
  }
}
```

## GitHub Copilot

Copilot does not speak MCP natively. `.github/copilot-instructions.md` + `.github/copilot-skillset.json` route the behavior through a single-skill surface instead.

## Troubleshooting

- **"0 tools found" in the IDE.** Run `npm run build` again. Confirm `packages/mcp-server/dist/index.js` exists.
- **Server crashes on start.** `node packages/mcp-server/dist/index.js doctor` surfaces missing native deps + key state.
- **`sharp` install fails on musl / Alpine.** `sharp` is in `optionalDependencies`. The server runs without it; platform fan-out and OG rendering degrade gracefully.
- **`favicon.ico` not emitted.** Install `png-to-ico` (`npm i -D png-to-ico --workspace prompt-to-asset`). The server falls back to three PNGs otherwise.
- **Vectorizer falls back to posterize.** Install `vtracer` or `potrace` on PATH for production-quality SVG output.

## Environment variables

Every key is optional. See [`.env.example`](../.env.example) for the full list and [`GETTING_STARTED.md`](../GETTING_STARTED.md) for what each enables.
