DEV Community

Cover image for From Lecture Videos to Research PDFs: How I Built My Personal Knowledge Companion
Prateek Kalra
Prateek Kalra Subscriber

Posted on

From Lecture Videos to Research PDFs: How I Built My Personal Knowledge Companion

Algolia MCP Server Challenge: Ultimate user Experience

This is a submission for the Algolia MCP Server Challenge

What I Built

Ever felt like you're drowning in digital content? Between lecture recordings, research papers, meeting notes, and that random screenshot you took six months ago with "important info" - finding what you need when you need it feels impossible. That's why I built Prism: an AI-powered personal knowledge companion that transforms your scattered files into a searchable, conversational knowledge base.

Prism isn't just another document manager. It's like having a personal research assistant who's read every file you've ever saved and can instantly recall any detail. Upload any file - PDFs, videos, images, audio recordings - and Prism analyzes it with Google's Gemini 2.5 Pro, indexes it with Algolia's blazing-fast search, and lets you chat with your content using natural language.

The magic happens when you start asking questions. Instead of digging through folders or trying to remember which document contained that brilliant insight, you just ask: "What did my professor say about quantum entanglement in last week's lecture?" or "Compare the marketing strategies across all my competitor research files." Prism searches your entire knowledge base and provides contextual answers, complete with source references.

Demo

Github repository

The Problem That Sparked Prism

The idea for Prism came from a personal pain point. As someone juggling multiple projects, research papers, and learning materials, I found myself constantly frustrated by:

  • The 3am Panic: Knowing I read something important but having no idea which of the 200 PDFs it was in.
  • Video Paralysis: Hour-long lecture recordings that I knew contained gold but didn't have time to rewatch.
  • Context Amnesia: Great insights scattered across documents with no way to connect the dots.
  • Search Futility: File search that only matches filenames, not the actual content I'm looking for.

Traditional solutions weren't cutting it. Cloud storage gives you a digital filing cabinet, but you still need to remember where you filed things. Note-taking apps require manual effort to organize. What I needed was something that could understand my content as deeply as I do - or better.

How I Utilized the Algolia MCP Server

Here's where Algolia's Model Context Protocol (MCP) server became the hero of this story. MCP is a game-changer for AI applications because it provides a standardized way for AI models to interact with external tools and data sources. The Algolia MCP server specifically gives AI models the superpower of enterprise-grade search.

The Technical Magic

The integration works through two critical MCP tools:

1. saveObject: Every time you upload a file, Prism:

  • Analyzes it with Gemini 2.5 Pro (extracting themes, summaries, key points).
  • Structures the analysis with metadata (file type, size, upload date).
  • Saves it to your Algolia index via MCP.
// Simplified flow
const analysis = await analyzeFileWithGemini(file);
await mcpClient.callTool('saveObject', {
  applicationId: ALGOLIA_APP_ID,
  indexName: 'prism-data',
  requestBody: {
    resourceDetails: analysis.content,
    resourceType: file.type,
    fileName: file.name,
    uploadDate: new Date().toISOString()
  }
});
Enter fullscreen mode Exit fullscreen mode

2. searchSingleIndex: When you ask a question, the magic unfolds:

  1. Extract key terms from your natural language query.
  2. Search your entire knowledge base in milliseconds.
  3. Retrieve the most relevant content.
  4. Provide this context to the AI for a comprehensive answer.
// Every chat query triggers this flow
const searchTerms = extractKeyTerms(userMessage);
const searchResults = await mcpClient.callTool('searchSingleIndex', {
  applicationId: ALGOLIA_APP_ID,
  indexName: 'prism-data',
  requestBody: {
    params: `query=${searchTerms}&hitsPerPage=3`
  }
});
Enter fullscreen mode Exit fullscreen mode

Why Algolia MCP Changes Everything

What makes this integration special isn't just the search speed (though sub-50ms response times are chef's kiss). It's how MCP enables a new paradigm:

  • Semantic Bridge: Your files aren't just stored; they're understood. The AI analysis creates a semantic layer that Algolia can search.
  • Context Injection: Every query automatically retrieves relevant context from your knowledge base. The AI doesn't just answer questions - it answers them using YOUR specific content.
  • Real-time Knowledge Building: As soon as you upload a file, it's instantly searchable and part of your AI's knowledge.
  • Tool Transparency: You can see exactly when and how Algolia is being used, building trust in the AI's responses.

The Architecture That Makes It Tick

Building Prism required careful orchestration of multiple technologies:

User Interface (React + TypeScript)
     ↓
Backend Orchestrator (Express + MCP Client)
     ↓
   ┌─────────────┬──────────────┐
   │             │              │
Gemini 2.5    Moonshot v1    Algolia MCP
(Analysis)    (Chat AI)      (Search/Storage)
Enter fullscreen mode Exit fullscreen mode

Key Technical Decisions

  • Multi-Modal AI Strategy: Gemini 2.5 Pro for file analysis (it handles images, videos, audio brilliantly) and Moonshot v1 for conversational AI (great at tool calling and streaming).
  • Streaming Everything: Real-time responses make the difference between a tool that feels alive vs one that feels like waiting for dial-up internet.
  • MCP as the Backbone: Instead of building custom integrations, MCP provides a standardized, extensible way to connect AI with tools.
  • Client-Side Analysis: Files are analyzed directly in the browser before saving results, keeping your data private while leveraging cloud search.

Key Takeaways

The Development Journey
Building Prism was a masterclass in modern AI application development. Here are the big lessons:

1. MCP is the Future of AI Integration
The Model Context Protocol isn't just another API - it's a paradigm shift. Instead of hardcoding integrations, MCP lets you:

  • Connect AI to any tool through a standard protocol.
  • See exactly what tools are doing (no black box).
  • Extend functionality without touching core code.

The Algolia MCP server specifically showed me how powerful specialized tools become when AI can use them natively.

2. Streaming Changes User Perception
Early versions waited for complete responses. Users thought it was broken. Adding streaming responses transformed the experience - suddenly the AI felt responsive and alive. The technical complexity was worth every millisecond of perceived performance gain.

3. Context is King, but Retrieval is Emperor
Having a knowledge base is useless if you can't retrieve the right information at the right time. Algolia's search capabilities, exposed through MCP, made the difference between "neat demo" and "tool I use every day."

Technical Challenges Conquered

Challenge 1: Multi-Modal File Handling

  • Problem: Supporting everything from PDFs to videos to audio files.
  • Solution: Gemini 2.5 Pro's multi-modal capabilities + type-specific processing pipelines.
  • Learning: One AI model that handles multiple formats beats multiple specialized models.

Challenge 2: Real-Time Search Integration

  • Problem: Making search feel instant and natural within chat.
  • Solution: Automatic query extraction + Algolia MCP's sub-50ms search.
  • Learning: Users don't want to write search queries - extract intent from natural language.

Challenge 3: MCP Server Management

  • Problem: Keeping MCP connections stable and monitoring tool usage.
  • Solution: Built comprehensive status monitoring and automatic reconnection.
  • Learning: Transparency builds trust - show users when tools are working.

What Surprised Me

  • File Analysis Quality: Gemini's ability to extract meaningful insights from a blurry photo of whiteboard notes blew my mind.
  • Search Context Magic: Often, Algolia found connections I'd forgotten about. Asking about a concept brought up notes from months ago that I'd never have found manually.
  • Tool Calling Patterns: Moonshot AI's ability to decide when to search vs when to answer directly created surprisingly natural conversations.

Beyond Personal Use: The Bigger Picture

While I built Prism for personal knowledge management, the architecture scales beautifully:

  • Small Teams: Shared knowledge bases with role-based access.
  • Researchers: Citation tracking and cross-paper analysis.
  • Students: Lecture transcription and study material organization.
  • Content Creators: Asset management and idea connection.

The Algolia MCP integration means search performance doesn't degrade as your knowledge base grows from hundreds to millions of documents.

What's Next?

Prism is just the beginning. The roadmap includes:

  • Collaborative Knowledge: Share specific collections with teammates.
  • Smart Notifications: "Hey, this new paper relates to your research from last month".
  • Knowledge Graphs: Visualize connections between your content.
  • More MCP Tools: Integration with other MCP servers for expanded capabilities.

Try It Yourself

The beauty of open source is that you can take Prism and make it your own. Maybe you want to:

  • Add support for specific file formats.
  • Integrate with your favorite note-taking app.
  • Build team collaboration features.
  • Create specialized analysis for your field.

The MCP architecture makes it surprisingly easy to extend.


Special thanks to the Algolia team for making search accessible through MCP, and to the broader MCP community for showing us what's possible when we give AI the right tools.

  • Tech Stack: React, TypeScript, Express.js, Google Gemini 2.5 Pro, Moonshot v1, Algolia MCP, Tailwind CSS
  • License: MIT
  • Status: Actively maintained and accepting contributions!

Top comments (0)