What is Mixpeek?

[Back to Blog](/blog)

[](https://twitter.com/intent/tweet?text=Build%20a%20Model%20Context%20Protocol%20\(MCP\)%20Server%20on%20S3%20using%20Lambda%2C%20Temporal%2C%20Ray%2C%20and%20Qdrant&url=https%3A%2F%2Fmixpeek.com%2Fblog%2Fmcp-on-s3)[](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fmixpeek.com%2Fblog%2Fmcp-on-s3&title=Build%20a%20Model%20Context%20Protocol%20\(MCP\)%20Server%20on%20S3%20using%20Lambda%2C%20Temporal%2C%20Ray%2C%20and%20Qdrant)[](https://www.reddit.com/submit?url=https%3A%2F%2Fmixpeek.com%2Fblog%2Fmcp-on-s3&title=Build%20a%20Model%20Context%20Protocol%20\(MCP\)%20Server%20on%20S3%20using%20Lambda%2C%20Temporal%2C%20Ray%2C%20and%20Qdrant)

This was originally in our newsletter.

Get Updates

Dec 4, 2024•2 min read

# Build a Model Context Protocol (MCP) Server on S3 using Lambda, Temporal, Ray, and Qdrant

Build a scalable MCP pipeline on S3 using AWS Lambda, Temporal, Ray, and Qdrant to process and index unstructured data like video, audio, and PDFs for real-time AI search and retrieval.

![Build a Model Context Protocol (MCP) Server on S3 using Lambda, Temporal, Ray, and Qdrant](https://blog.mixpeek.com/content/images/2025/06/ChatGPT-Image-Jun-6--2025--03_10_34-PM.png)

Tutorials

TABLE OF CONTENTS

Learn how to build an MCP (Multimodal Context Protocol) pipeline directly on top of S3 using Lambda (for change detection), Temporal (for orchestration), Ray (for scalable compute), and Qdrant (for vector search).

## 🧩 Architecture Overview

To build a fully event-driven MCP pipeline that indexes unstructured content from S3 (videos, PDFs, images, logs), here’s what you’ll need:

*   **Amazon S3** — your raw unstructured data source
*   **AWS Lambda** — triggers feature extraction on new data (CDC style)
*   **Temporal** — orchestration and retries across modalities
*   **Ray** — distributed execution for compute-heavy tasks (e.g., video segmentation, embedding)
*   **Qdrant** — vector DB to store indexed representations

## 📥 Example: From Upload to Retrieval

Once this pipeline is in place, the flow becomes simple:

*   **Upload** a file (e.g. `customer-incident.mp4`) to S3
*   **Trigger** runs via Lambda → Temporal → Ray to extract embeddings
*   **Store** outputs in Qdrant (vectors) and Postgres (metadata)

**Query** Qdrant with a prompt like:

> _“Show me all videos where someone slips and falls indoors”_

The system surfaces relevant clips — no manual tagging required.

* * *

## 🔗 System Flow

1.  **Change Detection (CDC)**: S3 → EventBridge → Lambda
2.  **Orchestration**: Lambda kicks off a Temporal workflow
3.  **Distributed Processing**: Temporal starts Ray tasks
4.  **Indexing**: Outputs pushed to Qdrant (for vector search) and optionally Postgres (for metadata)

graph TD A\[S3 - New File\] --> B\[EventBridge Trigger\] B --> C\[AWS Lambda - CDC\] C --> D\[Temporal Workflow - Orchestration\] D --> E\[Ray Tasks - Feature Extraction\] E --> F\[Qdrant - Vector Index\] E --> G\[Postgres - Metadata Store\]

* * *

## ⚙️ Infrastructure Breakdown

### Step 1: S3 CDC via Lambda

```python
def lambda_handler(event, context):
    s3_key = event["Records"][0]["s3"]["object"]["key"]
    # Start Temporal workflow
    temporal_client.start_workflow("ProcessMultimodalFile", args={"key": s3_key})
```

* * *

### Step 2: Temporal Workflow

```python
@workflow.defn
class ProcessMultimodalFile:
    @workflow.run
    async def run(self, key):
        video_path = await download_from_s3(key)
        await workflow.execute_activity(extract_and_embed, video_path)
```

* * *

### Step 3: Ray Tasks for Feature Extraction

```python
@ray.remote
def extract_and_embed(path):
    vision = vision_embedder(path)
    audio = audio_embedder(path)
    qdrant_client.insert([vision, audio])
```

* * *

## 🧠 What’s Indexed?

Modality

Examples Extracted

Vision

Object detection, OCR, visual style

Audio

Speech-to-text, speaker ID

Text

Entities, sentiment, topic modeling

PDF/Image

Layouts, diagrams, handwriting

* * *

## 🏗️ Mixpeek’s Fully Managed MCP Stack

[

Architecture - Mixpeek

Understanding Mixpeek core architecture and data flow

![](https://mintlify.s3-us-west-1.amazonaws.com/mixpeek/_generated/favicon/apple-touch-icon.png?v=3)Mixpeek

![](https://mixpeek.mintlify.app/_next/image?url=%2Fapi%2Fog%3Fdivision%3DDocumentation%26title%3DArchitecture%26description%3DUnderstanding%2BMixpeek%2Bcore%2Barchitecture%2Band%2Bdata%2Bflow%26logoLight%3Dhttps%253A%252F%252Fmintlify.s3.us-west-1.amazonaws.com%252Fmixpeek%252Flogo%252Flight.png%26logoDark%3Dhttps%253A%252F%252Fmintlify.s3.us-west-1.amazonaws.com%252Fmixpeek%252Flogo%252Fdark.png%26primaryColor%3D%2523FC5185%26lightColor%3D%2523FFA0BD%26darkColor%3D%2523364F6B&w=1200&q=100)

](https://mixpeek.com/docs/relevance/architecture?ref=blog.mixpeek.com)

![Mixpeek Architecture Diagram](https://d8ts56gtwtyh1.cloudfront.net/docs/diagrams/architecture.png)

* * *

## 🔥 Long-Tail Use Cases

Industry

Use Case Example

Insurance

Detect slip-and-fall claims via video ingestion from branch cameras

Healthcare

Search for similar MRI results across a decade of unstructured imaging files

Education

Auto-index and summarize lecture videos for semantic search

Security

Tag suspicious behavior patterns across thousands of archived CCTV feeds

Media

Find moments of laughter or applause in podcast audio archives

Logistics

Scan forklift usage across warehouse footage to predict operator burnout

* * *

## 🧩 Skip the Plumbing

You could glue this all together — or you can use [Mixpeek](https://mixpeek.com/?ref=blog.mixpeek.com), which handles:

*   **Multimodal ingestion pipelines**
*   **Zero-config embedding + indexing**
*   **Query-ready APIs for search, alerts, and retrieval**
*   **Event-based workflows with zero devops**

> Built for developers who don’t want to reinvent multimodal infra.

[ES

Ethan Steininger

Former lead of MongoDB's Search Team, Ethan noticed the most common problem customers faced was building indexing and search infrastructure on their S3 buckets. Mixpeek was born.



](/blog/authors/ethan)

## Run this on your own content

Point Mixpeek at the storage you already have and search your video, images, audio, and documents the way this post describes. Build starts at $25/mo for up to 1M vectors.

[Search your own files](https://studio.mixpeek.com/namespaces/create?mode=managed&utm_source=homepage&utm_medium=blog_onramp_end&utm_campaign=mvs_onramp)[Talk to us](/demo)

## Continue Learning

[

![AI Video Analysis for Sports: Build Automated Highlight Reels, Archive Search, and Performance Analytics](https://blog.mixpeek.com/content/images/2026/03/sports-blog-hero.jpg)

### AI Video Analysis for Sports: Build Automated Highlight Reels, Archive Search, and Performance Analytics

Sports broadcasters cut 4-8 hour editing sessions to 15 minutes using AI video analysis. Learn how to build automated highlight detection, archive search, and performance analytics pipelines for any sport.

Read More





](/blog/ai-video-analysis-sports)[

![How to Build a Multimodal Search Engine in 2025](https://mixpeek.com/og-image.png)

### How to Build a Multimodal Search Engine in 2025

A practical guide to building search that works across text, images, video, and audio using shared embedding spaces and retrieval pipelines.

Read More





](/blog/how-to-build-multimodal-search-engine)

### Author

ES

Ethan Steininger

![Mixpeek Icon](/brand/logo-dark-icon.webp)

#### Multimodal Search, On Demand

Index, retrieve, and reason over videos, images, audio, and docs, all from a single API.

[Start Building](/start)

### Share

[](https://twitter.com/intent/tweet?text=Build%20a%20Model%20Context%20Protocol%20\(MCP\)%20Server%20on%20S3%20using%20Lambda%2C%20Temporal%2C%20Ray%2C%20and%20Qdrant&url=https%3A%2F%2Fmixpeek.com%2Fblog%2Fmcp-on-s3)[](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fmixpeek.com%2Fblog%2Fmcp-on-s3&title=Build%20a%20Model%20Context%20Protocol%20\(MCP\)%20Server%20on%20S3%20using%20Lambda%2C%20Temporal%2C%20Ray%2C%20and%20Qdrant)[](https://www.reddit.com/submit?url=https%3A%2F%2Fmixpeek.com%2Fblog%2Fmcp-on-s3&title=Build%20a%20Model%20Context%20Protocol%20\(MCP\)%20Server%20on%20S3%20using%20Lambda%2C%20Temporal%2C%20Ray%2C%20and%20Qdrant)