Agents
Cursor
Add the Imagifly MCP server to Cursor.
Cursor is Anysphere's AI code editor. Its agent mode understands a codebase, edits across files and runs commands. With Imagifly connected, the agent can generate the images and videos an interface or campaign needs without leaving the editor.
- Website: cursor.com
- MCP guide: cursor.com/docs/mcp
Add the server
Create an API key and export it as
IMAGIFLY_API_KEY where Cursor launches.Create or edit
~/.cursor/mcp.json (global) or .cursor/mcp.json (project).Reload the window, then check Settings → MCP.
{
"mcpServers": {
"imagifly": {
"url": "https://imagifly.net/api/mcp",
"headers": {
"Authorization": "Bearer ${env:IMAGIFLY_API_KEY}"
}
}
}
}${env:IMAGIFLY_API_KEY} is resolved by Cursor, so the key stays out of the file.
Cursor needs the header
Cursor does not read an API key from a query string. The Authorization header is what authenticates the MCP server; a config without it connects but lists no tools.
Verify
Open Cursor Settings → MCP. The imagifly entry should show a green status and six tools. In agent mode, ask:
Generate a 1:1 icon for a weather app: soft blue gradient, white sun, no text.The agent calls generate_image and returns the URL when the task finishes.
Notes
- Project-level
.cursor/mcp.jsonis convenient for a team but must not contain the key; prefer${env:...}there too. - MCP tools appear only in agent mode, not in plain chat.