Imagifly Developer docs
Agents

Claude Code

Add the Imagifly MCP server to Anthropic's terminal coding agent.

Claude Code

Claude Code is Anthropic's agentic coding tool. It reads and edits code, runs commands and completes multi-step development tasks in your terminal and IDE. With the Imagifly server connected, it can also generate images and videos while it works.

Add the server

Create an API key in the API console and put it in an environment variable.
Run the command for your shell.
Restart Claude Code or run /mcp to reconnect.

macOS / Linux:

claude mcp add --transport http imagifly https://imagifly.net/api/mcp \
  --header "Authorization: Bearer $IMAGIFLY_API_KEY"

Windows PowerShell:

claude mcp add --transport http imagifly https://imagifly.net/api/mcp `
  --header "Authorization: Bearer $env:IMAGIFLY_API_KEY"

Add --scope user to make the server available in every project:

claude mcp add --scope user --transport http imagifly https://imagifly.net/api/mcp \
  --header "Authorization: Bearer $IMAGIFLY_API_KEY"
ScopeStored inAvailable in
local (default)~/.claude.json, per projectThe current project only
project.mcp.json in the repoEveryone who opens the repo
user~/.claude.json, globalAll your projects

Project-level config

Commit .mcp.json to share the server definition. Claude Code expands ${IMAGIFLY_API_KEY} from the environment, so no secret is committed:

{
  "mcpServers": {
    "imagifly": {
      "type": "http",
      "url": "https://imagifly.net/api/mcp",
      "headers": {
        "Authorization": "Bearer ${IMAGIFLY_API_KEY}"
      }
    }
  }
}

`url` needs `type`

Claude Code only treats a url as a remote server when type is "http". A url without type is reported as a config error.

Verify

claude mcp list
claude mcp get imagifly

Inside a session, /mcp shows the connection and its tools. You should see generate_image, get_image_generation, generate_video, get_video_generation, list_image_models and list_video_models.

Try it

Generate a 16:9 image of a paper boat on a rainy windowsill, then show me the image URL.

The agent calls generate_image, polls get_image_generation until the task succeeds, and returns the URL.

On this page