--- title: Build with AI description: Connect AI coding agents and assistants to ImageKit with skills, plugins, and MCP servers to manage media and build transformations using natural language. --- {% callout style="warning" %} **Public preview** \ ImageKit's MCP servers and agent skills are in public preview (beta). The underlying ImageKit APIs are stable and production-ready, but these AI tools are evolving and the interface may change. Test thoroughly and follow the [security recommendations](#security-recommendations). {% /callout %} Large language models were trained before the latest version of ImageKit, so on their own they often suggest outdated API signatures, invent transformation parameters, or pick the wrong approach. The tools on this page fix that. They give your AI assistant accurate, up-to-date knowledge of ImageKit and the ability to act on your account. There are three ways to use AI with ImageKit: {% table %} * What you want to do * Use this * Best for --- * Let an AI assistant work in your account, so it can upload, search, tag, organize, and purge media from natural language * [MCP servers](#mcp-servers) * Ops automation, content teams, and agentic workflows --- * Help your AI assistant integrate ImageKit and build transformations correctly as you code * [Agent skills](#install) * Developers integrating ImageKit in an IDE such as Cursor, VS Code, Windsurf, Claude Code, or Codex --- * Give any AI assistant the full ImageKit documentation in a single, plain-text file * [Plain text docs](#plain-text-docs) * Helping any AI assistant answer from the latest ImageKit docs, including ChatGPT and Claude {% /table %} If you are building in an IDE, the quickest way to get everything is to install the ImageKit skills. It adds the skills and connects both MCP servers in one step. ## Install [ImageKit skills](https://github.com/imagekit-developer/skills) are a set of instructions that teach your AI coding agent how to use ImageKit correctly. Each skill gives the agent a verified playbook for a task, such as searching the docs, building a transformation, or uploading a file, and routes it to the right tool. The result is working code instead of plausible-looking guesses. Every IDE installs the skills with the same command, `npx skills add imagekit-developer/skills --all`, which also connects both MCP servers. VS Code and Claude Code additionally offer a guided plugin or marketplace flow. Expand your tool below. {% accordion %} {% accordionitem title="VS Code Copilot" %} **Plugin (guided)** 1. Open the Command Palette (`⇧⌘P`) and run **Install Plugin from Source**. 2. Enter `imagekit-developer/skills` in the plugin source field. 3. Continue through the installation prompts. 4. Restart VS Code so the skills and MCP servers take effect. **Manual** ```bash npx skills add imagekit-developer/skills --all code --add-mcp "{\"name\":\"imagekit_public_mcp\",\"type\":\"http\",\"url\":\"https://devtools-mcp.imagekit.io/mcp\"}" code --add-mcp "{\"name\":\"imagekit_api\",\"type\":\"http\",\"url\":\"https://api-mcp.imagekit.in/mcp\"}" ``` {% /accordionitem %} {% accordionitem title="Claude Code" %} **Plugin (guided)** In Claude Code, open **Customize → Add Marketplace**, enter `imagekit-developer/skills`, then install the plugin and its connectors. **Manual** ```bash npx skills add imagekit-developer/skills --all claude mcp add --transport http imagekit_public_mcp https://devtools-mcp.imagekit.io/mcp claude mcp add --transport http imagekit_api https://api-mcp.imagekit.in/mcp ``` Restart Claude Code for the MCP servers to take effect. {% /accordionitem %} {% accordionitem title="Cursor" %} ```bash npx skills add imagekit-developer/skills --all ``` Add the MCP servers from the [skills repository](https://github.com/imagekit-developer/skills)'s install buttons, or edit `~/.cursor/mcp.json`: ```json { "mcpServers": { "imagekit_public_mcp": { "url": "https://devtools-mcp.imagekit.io/mcp" }, "imagekit_api": { "url": "https://api-mcp.imagekit.in/mcp" } } } ``` Restart Cursor for the changes to take effect. {% /accordionitem %} {% accordionitem title="Windsurf" %} ```bash npx skills add imagekit-developer/skills --all ``` Then edit `~/.codeium/windsurf/mcp_config.json`: ```json { "mcpServers": { "imagekit_public_mcp": { "url": "https://devtools-mcp.imagekit.io/mcp" }, "imagekit_api": { "url": "https://api-mcp.imagekit.in/mcp" } } } ``` Restart Windsurf for the changes to take effect. {% /accordionitem %} {% accordionitem title="Codex" %} ```bash npx skills add imagekit-developer/skills --all ``` Then edit `~/.codex/config.toml`: ```toml [mcp_servers.imagekit_public_mcp] url = "https://devtools-mcp.imagekit.io/mcp" [mcp_servers.imagekit_api] url = "https://api-mcp.imagekit.in/mcp" ``` Restart Codex for the MCP servers to take effect. {% /accordionitem %} {% /accordion %} ### What you get {% table %} * Skill * What it does --- * **mcp-preflight** * Routing guide the agent reads before any ImageKit call, so it picks the correct MCP server and tool every time. --- * **search-docs** * Teaches the agent to search official ImageKit docs, API references, SDKs, and community posts before writing code, instead of relying on stale training data. --- * **transformation-builder** * Turns natural-language requests ("resize to 800x600 and crop to the face") into correct transformation URLs, including AI edits, background removal, generative fill, upscaling, and overlays. --- * **upload-files** * Uploads local images and videos to your media library with folders, tags, and metadata using a reliable script. --- * **ai-tasks** * Applies AI-powered tagging, metadata extraction, and quality checks to images using controlled vocabularies. {% /table %} ## MCP servers The [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) is an open standard that lets AI assistants securely connect to external tools and data. ImageKit provides two hosted, remote MCP servers, so there is no local server to run or maintain. Both are connected for you when you [install the skills](#install) above, and you can also add them to any MCP client manually. ### API MCP The API MCP server lets an AI assistant manage your ImageKit media library on your behalf. It can upload and organize files and folders, edit tags and metadata, manage versions, purge cache, and configure your account. It covers all of ImageKit's public APIs, so anything you can do with the [API](/api-reference), the agent can do too. Connect to it at `https://api-mcp.imagekit.in/mcp`. On first connect, you provide your private API key through ImageKit's OAuth flow. The key is exchanged for a scoped access token and is never shared with the AI assistant or any third party. See [security recommendations](#security-recommendations) for how this works and how to scope access. ### DevTools MCP The DevTools MCP server makes any AI assistant better at ImageKit, even before you connect your account. It is public and needs no authentication, so you can connect to it at `https://devtools-mcp.imagekit.io/mcp`. It exposes two tools: - `search_docs` answers "how do I…" questions from official ImageKit docs, API references, SDK examples, and community posts, so the assistant works from real documentation instead of stale training data. - `transformation_builder` turns natural-language requests into correct transformation URLs, including AI transformations, background removal, generative fill, upscaling, smart cropping, and overlays. {% callout style="info" %} Uploading local files is best done through the `upload-files` skill rather than the MCP upload tool, because the skill reliably sends file bytes. Installing the [skills](#install) sets this up for you. {% /callout %} ## Security recommendations The API MCP server is hosted and maintained by ImageKit on secure infrastructure, and it uses OAuth so your credentials are never exposed to the AI assistant or any third party. Only the official ImageKit MCP server can use your key, and only to make the API calls you authorize. The server's permissions are bound to the API key you connect with, not to your ImageKit user account. The agent can only do what that key is allowed to do, so use a restricted key to limit which operations the assistant can perform. ### How authentication works 1. **Initial connection.** On first connect, you're redirected to ImageKit's secure OAuth consent screen. The URL starts with `https://api-mcp.imagekit.in`. 2. **Credential collection.** You provide your private API key through an encrypted form hosted on ImageKit's infrastructure. 3. **Token exchange.** ImageKit exchanges your key for an OAuth access token scoped to your MCP client. 4. **Encrypted storage.** Your key is encrypted and stored securely on ImageKit's servers. 5. **Scoped access.** The OAuth token authenticates subsequent requests, and your key is only used by ImageKit's servers on your behalf. 6. **Isolation.** Each client gets its own token, with no cross-client access. ### Best practices 1. **Use restricted API keys.** Create dedicated keys with the minimum permissions needed. 2. **Rotate keys regularly.** Change them periodically, and immediately if compromised. 3. **Review actions.** Keep a human in the loop for destructive operations such as bulk delete or cache purge. ## Plain text docs You can read any ImageKit documentation page as plain-text Markdown by adding `.md` to its URL. For example, the plain-text version of this page is at [https://imagekit.io/docs/build-with-ai.md](https://imagekit.io/docs/build-with-ai.md). You can also use the **Copy page** option at the top of any page. This helps AI tools consume our content, and it lets you paste a whole doc into an LLM. Plain text is better than scraped HTML because it contains fewer formatting tokens, includes content hidden in the default view (such as text inside a tab or accordion), and preserves a Markdown hierarchy that LLMs can parse. We also host an [`/llms.txt`](https://imagekit.io/docs/llms.txt) file, an [emerging standard](https://llmstxt.org/) that indexes every page and links to its plain-text version. For everything in one request, [`/llms-full.txt`](https://imagekit.io/docs/llms-full.txt) concatenates the entire documentation into a single file. Point any AI agent at these so it answers from the latest ImageKit documentation instead of stale training data. ## Troubleshooting If an MCP client fails to connect: - Ensure you have Node.js 18 or higher installed. - Clear the MCP auth cache: `rm -rf ~/.mcp-auth`. - Restart your MCP client application. - Check the client logs for error messages. For more help, see the [ImageKit skills repository](https://github.com/imagekit-developer/skills) or contact [ImageKit support](https://imagekit.io/contact-us).