OG filename: how-to-use-grok-imagine-in-cursor-cover-v3.png
All guides
How-to

How to Use Grok Imagine in Cursor

Cursor’s agent writes code but can’t make images. Here’s how to add xAI’s Grok Imagine to Cursor and generate backgrounds, wallpapers and illustrations straight into your project.

·3 min read·

How to Use Grok Imagine in Cursor

Cursor can build the whole app, but it can’t make the backgrounds, wallpapers or illustrations that go in it. xAI’s Grok Imagine isn’t built into Cursor either. Add AiWings as an MCP server once, and the Cursor agent can generate Grok Imagine images and save them straight into your project.

What you need

  • Cursor with Agent mode.
  • An AiWings account (sign in with Google). Usage comes from your AiWings credits.
  • About a minute.

Step 1: Add AiWings to Cursor

The fastest way is the one-click Add to Cursor button on the AiWings Cursor page. To set it up by hand, follow these steps.

  1. 1Add the config below to ~/.cursor/mcp.json (every project) or .cursor/mcp.json (this project only).
  2. 2Open Cursor Settings → MCP and click Connect next to AiWings.
  3. 3Sign in to AiWings in the browser window and allow access.
  4. 4Check that AiWings shows a green dot and its tools are listed.
{
  "mcpServers": {
    "aiwings": { "url": "https://aiwings.io/api/mcp" }
  }
}

Add to Cursor in one click

Step 2: Ask the agent for a Grok Imagine image

In Agent mode, describe the asset and name the model. The agent calls AiWings, runs Grok Imagine and shows the image in the chat before it touches any files.

Use Grok Imagine to make a 9:20 phone wallpaper of glowing jellyfish drifting in a deep blue sea, for the mobile app’s welcome screen.

Real, unedited Grok Imagine results, the kind of assets a site or app needs:

A tall phone wallpaper of a glowing bioluminescent jellyfish drifting through a deep ocean with a constellation-like pattern in its bell
Mobile welcome screen at 9:20Grok Imagine · 1K
An anime-style empty train platform at night in the rain with a glowing vending machine and a distant train light
Wide banner at 20:9Grok Imagine · 1K
A red fox asleep curled inside a hollow tree stump filled with glowing moss and fireflies in a dark forest
Feature illustrationGrok Imagine · 1K
A baroque oil painting still life with a pocket watch, a melting candle and a wine glass containing a tiny spiral galaxy
Painterly backgroundGrok Imagine · 1K

Step 3: Save it into your project

This is where Cursor shines. Ask the agent to download the image into your assets folder and wire it into the code in the same request. You review the diff like any other change.

Save that wallpaper to assets/welcome-bg.webp and use it as the background of the WelcomeScreen, with a dark overlay so the buttons stay readable.

Grok Imagine is also cheap enough to generate a whole set: ask for six backgrounds in different moods and the agent will save each one.

Grok Imagine at a glance

Grok Imagine is xAI’s image model, built for speed and style. It works the same way everywhere you add it:

ModelSizesReference imagesCost per imageBest for
Grok Imagine1KUp to 13 credits ($0.03)Backgrounds, wallpapers, wide banners

Prices are at the top-up rate of $0.01 per credit, and plans include more credits per dollar. At 3 credits ($0.03) an image it’s one of the cheapest ways to explore. To stop naming the model every time, say “make Grok Imagine my default”.

See Grok Imagine samples and pricing

Tips for app assets

  • Use 9:20 for tall mobile backgrounds and 20:9 for wide banners.
  • Name a style outright: oil painting, anime, photoreal fantasy.
  • Generate several options and let the agent compare them in the chat before saving one.
  • Mention your brand colors and the style of your existing UI so new images match the site.
  • Name files and folders in the request, and ask for WebP at the size you actually display.

If something doesn’t work

  • The agent says it can’t make them: check that AiWings is enabled in Cursor Settings → MCP and that you’re in Agent mode.
  • AiWings shows a red dot: click Connect again and finish the sign-in in your browser.
  • No tools listed: check that the URL in mcp.json is exactly https://aiwings.io/api/mcp, then restart Cursor.
  • Out of credits: top up from your AiWings dashboard, then ask the agent to try again.

Bottom line

Cursor can’t make images on its own, but with AiWings added as an MCP server, Grok Imagine becomes part of your build: generate the asset, save it and use it in your code in one request. The same server also gives Cursor GPT Image, Nano Banana, Imagen and Seedance video.

Add Grok Imagine to Cursor

FAQ

Can Cursor use Grok Imagine natively?

No. Cursor doesn’t include xAI’s Grok Imagine. You add it with AiWings, then ask for Grok Imagine by name.

What shapes can Grok Imagine make?

1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 2:1, 1:2, 19.5:9, 9:19.5, 20:9, 9:20, plus an auto option. That includes very wide 20:9 and tall 9:20 phone-wallpaper shapes.

Can Grok Imagine edit my images?

Yes, with one reference image. Give it an image and describe the new style, and it restyles it. For edits that use several references, pick a model that takes more, such as Seedream, Nano Banana or GPT Image.

Should I add it for one project or all of them?

Use ~/.cursor/mcp.json to add it to every project, or .cursor/mcp.json inside a repo to add it to that project only, for example to share the setup with your team.