# ImageKit MCP

> ImageKit (Media Optimization & DAM) connects your AI client directly to ImageKit, giving you full control over cloud-native media management and real-time image optimization. You can list all visual assets, audit EXIF data like focal length and ISO, purge CDN caches with precise URLs, or update custom metadata fields in bulk.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** media-optimization, cdn, image-processing, asset-management, real-time-transformation

## Description

When you connect your AI agent to this MCP, it gives you a natural conversation layer over complex media infrastructure. Instead of jumping through multiple developer consoles to manage image assets, you simply ask the question. You can list every file uploaded to your vault and retrieve deep details, including EXIF data or custom tags. Need fresh images? Tell your agent to purge specific URLs across the global CDN network. It handles that request instantly and monitors the status for you. Furthermore, you gain control over metadata, allowing you to patch asset tags or create new fields to map business-specific variables directly onto your assets. This whole process is managed through a single connection point on Vinkius, letting your agent handle everything from auditing file properties to irreversibly deleting old files.

## Tools

### create_custom_schema
Creates new, structured metadata fields on your assets for tracking specific project data points.

### wipe_batch_assets
Deletes multiple specified media files in a batch process to clean up storage space.

### wipe_media_asset
Irreversibly deletes a single, specific asset from the system.

### get_file_details
Retrieves detailed information about any given file ID, including its full path and status.

### get_exif_metadata
Extracts technical camera data from an image, such as the dimensions or focal length used when it was shot.

### get_purge_status
Checks if a CDN cache purge request has successfully completed across the network.

### list_custom_fields
Displays all the custom metadata fields currently defined for your assets, helping you see what data is tracked.

### list_media_files
Lists every visual asset available in your ImageKit vault to give you a complete inventory count.

### purge_cdn_cache
Forcibly removes cached versions of assets at specified URLs, making sure users see the most recent content immediately.

### patch_file_details
Modifies existing metadata tags or attributes for a file without changing the image itself.

## Prompt Examples

**Prompt:** 
```
List the last 10 images uploaded to my ImageKit vault
```

**Response:** 
```
I've retrieved the 10 most recent assets. Highlights include 'banner_hero.jpg', 'product_01_alt.webp', and 'logo_transparent.png'. Would you like to see the detailed metadata or tags for any of these?
```

**Prompt:** 
```
Purge the cache for this URL: https://ik.imagekit.io/myproject/header.jpg
```

**Response:** 
```
Cache purge request sent successfully. Request ID: 'pur_98765'. The Edge CDN nodes will be invalidated shortly. I can check the purge status for you in a few minutes.
```

**Prompt:** 
```
Show me the focal length and dimensions for file ID 'file_12345'
```

**Response:** 
```
EXIF metadata for file_12345: Dimensions: 4032x3024, Focal Length: 26mm, ISO: 100, Aperture: f/1.8. It was captured on an iPhone 13 Pro. Would you like to add an 'Apple' tag to this asset?
```

## Capabilities

### List and audit visual assets
The MCP lists all uploaded media files and retrieves structural data like EXIF metadata or AI-generated tags.

### Purge content delivery networks (CDN)
You can trigger cache invalidation for specific URLs across the global edge network to ensure users see the latest version of an image.

### Update and structure metadata
The MCP allows you to update tags or create custom data fields on assets in bulk, keeping your digital asset management system organized.

### Retrieve file properties
You can pull specific structural details from an image, like its ISO rating or focal length.

### Remove files permanently
The MCP executes irreversible deletion of assets to optimize cloud storage and clean up old media libraries.

## Use Cases

### Fixing stale hero images after a site redesign
The marketing team updated the main banner image but noticed some users saw the old version. They ask their agent to `purge_cdn_cache` for the specific URL, and the agent confirms the invalidation status using `get_purge_status`. The problem is solved in seconds.

### Auditing product photos before a collection launch
A content specialist needs to verify that all 50 new product shots were taken with a consistent aperture (f/2.8). They ask their agent to run `get_exif_metadata` on the entire batch, quickly flagging any images that don't match the required structural properties.

### Cleaning up old draft content
A developer is optimizing storage and finds thousands of abandoned draft assets. Instead of manually deleting them, they use `wipe_batch_assets` to safely remove all files tagged as 'DRAFT' from the media vault.

### Mapping product data to images
The e-commerce team needs to ensure every image is associated with a specific internal product SKU. They use `create_custom_schema` to add an 'SKU' field and then use `patch_file_details` in bulk to tag all existing assets.

## Benefits

- Save time auditing metadata. Instead of manually checking hundreds of files in a GUI, you can use the `get_exif_metadata` tool to automatically retrieve technical properties like ISO or focal length for compliance checks.
- Ensure fresh content delivery every time. When assets change, run `purge_cdn_cache` via your agent to invalidate URLs instantly across all global nodes, eliminating stale image problems.
- Maintain a clean asset database using bulk operations. Use `wipe_batch_assets` or `wipe_media_asset` for controlled, irreversible cleanup of old or unused media files.
- Extend data structure easily. If your business needs to track custom variables (like 'Client ID' or 'Campaign Tag'), use the MCP to create and manage these fields via `create_custom_schema`.
- Get a complete picture of your assets instantly. The `list_media_files` tool gives you an immediate inventory, while `get_file_details` provides the deep dive into any specific asset ID.

## How It Works

The bottom line is that you get a single conversational interface for managing complex media infrastructure.

1. Subscribe to the ImageKit MCP using your private key.
2. Your AI client accesses all available tools, allowing you to run commands like listing assets or checking metadata status.
3. The tool executes the action against your live ImageKit account and reports the outcome back to your agent.

## Frequently Asked Questions

**How do I check if a CDN cache purge actually worked with ImageKit MCP?**
You use the `get_purge_status` tool. This function queries the global network to confirm whether your previous invalidation request has completed successfully across all edge nodes.

**Can I bulk update tags using the ImageKit MCP?**
Yes, you can use the `patch_file_details` tool. This lets you modify asset tags or metadata fields for multiple files at once without having to edit every single one individually.

**What is the difference between wiping a batch and wiping one file with ImageKit MCP?**
Use `wipe_media_asset` when you need to remove just one specific image. If you are deleting many files, always use `wipe_batch_assets` for an automated check that routes explicit disk removals.

**Does ImageKit MCP help with SEO?**
Indirectly. By allowing you to update custom metadata fields and tags using the MCP, you can ensure assets contain necessary structured data points needed for internal search or external indexing.

**Can I get technical camera specs with ImageKit MCP?**
Yes, run `get_exif_metadata` to retrieve structural image properties like the focal length, ISO rating, and dimensions right from the file's data.