Skip to content

RESOURCES / BLOG

Using Cloudinary’s New MCP Server to Scrape Mozzarella, Camembert and Parmesan

Why It Matters

  • Automates the process of gathering images for ML model training or content libraries, saving significant time and resources.
  • A streamlined way to acquire large, curated datasets of high-quality, relevant images, which is crucial for building machine learning models.
  • A flexible and powerful tool that integrates directly into an IDE, allowing for customized and automated workflows for collecting and managing assets.

I’m always interested in how new technology can help us make our esoteric tasks a little less manual. Speaking of esoteric tasks, did you know that I curate a machine learning model to classify types of cheese? It was done to power a mobile app like this:

The trick with creating custom ML models is that you need to train a model with a bunch of good-quality images so that it can learn about the categories you want to test. In this case, I wanted to be able to walk into a cheese shop and, via my custom ML-enabled mobile app, determine the type of cheese that was available out of the six standard categories of cheese worldwide: bloomy, semi-soft, hard, fresh, blue, and washed-rind. Yes, this is important work.

But digging through images online and manually dumping them into folders is a pain. Alternately, walking into your local cheese shop and shooting video to later split up into images using ffmp, all the while telling the sales people that “I’m fine, just building up a dataset for my ML model”, is kind of embarrassing. Isn’t there a better way?

Turns out… YES! Recently, Cloudinary released an MCP server solution that would allow me to perform a quick web scrape to gather images of types of cheese that I can curate and upload, tagged, to my account. It’s the perfect use case! Make the images come to you using an agent, and make that agent work nicely with Cloudinary, your friend for visual media management. All while never leaving the comfort and safety of your IDE!

Meet the Cheesy MCP — the AI-powered agent that scrapes free, Creative-Commons licensed, high-quality cheese photos and delivers them straight to your Cloudinary account.

Of course, this system can be used with images other than cheese! Use it for a sweet way to curate other image categories too.

The Model Context Protocol, launched by Anthropic last November, is the new hotness power behind AI agents, enabling them to independently function to perform actions set by a user using an agreed-upon protocol. An example is asking an agent to crawl your mailbox periodically to gather receipts to build a monthly expense report, or periodically prowl the web for images of wedding cakes to add to a Pinterest board.

Cloudinary has entered the field with an offering allowing you to connect your AI tools like Claude or Cursor to the Cloudinary service for automated asset management. Take a look at the open-source, free servers listed on GitHub as they continue to develop and evolve.

Honestly, what a question. What doesn’t have to do with cheese? Still, glad you asked! I built a Python project to leverage this MCP tool from within Cursor, my IDE of choice. The agent surfs Google, bringing me images that I can curate ad hoc, with a nice automation workflow done via chat in Cursor. Once the images are available, I approve them and check their metadata for proper tagging, and say ‘upload’ in chat. The images are then uploaded right on up to my Cloudinary account, all tagged up and with metadata intact.

There are a few things you need to do to leverage these servers and a few different ways you can do it. As a Cursor user, I was happy to simply use the ‘add to Cursor’ buttons available for us:

For Cursor users, you can install MCP servers with one click using Cursor deeplinks:

The following MCP servers are available for Cloudinary:

Server NameDescriptionGitHub RepoInstall
Asset ManagementUpload, manage, and transform your visual media assets with advanced search and organization capabilities.@cloudinary/asset-management
Environment ConfigConfigure and manage your Cloudinary environment settings, upload presets, and transformations.@cloudinary/environment-config
Structured MetadataCreate, manage, and query structured metadata fields for enhanced asset organization and searchability.@cloudinary/structured-metadata
AnalysisLeverage AI-powered content analysis, moderation, and auto-tagging capabilities for your visual media assets.@cloudinary/analysis
MediaFlowsBuild and manage low-code workflow automations for images and videos with AI-powered assistance.MediaFlows MCP

Make sure you have your Cloudinary account ready with your API credentials handy as you’ll need to update the environment variables with your actual credentials after installation.

Once I installed the MCP JSON into Cursor, it was picked up and I was invited to configure the server. Add your credentials right into the MCP settings:

MCP tools settings with credentials added

Once ready, Cursor helped me create a Python script to scrape images and dump them into my local folder. By far this was the most finicky bit: web scraping is an inexact science. Once that is done, the system prompts me to curate them:

Terminal after the web scraping is complete

After the scrape is done and candidates are offered for upload, I am invited to interact with the system via chat, telling the agent to upload. I can check and, if necessary, overwrite any tags for the images.

List of candidates after the web scraping

And once I give it the go-ahead, the system makes the handshake with my Cloudinary account and uploads the tagged images after I ensure they are correct:

Cloudinary's Metadata tab with the chosen image uploaded and tagged

It’s a new experience for me to be able to use my IDE as an agent, making handshakes between systems that I can control using code and this protocol. And honestly it took a bit of a mindshift to understand that web scraping can be done this way, rather than a plain cron job + Python or web app. But it’s rather powerful, wouldn’t you say?

Give the new Cloudinary MCP servers a try, and let me know what you build. You can check out my codebase on GitHub.

Stay tuned for esoteric demos and sign up to enjoy the generous free tier of this top-notch image and video platform!

Start Using Cloudinary

Sign up for our free plan and start creating stunning visual experiences in minutes.

Sign Up for Free