# Image CDN for Cursor — AuraImage (https://auraimage.ai/cursor)

Install AuraImage in Cursor with .cursor/mcp.json and an .mdc rule that fires on every image file. Flat-priced Cloudinary alternative with AVIF and BlurHash built in.

## Add AuraImage to Cursor

### Project — `.cursor/mcp.json`

> Cursor documents `${env:NAME}` as the form for this field; the bare `${NAME}` is not documented as supported here, so keep the `env:` prefix. `.cursor/mcp.json` sits in the project for project-specific tools; `~/.cursor/mcp.json` sits in your home directory for tools available everywhere.

```json
{
  "mcpServers": {
    "auraimage": {
      "command": "npx",
      "args": ["-y", "@auraimage/mcp-server@latest"],
      "env": {
        "AURA_SECRET_KEY": "${env:AURA_SECRET_KEY}"
      }
    }
  }
}
```

Verified against https://cursor.com/docs/mcp on 2026-08-09.

## Optimize images with Cursor

- "@app — which images in this folder are costing me LCP?" → `audit_lcp`
- "Move every asset this file imports to AuraImage and rewrite the import paths." → `migrate_assets`
- "Add alt text to every <img> in the open file." → `generate_alt`
- "Turn the selected <img> into a responsive srcset." → `generate_responsive_tag`
- "Preview @public/product-shot.png at 16:9 for the grid." → `smart_crop_preview`

## Project conventions

`.cursor/rules/*.mdc` — Cursor rules are `.mdc` files with YAML frontmatter — a plain `.md` file in `.cursor/rules` is ignored, because it has no frontmatter to carry `description`, `globs`, and `alwaysApply`. Set `globs` to your image directories and the rule auto-attaches when a matching file is in context; set `alwaysApply: true` and it is included in every chat.

## FAQ

### Why does Cursor use ${env:AURA_SECRET_KEY} rather than ${AURA_SECRET_KEY}?

Because `${env:NAME}` is the form Cursor documents. Its MCP reference lists `env` as the server environment variables and gives `{"API_KEY": "${env:api-key}"}` as the example; the bare `${NAME}` form is not documented as supported here. Keep the `env:` prefix and `.cursor/mcp.json` holds a variable name rather than a credential.

### Can I keep the key in a .env file instead of my shell?

Cursor documents an `envFile` field alongside `env` — a path to an environment file that loads more variables, with `.env` and `${workspaceFolder}/.env` as its examples. It is available for stdio servers only, which is what this config is; for remote servers the docs send you to shell or system environment variables instead. Point it at a gitignored `.env` and the key sits in a file Git never sees. The docs do not spell out how `envFile` and the `${env:}` reference in `env` interact, so check that the server starts before you rely on it.

## Links

- All agents: https://auraimage.ai/skills
- AI integration: https://auraimage.ai/docs/ai-integration.md
- Getting started: https://auraimage.ai/docs/getting-started.md
