agy-image
Generates images through Google's internal AI image generation endpoint using an existing Google AI Pro quota and Antigravity CLI OAuth login. Provides tools to create images from prompts, select aspect ratios, save the generated image to disk, and report authentication/configuration/quota status.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@agy-imagegenerate a 16:9 image of a mountain sunrise, save as sunrise.png"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
agy-image
An MCP server that generates images using the Google AI Pro quota already logged in to the
Antigravity CLI (agy) on your machine — without spinning up the agy agent loop.
It calls the image generation endpoint directly, so a picture takes seconds instead of tens of seconds, and it works headlessly from any MCP client (Claude Code, Cursor, etc.).
⚠️ This targets an internal Google endpoint, not a public supported API. It reuses the credentials and quota of your own
agylogin. Use at your own risk.
How it works
Reads your existing login.
agystores an OAuth token at~/.gemini/jetski-standalone-oauth-token. That file'srefresh_tokenis the only thing this server needs from you — it's produced by logging into the Antigravity CLI once.Refreshes the access token when needed. To do that it needs an OAuth client (id + secret). It reads that pair out of the
agybinary installed on your machine, verifies it against Google's token endpoint, and caches the working pair at~/.cache/agy-image/credentials.json. Nothing is bundled with this package, so no single OAuth client gets shared by everyone who installs it.Calls the endpoint directly.
POST https://daily-cloudcode-pa.googleapis.com/v1internal:generateContent Authorization: Bearer <access token> Content-Type: application/json { "project": "aicode-consumers", "requestId": "image_gen/<epoch_ms>/<uuid>/1", "request": { "contents": [{ "role": "user", "parts": [{ "text": "<prompt>" }] }], "generationConfig": { "candidateCount": 1, "imageConfig": { "aspectRatio": "1:1" } } }, "model": "gemini-3.1-flash-image", "userAgent": "antigravity", "requestType": "image_gen" }Writes the image to disk. The response carries the image inline as base64, which is decoded and saved to the path you asked for.
Falls back to the agent if the direct call breaks. If the request shape ever changes underneath us, it runs
agyin print mode and lets that agent generate the image instead. Slower, but it keeps working. Disable withAGY_FALLBACK=0.
Related MCP server: MCP Image Generator
Install
{
"mcpServers": {
"agy-image": {
"command": "npx",
"args": ["-y", "agy-image"]
}
}
}No credentials or environment variables needed — they're read from your local agy install.
Requirements:
Antigravity CLI installed and logged in at least once, so
~/.gemini/jetski-standalone-oauth-tokenexists and contains arefresh_token.Node.js 18+.
Tools
Tool | Arguments |
|
|
| none — reports config, token, credential source and the last known quota reset, without spending any quota |
Configuration
All optional.
Variable | Default | Purpose |
| read from the | Override the OAuth client, e.g. if Google rotates it |
|
| Where to find the binary to extract credentials from, and to run as fallback |
|
|
|
|
| Set to |
|
| Fallback time limit, in seconds |
|
| Request host |
|
| Image model |
|
| Value of the |
|
| Request timeout, in seconds |
|
| Where the last quota info is cached |
Troubleshooting
HTTP 429 QUOTA_EXHAUSTED— the image model's quota is spent. It's separate from chat quota, and the error message includes the reset time. Fixed window, not a rolling one from your last request.HTTP 403 SUBSCRIPTION_REQUIRED— image models other thangemini-3.1-flash-imagerequire an enterprise license.HTTP 403on an otherwise valid request — a malformedrequestIdis reported this way. The server always generates it correctly; this only shows up if you craft requests by hand.Authentication error: ... token ...— theagylogin is gone. Runagyinteractively once to log in again.File is
.pngbut contains JPEG — the model returns JPEG regardless of the extension you asked for. The response says so whenever the two disagree.Prompt looks different from what you sent —
agyitself enriches prompts before calling the model; this server sends yours verbatim, so results can differ slightly from the CLI.
License
MIT
Available Tools
2 toolsantigravity_statusAntigravity StatusA
Check Antigravity image-generation configuration & auth status. Only inspects local state (token file, model, host) and makes sure the token can be refreshed — it doesn't call the image endpoint, so it doesn't use any quota. Use this when generate_image fails.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the behavioral burden and does so well: it discloses that it only inspects local state (token file, model, host), does not call the image endpoint, and therefore consumes no quota. This side-effect and cost disclosure is exactly what an agent needs. It stops short of describing what a failure vs. success result looks like, which is a minor gap given there is no output schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three tight sentences, front-loaded with the tool's purpose and immediately following with scope, cost implications, and the usage trigger. Every sentence earns its place with no filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a diagnostic tool with no parameters and no output schema, the description is nearly complete: it explains what is inspected, that no external call is made, and when to invoke it. The only omission is an indication of what the returned diagnostic information contains, which the agent would otherwise have to discover empirically.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so the parameter-semantics baseline is 4. The description adds useful framing about the internal state it inspects (token file, model, host), which orients the agent even though there is nothing to configure.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (Check) and resource (Antigravity image-generation configuration & auth status), and explicitly scopes it as a local-state inspection rather than an image operation. This cleanly separates it from the generate_image sibling, which performs the actual generation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly names the trigger condition: 'Use this when generate_image fails.' By naming the sibling and the failure scenario that selects this diagnostic tool, it gives the agent a clear routing rule with no ambiguity about when this tool applies.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate_imageGenerate ImageB
Generate an image using the logged-in Google AI Pro quota (Antigravity), by calling the image generation endpoint directly instead of running the agy agent.
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Detailed description of the image to generate. | |
| output_path | No | Destination path (e.g. "./assets/logo.png"). Empty = generated_image.<ext> in cwd. | |
| aspect_ratio | No | Image aspect ratio. One of: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9. | 1:1 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description carries the full burden. It usefully discloses that the call consumes the Google AI Pro quota and bypasses the agent, but does not cover rate limits, authentication requirements, whether an existing output file is overwritten, or failure modes.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence with the action first and the clarifying method second; no filler. It is efficient, though the trailing 'instead of running the `agy` agent' clause reads slightly as implementation trivia.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given three well-documented parameters and no output schema, the description covers the core action and quota source but omits what the tool returns and where the artifact lands (only inferable from the output_path default). Adequate but with clear gaps for a generation tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so prompt, output_path, and aspect_ratio (with its enum) are already fully documented. The description adds no syntax or format detail beyond the schema, so the baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Generate an image') and adds distinguishing scope: it uses the logged-in Google AI Pro quota and hits the image generation endpoint directly rather than via the `agy` agent. This differentiates it from the sibling antigravity_status, though it never names that sibling to make the contrast explicit.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Implies when it applies by contrasting with the agent path ('instead of running the `agy` agent'), which hints at a direct-call use case, but gives no explicit when-to-use/when-not guidance, no prerequisites for the logged-in quota, and no mention of the antigravity_status alternative.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
v0.1.0- First observed
antigravity_status - First observed
generate_image
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: generate_image performs generation while antigravity_status only inspects local configuration/auth state and uses no quota. An agent can easily tell which to call, and the description of antigravity_status even directs use after generate_image fails.
generate_image follows a clear verb_noun pattern, while antigravity_status is noun_noun naming a status resource. This is a minor, readable deviation within an otherwise consistent snake_case style.
Two tools is on the thin side for a server, though the scope (quota-backed image generation plus diagnostics) is genuinely narrow. The set just barely covers the domain without feeling under-served, landing at borderline.
The core lifecycle of generating an image and diagnosing failures is covered. Minor gaps exist — no way to inspect remaining quota or explicitly refresh/reconfigure auth beyond the status check — but these are workable around for such a focused server.
Related MCP Connectors
Focused MCP server for OpenAI image/audio generation (v2.0.0). Wraps endpoints via HAPI CLI.
Generate AI images and videos from any compatible MCP client.
MCP server for Qwen Image 3 AI image generation
MCP server for Google Veo AI video generation
Related MCP Servers
- FlicenseBqualityDmaintenanceAn MCP server that enables image generation using Google's Gemini Nano Banana Pro model via the Google AI Studio API. Users can generate and save images locally by providing text prompts through MCP-compatible clients.1-
- AlicenseAqualityDmaintenanceMCP server for AI image generation supporting multiple providers (OpenRouter, Together AI, Replicate, fal.ai) and compatible with various MCP agents.251 npm1MIT
- FlicenseNot gradedqualityDmaintenanceAn MCP server for AI-powered image processing (generate, edit, vary, analyze) supporting OpenAI, Gemini, Ideogram, and custom relay endpoints.-
- AlicenseAqualityBmaintenanceMCP server for generating images via Google Flow's API without daily quota limits, supporting text-to-image and image-to-image generation.11MIT