Image MCP + Claude Code

Add AI image generation to Anthropic's official Claude CLI

🔑 API Key Required: Get your API key from the Dashboard to start generating images. Replace YOUR_API_KEY in the configuration below.

⚡ Quick Setup

Add Image MCP to Claude Code in seconds

Terminal Command:
claude mcp add --transport http --header "Authorization: Bearer YOUR_API_KEY" image-mcp https://imagemcp.io/api/mcp
Or add to ~/.config/claude/mcp.json:
# Alternative: Manual configuration
# Add to ~/.config/claude/mcp.json

{
  "mcpServers": {
    "image-mcp": {
      "transport": "http",
      "url": "https://imagemcp.io/api/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}
One-command setup
Works in terminal workflows
API key for authentication
Integrates with Claude's capabilities
Generate images while coding
CDN-backed image delivery

Step-by-Step Guide

1

Get Your API Key

First, create an account and get your API key from the Dashboard. Each image generation costs 10 credits.

💡 New accounts receive free credits to get started.
2

Install Claude Code CLI

If you haven't already, install the Claude Code CLI. It's Anthropic's official command-line interface for Claude.

npm install -g @anthropic-ai/claude-code
💡 Requires Node.js 18 or later.
3

Add Image MCP Server

Use the claude mcp add command with your API key to register Image MCP. Replace YOUR_API_KEY with your actual key.

claude mcp add --transport http --header "Authorization: Bearer YOUR_API_KEY" image-mcp https://imagemcp.io/api/mcp
4

Verify Installation

List your configured MCP servers to confirm Image MCP is registered correctly.

claude mcp list
5

Generate Images

Start Claude Code and ask it to generate images. The generate_image tool will be available automatically.

claude chat
> Generate an image of a cosmic nebula with stars

🎨 Usage Example

Once connected, just ask Claude Code to generate images

You:

"Generate an image of a futuristic city at sunset with flying cars"

Claude Code (using Image MCP):

I'll generate that image for you using the generate_image tool...

generate_image({ prompt: "A futuristic city at sunset with flying cars, cyberpunk aesthetic, vibrant colors" })

Here's your generated image: [Image URL returned]

🔧 Troubleshooting

Tool not showing up?

Restart Claude Code after adding the configuration. MCP servers are loaded at startup.

Connection errors?

Make sure you have internet access. Image MCP is a hosted service at imagemcp.io.

Image generation fails?

Try a different model or simplify your prompt. Check our error documentation for details.

Authentication errors?

Make sure you've added your API key correctly. Get your key from the Dashboard.