# Make and edit images from Claude, ChatGPT or Cursor

> The AI Image Agent MCP server lets Claude, ChatGPT, Codex, Cursor and other assistants talk to the image agent on your account: create images, edit them and ask for variations. Same models, same credit prices and the same refunds as the website.

Server URL (Streamable HTTP): `https://aiimageagent.net/mcp`

## Add it to your client

### Claude

In claude.ai or Claude Desktop open Settings → Connectors → Add custom connector, name it AI Image Agent and paste the URL. Press Connect and approve access.

```
https://aiimageagent.net/mcp
```

### Claude Code

Run this in a terminal, then type /mcp inside Claude Code and pick the server to sign in.

```
claude mcp add --transport http ai-image-agent https://aiimageagent.net/mcp
```

### ChatGPT

In ChatGPT open Settings → Apps & Connectors → Advanced and turn on developer mode, then Create a connector with this URL and OAuth authentication.

```
https://aiimageagent.net/mcp
```

### Codex

Add the block to ~/.codex/config.toml, then run codex mcp login ai-image-agent to sign in.

```
[mcp_servers.ai-image-agent]
url = "https://aiimageagent.net/mcp"
```

### Cursor

Add the server to ~/.cursor/mcp.json (or Settings → MCP → Add new server). Cursor shows a Login button for it.

```
{
  "mcpServers": {
    "ai-image-agent": {
      "url": "https://aiimageagent.net/mcp"
    }
  }
}
```

### VS Code

Save as .vscode/mcp.json in your workspace (or run MCP: Add Server). VS Code asks you to sign in on the first tool call.

```
{
  "servers": {
    "ai-image-agent": {
      "type": "http",
      "url": "https://aiimageagent.net/mcp"
    }
  }
}
```

### Windsurf

Add it to ~/.codeium/windsurf/mcp_config.json and refresh the MCP panel in Cascade.

```
{
  "mcpServers": {
    "ai-image-agent": {
      "serverUrl": "https://aiimageagent.net/mcp"
    }
  }
}
```

Your browser opens AI Image Agent: sign in (or create a free account) and press Allow access. No password or API key is shared with the assistant.

## How sign-in works

1. Your client calls the server and receives a 401 that points to our OAuth metadata.
2. It registers itself (Client ID Metadata Document or dynamic registration) and opens a PKCE sign-in page.
3. You sign in on AI Image Agent and approve that one app on the consent screen.
4. The client gets a token for https://aiimageagent.net/mcp only, refreshed automatically and revocable at any time.

## Use an API key from scripts

Scripts and headless agents can send an API key from Settings → API keys as a bearer header instead of OAuth. API keys come with the Studio plan.

## Tools

- `list_models`: Every image model with its credits per resolution.
- `send_message`: Send one message to the image agent; it creates an image, edits the current one or just replies. Images from 3 credits; replies are free.
- `get_conversation`: A conversation's messages and every image version in it.
- `get_task`: Status and download link for one image.
- `list_tasks`: Your latest images, filterable by status.
- `get_credits`: Remaining balance, plan and resolution limit.

Credits are taken only when an image starts and come back automatically if it fails. Replies without an image are free. Prices match the pricing page.

## Troubleshooting

- Stuck on 'needs authentication': remove the server and add it again so the client restarts OAuth.
- 'Not enough credits': check get_credits, then top up on the pricing page. Nothing was charged.
- Image still 'processing': ask the assistant to call get_task again in a moment.
- 403 with an API key: API keys come with Studio. Use OAuth or upgrade.

## Questions and fixes

### Does the MCP server cost extra?

No. Connecting is free on every plan; you only spend the credits each image costs, exactly as on the website. The free credits you got at sign-up work here too.

### Which models can my assistant use?

The same image models as the website: Nano Banana 2.1, Nano Banana Pro and GPT Image 2. Ask it to call list_models for live prices.

### What happens if an image fails or my balance is too low?

Credits are taken only when an image starts and come back automatically if it fails. If your balance is too low, the tool says so and nothing is charged; top up on the pricing page and ask again.

### Can it keep editing an image I already made?

Yes. Pass session_id to send_message to continue a conversation, and base_task_id to edit a specific earlier version. get_conversation lists the versions.

### My client keeps asking me to sign in. What do I do?

Remove the server from the client and add it again so it starts a fresh sign-in. If you use an API key and get a 403, that plan has no API access: switch to OAuth or upgrade.

### Where do finished images go?

They are saved to My images like any image made on the website, and the assistant gets direct links once they are done.


---

Source: https://aiimageagent.net/mcp-server · Site index for AI agents: https://aiimageagent.net/llms.txt · Full content: https://aiimageagent.net/llms-full.txt
