Claude Code
Add the Imagifly MCP server to Anthropic's terminal coding agent.
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.
- Website: claude.com/product/claude-code
- MCP guide: docs.claude.com/en/docs/claude-code/mcp
Add the server
/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"| Scope | Stored in | Available in |
|---|---|---|
local (default) | ~/.claude.json, per project | The current project only |
project | .mcp.json in the repo | Everyone who opens the repo |
user | ~/.claude.json, global | All 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 imagiflyInside 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.