Technical
How 60MB of ChatGPT Exports Finally Made MCP Click for Me
From a failed NotebookLM experiment to querying 28,000 messages in milliseconds using SQLite and Google Antigravity.
TL;DR: I wanted to query years of personal ChatGPT history (63.5MB across 584 conversations) using NotebookLM. After hitting format rejections (no JSON support) and strict upload size limits (even after converting to Markdown), I shelved the project. A few days later, while casually researching the Model Context Protocol (MCP) with Gemini, it highlighted a classic pattern: read-only local search over an indexed database. That was my lightbulb moment. Using Google Antigravity, I built search-gpt—a lightweight MCP server that indexes 28,000 messages into SQLite FTS5 in 2 seconds, turning my shelved export into an interactive personal research assistant.
A few months ago, I downloaded my full data export from ChatGPT. Like a lot of people, I didn’t do anything with it immediately. It just sat in my downloads folder — 63.5 MB of raw JSON containing 584 conversations and over 28,000 message turns from years of brainstorming, debugging, and drafting essays.
Last week, I finally had some free time. I decided to run an experiment: throw the whole archive into Google’s NotebookLM and see if I could query my past thoughts, extract old writing ideas, and trace how my thinking had evolved.
That sounded simple enough. Then reality hit.
The Roadblock: NotebookLM Hits a Wall
First, I went to upload the files. NotebookLM didn’t accept raw JSON dumps.
Fair enough, I thought. I wrote a quick script to parse the JSON trees and convert the transcripts into clean Markdown files with headers and turn markers.
Then came the second wall: the files were way too big. NotebookLM choked on the file sizes and character caps. Even broken into chunks, managing and uploading them was clunky and fragmented.
I didn’t feel like spending hours slicing 60MB of text into twenty miniature files just to appease an upload button. So, I put the project down, closed my laptop, and moved on with my week.
The Lightbulb Moment
A couple of days later, I was researching the Model Context Protocol (MCP).
I’d been hearing about MCP everywhere, but I hadn’t looked into it deeply because I simply didn’t have a real use case. I do a lot of my work locally in Google Antigravity, and for day-to-day coding, if an agent needs to run a Git command or check a file, it just uses the terminal. MCP felt like a solution in search of a problem.
While discussing MCP architectures with Gemini, I asked what a practical, basic implementation looked like. Gemini pointed out that one of the simplest, most powerful patterns is read-only local retrieval: taking an archive of personal notes, indexing them into a local database (like SQLite), and exposing search tools to the agent.
That’s when it clicked:
“Wait… I already have a massive pile of notes sitting on my drive that I gave up on.”
I didn’t need to upload anything to a cloud service. I didn’t need to fight file-size caps. The architecture was staring me right in the face:
- The LLM is a reasoning engine, not a storage locker.
- SQLite is built for fast local lookups.
- MCP is just the translator that lets the agent query that database on demand.
Building search-gpt with Antigravity
I opened my workspace, fired up Antigravity, and got to work building search-gpt.
The architecture came together in two simple parts:
Google Antigravity (Agent)
│
│ stdio (JSON-RPC)
▼
search-gpt MCP Server (Python FastMCP)
│
▼
SQLite Database + FTS5 Index (conversations.db)
▲
│ Ingest in 2 seconds
data/conversations-*.json (63.5 MB)
1. The Offline Indexer
Rather than dealing with vector databases or downloading heavy embedding models, we used SQLite’s built-in FTS5 (Full-Text Search) extension with BM25 ranking and Porter stemming.
A Python script parses the original ChatGPT export trees, traces each dialogue branch, and indexes all 584 conversations and 26,977 active messages into a single 117MB conversations.db file.
The entire indexing process took 2.11 seconds.
2. The MCP Server
Using the mcp Python SDK, we exposed a few opinionated tools over standard I/O (stdio):
- search_conversations(query, role_filter, limit): Instant keyword and phrase search across all 28k turns, returning snippets with highlighted matches.
- get_conversation(id, start_turn, max_messages): Fetches clean, formatted dialogue with turn pagination so long conversations don't overwhelm the prompt.
- extract_nuggets(query, limit): A dedicated writing tool. It finds where a topic was discussed and pairs my original user prompt with the assistant's core insight—perfect for quoting and essay drafting.
Putting It to Work
Once configured in Antigravity’s mcp_config.json, the server was immediately online.
I tested it with a vague memory:
“Remember that time we were talking about a street statue? Find what led up to that and help me write an essay on it.”
In milliseconds, Antigravity called search_conversations, found a chat titled Substack Articles from July 2026 where I had analyzed a video of a living statue street prank, and linked it to the concept of psychological "model collapse."
(You can read the resulting Substack article if you’re curious).
Then, using the conversation timestamps, the agent checked what I was talking about in the days leading up to it — surfacing notes on predictability and mental friction — and drafted a cohesive outline.
The total token cost for that entire retrieval? Fewer than 4,000 tokens.
No monthly vector DB subscriptions, no file size warnings, and zero data leaving my local machine.
What I Learned
- You don’t need MCP for everything: If an agent just needs to run a one-off shell command or read a scratchpad file, the terminal is completely fine. Don’t overcomplicate small things.
- MCP shines at bridging static data to active reasoning: When you have a large dataset that doesn’t fit into memory — like years of notes or chat exports — MCP is the cleanest way to give your AI agent an on-demand “library card.”
- Keep it simple first: I almost went down the rabbit hole of local vector embeddings. In practice, SQLite FTS5 with BM25 search was instant, lightweight, and answered 100% of my questions without adding a single machine learning dependency.
If you have an old ChatGPT export gathering dust on your drive, don’t try to cram it into a context window. Stick it in SQLite, wrap it in a local MCP server, and let your agent do the reading for you.
The full code for search-gpt (including the parser, indexer, and MCP server) is open-source and available on GitHub.
