---
title: "Generate Images in Gemini with MCP"
description: "Connect Google Gemini to the Imejis MCP server and render images from your templates: OG images, QR codes, charts and certificates. One OAuth sign-in, no keys."
url: "https://www.imejis.io/blogs/tutorials/generate-images-in-gemini-mcp"
published: "2026-10-22"
---

# Generate Images in Gemini with MCP

To generate images in Gemini with MCP, add the Imejis server (`https://api.imejis.io/api/mcp`) as a custom remote MCP connector, approve the sign-in, and ask Gemini to render a design. No API keys to paste, no switch to a separate design tool.

Gemini already writes the copy. With the Imejis connector it also renders the matching image, from the same templates and components you'd use by hand, and sends it back into the conversation.

## What you can render

Gemini talks to the same Imejis components you'd use in the editor. That's 27 component types, from text and images to QR codes, charts, and tables. The jobs that come up most:

- **OG images** for each page or post, rendered from one template
- **QR codes** that point at a campaign, a profile, or a product page
- **Charts and tables** built from real numbers, not hand-drawn
- **Certificates, tickets, and receipts** generated per record

None of these are generative art. They're structured designs, filled with your data, rendered pixel-perfect and repeatable.

## Connect Gemini

The Gemini web app connects remote MCP servers over OAuth. Open **Settings**, go to **Connected Apps**, choose **Custom apps**, and **add a new server** with the Imejis endpoint:

```text
https://api.imejis.io/api/mcp
```

Approve the Imejis sign-in when it appears. The token lives inside Gemini, scoped to your account. There's no key to store in a config file.

Custom MCP connectors in the Gemini app are rolling out under Google's availability terms (a personal Google account, and Google's current regional and age requirements). If the Custom apps option isn't available to your account yet, you can connect the same `https://api.imejis.io/api/mcp` endpoint from the [Gemini API](ref:ai.google.dev/gemini-api/docs), which accepts remote Streamable-HTTP MCP servers for apps you build. Either way the endpoint and the OAuth sign-in are the same. See Google's [MCP connector documentation](ref:support.google.com/g/answer/17106276) for the latest steps, and the [Model Context Protocol spec](ref:modelcontextprotocol) for how the handshake works.

## Design and render

Ask Gemini in plain language. Start by listing what you have:

```text
List my Imejis designs and templates with their dimensions.
```

Then build or edit a design:

```text
Start from the "Blog OG" template. Set the headline to "How MCP works"
and render it as a PNG.
```

The finished image comes back in the chat. Iterate the way you would in conversation: a darker background, a shorter headline, a different accent color. Because it's a template render, the output is deterministic: the same design and data always give you the same image.

One thing to know: a design's dimensions are fixed at creation. For a different size, ask Gemini to start from a template in that size rather than resizing an existing one. That's what keeps renders pixel-perfect.

## Troubleshooting

- **The Custom apps option is missing:** custom MCP connectors in the Gemini app are gated by Google's availability terms. Connect the endpoint from the [Gemini API](ref:ai.google.dev/gemini-api/docs) instead; the MCP server is the same.
- **The sign-in never shows:** ask Gemini to list your designs. The OAuth prompt fires on the first tool call, not when the connector is added.
- **The tools don't appear:** reload the chat after adding the connector. Remote MCP tools load when the session starts.
- **A render looks wrong:** field names must match the design's component keys. Ask Gemini to show the render fields for the design before you change them.

## Start generating

Connect once and Gemini can design and render real images without leaving the chat.

- **New to this?** The [AI Agents](/agents) page is the quick tour, with live previews and copy-paste prompts.
- **Want the full workflow?** The [Claude MCP guide](/blogs/tutorials/generate-images-claude-mcp) goes deeper on wiring renders into automation.
- **Prefer to call the API directly?** The [API docs](/apis) have tested examples in Node.js, Python, Go, and more.
- **Ready to go?** The [free tier](/pricing) is 100 renders a month, no card.
