How to Use the ImageKit (Media Optimization & DAM) MCP in Vercel AI SDK
Feed optimized media assets directly to your Vercel AI SDK frontend in real-time using this MCP Server.
Works with every AI agent you already use
…and any MCP-compatible client
Connect ImageKit (Media Optimization & DAM) MCP to Vercel AI SDK
Create your Vinkius account to connect ImageKit (Media Optimization & DAM) to Vercel AI SDK and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.
Fast asset discovery for Vercel AI SDK frontends
Your AI client can instantly read your storage bucket using `list_media_files` to find specific files. If you need to check specific dimensions or format details, the agent runs `get_file_details` to grab the exact file payload without forcing a page reload. This lets your application render the correct image assets instantly. Users get the exact file sizes and aspect ratios they need because the agent directly inspects the media vault before serving it.
Instant edge cache clearing via MCP Server tools
When an asset changes, your agent uses `purge_cdn_cache` to clear the old files from edge servers. It does not stop there. The agent tracks the invalidation progress using `get_purge_status` to ensure your users see the updated content immediately. This prevents caching issues from breaking your frontend layout. You do not have to manually log into a dashboard to wipe assets when your application updates.
Clean up heavy metadata and delete stale assets
Heavy image metadata slows down your pages, so your AI client reads raw image details using `get_exif_metadata` to strip out unnecessary bytes. If you have old drafts clogging up space, the agent runs `wipe_media_asset` or `wipe_batch_assets` to clean up your storage and reduce costs. You can also modify custom fields using `patch_file_details` to tag files for archiving. The framework handles the dirty work of maintaining a lean media library.
Set up ImageKit (Media Optimization & DAM) MCP in Vercel AI SDK
Prerequisites
- Node.js 18+ and a TypeScript project
-
ai+@modelcontextprotocol/sdkpackages - Active Vinkius subscription with a valid endpoint token
- 1
Install dependencies
Run
npm install ai @modelcontextprotocol/sdkplus your preferred model provider (e.g.@ai-sdk/openai). - 2
Create the Streamable HTTP transport
Use
StreamableHTTPClientTransportwith your Vinkius endpoint URL. Replace[YOUR_TOKEN_HERE]with your token from cloud.vinkius.com. - 3
Discover and use tools
Call
mcpClient.tools()to auto-discover all ImageKit (Media Optimization & DAM) tools. Pass them directly togenerateText()orstreamText()— no manual schema definitions needed. - 4
Works with any model provider
Swap
openai("gpt-4o")for any AI SDK provider — Anthropic, Google, Mistral. The MCP tools work identically across all supported models.
import { experimental_createMCPClient as createMCPClient } from "ai";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp";
import { generateText } from "ai";
import { openai } from "@ai-sdk/openai";
const transport = new StreamableHTTPClientTransport(
new URL("https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp")
);
const mcpClient = await createMCPClient({ transport });
const tools = await mcpClient.tools();
const { text } = await generateText({
model: openai("gpt-4o"),
tools,
prompt: "List recent ImageKit (Media Optimization & DAM) transactions",
});
console.log(text);
await mcpClient.close(); Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by ImageKit. All third-party trademarks, logos, and brand names are the property of their respective owners. Their use on this website is strictly for informational purposes to identify service compatibility and interoperability.
Why Choose Vinkius
Vinkius connects your tools to AI with real-time monitoring and automatic cost savings — all from one dashboard.
Real-time monitoring
Live
visibility into every interaction
Connect your favorite tools to your AI and see exactly what's happening — every request, every response, in real time.
Built-in savings
60%
lower AI costs
Vinkius compresses data between your apps and your AI automatically. Lower bills every month — no configuration required.
Single dashboard
One
place for every integration
Every tool your AI connects to, managed from a single screen. One account, complete control.
Common questions about ImageKit (Media Optimization & DAM) MCP in Vercel AI SDK
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the ImageKit (Media Optimization & DAM) MCP today
We host it, we monitor it, we maintain it. You just paste one token.