top of page

Building a YouTube MCP Server with MuleSoft and CurieTech AI in 10 Minutes

Updated: Jul 7

Curious how to integrate the YouTube Data API v3 into a fully functioning MCP (Model Context Protocol) server in record time? With the help of CurieTech AI and MuleSoft, I did it in just 10 minutes, without ever having created an MCP server before.


In this article, I’ll walk you through what I did step-by-step — including how I used CurieTech to generate the entire integration, converted it into an MCP server, and ran it using SuperGateway and the MCP Inspector. I also show how you can connect this to Claude or other apps and use natural language to run YouTube searches via the MCP server.


🎥 Prefer video? Watch the full tutorial here:



🧠 What Is MCP?


MCP stands for Model Context Protocol, a new protocol designed for agents, AI tools, and other automated systems to interact with structured tools in a flexible and self-describing way. MCP tools define schemas, input parameters, and responses — and are ideal for agent-based use cases.

In other words... It's an API for your agents.


🛠️ What We’re Building


A MuleSoft app that:

  • Connects to the YouTube Data API v3

  • Accepts search queries and API keys as parameters

  • Returns YouTube search results

  • Runs as an MCP server with full schema and parameter validation



🔑 Step 1: Get Your YouTube API Key


To use the YouTube API, you'll need an API key from Google Cloud:

  1. Go to Google Cloud Console.

  2. Create a project.

  3. Enable the YouTube Data API v3.

  4. Under APIs & Services > Credentials, create a new API Key.

  5. Under API Restrictions, select YouTube Data API v3.

  6. Save your changes and copy the key — you'll use it in your requests.



🧪 Step 2: Generate the API with CurieTech AI


Inside CurieTech AI:

  1. Go to the Integration Generator.

  2. Set the language to Java 17, build tool to Maven 3.9, and Mule 4.9.

  3. Use a prompt like:

    "Make an API that uses YouTube Data API v3. Include all query parameters, especially key, and make it as simple as possible."

  4. Paste the list of parameters from the official docs or paste the URL.

  5. CurieTech generates the full integration — copy the code.



💻 Step 3: Run the App in MuleSoft


  1. Create a new Mule project in Anypoint Code Builder or Studio.

  2. Paste the code from CurieTech.

  3. Run the project (default port is 8081).

  4. Use Postman to test:



🤖 Step 4: Convert to an MCP Server


  1. Push your Mule project to GitHub (or use VS Code's repo initializer).

  2. In CurieTech, open the Coding Agent and select your repo.

  3. Prompt:

    "Turn this into an MCP server using the beta MCP connector."

  4. CurieTech updates the code, modifies the pom.xml, adds a global MCP config, and replaces the HTTP listener with an MCP listener.

  5. Approve the PR in GitHub and merge.



🚦 Step 5: Run SuperGateway


  1. Open a terminal window.

  2. Run the following command (ensure the port matches your Mule app's HTTP Listener):

npx -y supergateway --sse http://localhost:8081/sse --ssePath /sse --messagePath /message


🔍 Step 6: Open MCP Inspector


  1. Open a new terminal window and run:

npx @modelcontextprotocol/inspector
  1. Copy the tokenized URL (e.g., http://localhost:6274/?MCP_PROXY_AUTH_TOKEN=...) into your browser.

  2. Select SSE as the transport type

  3. Paste the following URL:

http://0.0.0.0:8081/sse
  1. Click Connect

  2. Select the youtube-search tool

  3. Enter your API Key and query

  4. Click on Run Tool



🤝 Step 7: Add the Server to Your App (e.g., Claude)


Add the following to your Claude or other AI agent config:

{
  "mcpServers": {
    "youtube": {
      "command": "npx",
      "args": [
        "-y",
        "supergateway",
        "--sse",
        "http://0.0.0.0:8081/sse",
        "--ssePath",
        "/sse",
        "--messagePath",
        "/message"
      ]
    }
  }
}

Restart your app, and you're ready to use it in natural language prompts!



🧠 Example Prompts You Can Use


Inside Claude (or any compatible tool):

  • “Search for the ProstDev YouTube channel and return the last 4 videos.”

  • “Generate a LinkedIn post that promotes the first video. Include the title, description, and video link.”

  • “Find trending content about ‘API design’ using YouTube search.”



📦 Repo




🧭 Final Thoughts


I had never worked with MCP before — and I built this whole server in 10 minutes thanks to CurieTech AI. The entire flow, from integration to deployment and testing, was smoother than I imagined. If you learn by reading code like I do, this is one of the fastest ways to master new patterns like MCP.


Whether you're building for fun, research, or AI-driven platforms, give this a try and let me know what you build next!

Comentarios


Join our mailing list

Thanks for subscribing!

  • Youtube
  • GitHub
  • LinkedIn
bottom of page