Backstory
Imports and searches data from Google Takeout, including search history, YouTube history, saved places, and location history.
Imports and searches Instagram export data, including direct messages, posts, comments, and searches.
Imports and searches Spotify export data, including listening history, podcasts, and searches.
Imports and searches Telegram export data, including messages and contacts.
Backstory
Search all your data exports in one place. It runs entirely on your own computer, and nothing ever leaves your PC.
You can download your data from Google, Telegram, and most other services. The problem is what you get back: a pile of JSON and CSV files that are nearly impossible to read. Backstory pulls those exports into one local database and lets you search across all of them at once. You can search from the command line or connect it to an AI assistant over MCP.
Nothing is sent to the cloud. Your data stays in a SQLite file on your machine. That is the main reason this tool exists, since this is the most personal data you have.
Contents
Related MCP server: LocalSynapse
What it can do
Import exports from Google, Telegram, Spotify, and Instagram.
Search everything as one timeline, by meaning or by keyword.
Match the same person or place across different sources.
Answer questions from an AI agent, like "when did I last message Sarah about dinner?".
Show you how to export your data, then import it automatically when it finishes downloading.
Report a benchmark so you can see how well the search actually works.
Sources
Each source is a small adapter that turns an export into events. Here is what works today and what each one pulls in.
Source | What it imports | How to export it |
Google Takeout | Search history, YouTube history, saved places, location history |
|
Telegram | Messages, contacts |
|
Spotify | Listening history, podcasts, searches |
|
Direct messages, posts, comments, searches |
|
Adding a new source means writing one adapter. Nothing else changes.
Quick start
You need the .NET 10 SDK. It runs on Linux, macOS, and Windows.
Install as a global tool:
dotnet tool install -g BackstoryOr build from source today:
git clone https://github.com/magna-nz/backstory && cd backstory
dotnet build Backstory.slnx -c ReleaseGet your data in. Backstory shows you how to export it, then imports it for you when it lands in your Downloads folder:
backstory fetch google # or: telegram
backstory watchYou can also point it at a file or zip yourself. Takeout zips are unpacked for you, including the multi-part ones:
backstory import ~/Downloads/takeout-20240101.zip
backstory import ~/Downloads/telegram-export/result.jsonThen search:
backstory search "dinner plans with sarah"
backstory search "trip to japan" --from 2023-01-01Use it from an AI agent
Backstory speaks MCP, so any MCP client (Claude and others) can query your timeline. Start the server:
backstory serveRegister it with one command:
claude mcp add backstory -- backstory serveOr add it to your MCP config directly:
{
"mcpServers": {
"backstory": { "command": "backstory", "args": ["serve"] }
}
}Now you can ask the agent things like "what was that ramen place I looked up in Tokyo?" and it searches across both your Google and Telegram data to answer.
How it works
Every export format is messy in its own way, so a small adapter handles each one and converts it into the same shape: events on a timeline, plus the people and places they mention. From there everything works the same. Storage is SQLite with a full-text index for keywords and a vector index for meaning. A search runs both and combines the results.
flowchart TD
TG["Telegram<br/>result.json"]:::src
GT["Google Takeout<br/>JSON / CSV"]:::src
TG --> AD
GT --> AD
AD["Adapters<br/><i>parse and normalize</i>"]:::ingest
NR["Normalizer<br/><i>events and entities</i>"]:::ingest
ER["Entity resolution<br/><i>link people and places</i>"]:::ingest
AD --> NR --> ER
ER --> FTS[("SQLite + FTS5<br/>timeline, keyword")]:::store
ER --> VEC[("Vector index<br/>meaning")]:::store
FTS --> HQ
VEC --> HQ
HQ["Search<br/><i>keyword + meaning</i>"]:::query
HQ --> CLI["CLI"]:::iface
HQ --> MCP["MCP server"]:::iface
classDef src fill:#FAECE7,stroke:#993C1D,color:#4A1B0C;
classDef ingest fill:#EEEDFE,stroke:#534AB7,color:#26215C;
classDef store fill:#E1F5EE,stroke:#0F6E56,color:#04342C;
classDef query fill:#E1F5EE,stroke:#0F6E56,color:#04342C;
classDef iface fill:#F1EFE8,stroke:#5F5E5A,color:#2C2C2A;There is a full technical writeup at magna-nz.github.io/backstory and in SPEC.md.
Commands
Command | What it does |
| Show how to export your data, and open the page |
| Import exports automatically as they download to |
| Import an export (file, folder, or Takeout zip) |
| Search the timeline. Filters: |
| List events in time order, with the same filters |
| Look up a person or place |
| Counts by source and type, and the embedder in use |
| Run the MCP server |
| Download the semantic search model (optional, one time) |
| Run the benchmark |
The database lives at $BACKSTORY_DB, or ~/.backstory/backstory.db by default.
Search quality
There are two ways to turn text into vectors, and you can switch between them:
Hashing (default). No setup, fully offline, matches on the words that appear. Good enough to get started.
ONNX MiniLM. Real semantic search that matches on meaning. Run
backstory model fetchonce (about 90 MB) and Backstory uses it automatically. This is what lets a search for "japan vacation" find a message about a "flight to Tokyo".
You can measure the difference yourself with backstory eval. It loads sample data and reports two numbers: how much of the data was parsed, and how often the right event shows up in the top five search results.
Embedder | Data parsed | Right answer in top 5 |
Hashing (default) | 100% | 87.5% |
ONNX MiniLM | 100% | 100% |
MCP tools
Tool | What it returns |
| Ranked events for a natural-language query |
| Full event records by id, including a pointer to the source |
| A person or place by name |
| Every event in a date range, for the agent to summarize |
| The sources imported and how many events each has |
Privacy
Everything runs locally and there is no telemetry. The only time Backstory touches the network is when you run backstory model fetch to download the search model, and that step is optional. Your data never leaves your machine. The .gitignore is set up so a database or an export can't be committed by accident.
License
MIT. See LICENSE. Built on the ModelContextProtocol SDK, ONNX Runtime, and all-MiniLM-L6-v2.
Available Tools
5 toolsget_eventsA
Fetch full event records by id, including the pointer to the original source record.
| Name | Required | Description | Default |
|---|---|---|---|
| ids | Yes | Comma-separated event ids. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided. The description does not disclose any behavioral traits beyond the basic fetch operation, such as read-only nature, rate limits, or side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence that efficiently communicates the tool's purpose without wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Although the description mentions the pointer to the source, it does not fully describe the return fields of 'full event records'. With no output schema, more detail would improve completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema covers the parameter 'ids' with a description. The tool description adds no extra meaning beyond the schema, but schema coverage is 100%, so baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool fetches full event records by ID, including a pointer to the source. This distinguishes it from siblings like 'list_sources' or 'search_timeline'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for fetching events by ID, but provides no explicit guidance on when to use this tool versus alternatives like 'search_timeline' or 'lookup_entity'.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_sourcesA
List the sources ingested into this vault and how many events each contributed.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden; it correctly implies a read-only list operation, but does not disclose ordering, freshness, or behavior with no sources, which are minimal gaps for a simple list tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is one sentence with no filler, front-loading the verb 'List' and clearly stating the object and output details.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given zero parameters, no output schema, and low complexity, the description fully covers what the tool does and what it returns, making it complete for an AI agent to use correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are no parameters, baseline is 4 per rubric. The description adds meaning by clarifying the output (sources and event counts) beyond the empty schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states the tool lists sources ingested into the vault along with their event counts, which is a specific verb+resource combination that clearly distinguishes it from sibling tools like get_events or lookup_entity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use (when needing source names and event counts) but provides no explicit guidance on when not to use or alternatives among sibling tools, though the distinct functionality makes it somewhat obvious.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
lookup_entityC
Look up a person or place by name and return the matching entity.
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name or alias to look up. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so the description must cover behavior. It only states it returns a matching entity, omitting any side effects, access requirements, or whether it is read-only.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is brief and front-loaded, consisting of a single sentence with no wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple lookup with one parameter and no output schema, the description is minimally complete but lacks behavioral details that would help an agent use it effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with a description for the single parameter 'name'. The tool description adds 'person or place' context, but does not significantly enhance what the schema already provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it looks up a person or place by name, which distinguishes it from sibling tools that retrieve events, list sources, search timelines, or summarize periods.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives; lacks context for appropriate usage or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_timelineB
Search the user's life timeline with a natural-language query. Returns ranked events with timestamp, source and text.
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Optional ISO-8601 upper bound on event time. | |
| from | No | Optional ISO-8601 lower bound on event time. | |
| limit | No | Max results (default 10). | |
| query | Yes | Natural-language query, e.g. 'dinner plans with Sarah'. | |
| source | No | Optional source filter: 'telegram' or 'google_takeout'. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must disclose behavioral traits. It mentions output format but omits side effects, authentication needs, rate limits, or error handling. The read-only nature is plausible but not stated.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences with no filler. Purpose and output are succinctly stated, and every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers return fields but lacks pagination details, ordering, or clarification of 'ranked'. Given no output schema, more could be added for completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description adds a natural-language query example ('dinner plans with Sarah') but does not enhance parameter meaning beyond what the schema already provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('search'), resource ('user's life timeline'), and output format ('ranked events with timestamp, source and text'). It distinguishes the tool from siblings like get_events or list_sources by emphasizing natural-language query support, but does not explicitly differentiate.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives (e.g., get_events for structured queries). The description implies usage for free-form search, but lacks explicit context or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
summarize_periodC
Return all events in a time range so the agent can summarize what happened.
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | ISO-8601 end of range. | |
| from | Yes | ISO-8601 start of range. | |
| limit | No | Max events (default 100). | |
| source | No | Optional source filter. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description adds minimal behavioral context beyond the basic function. It does not disclose ordering, pagination, destructive nature, permissions, or any side effects, which are critical for safe and effective use.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence with no unnecessary words. However, it could be improved by front-loading key details without adding length. It is effective but minimal.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description should hint at the return shape or behavior. It mentions summarization but lacks detail on event structure or limitations. With siblings like 'get_events', more context is needed to avoid confusion.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so descriptions for all 4 parameters exist in the schema. The tool description does not add any additional insight beyond what the schema already provides, meeting the baseline but not exceeding it.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it returns events in a time range for summarization. However, it does not distinguish itself from the sibling tool 'get_events', which likely also returns events, leading to potential confusion about when to use each.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool over alternatives like 'get_events' or when not to use it. There is no mention of prerequisites, contexts, or exclusions, leaving the agent to infer appropriate usage.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
v0.1.0- First observed
get_events - First observed
list_sources - First observed
lookup_entity - First observed
search_timeline - First observed
summarize_period
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: event retrieval by ID, source listing, entity lookup, semantic timeline search, and time-range summarization. No overlap.
All tools follow a consistent verb_noun snake_case pattern (e.g., get_events, list_sources), making naming predictable and clear.
Five tools is appropriate for a focused query/summary server, covering core operations without being overwhelming or insufficient.
Covers key query scenarios (by ID, search, time range, source list) but lacks event mutations (create/update/delete), which fits the likely read-only domain. Minor gap: no direct way to get events by source.
Maintenance
Related MCP Connectors
- MysocialOAuthio.mysocial
Social media MCP server: your Instagram, TikTok, YouTube, LinkedIn and Threads history for your AI.
Multi-engine search for AI agents. Trust scoring, local corpus, MCP-native. Self-hostable, BYOK.
Personal knowledge base MCP server with semantic search, auto-categorization, metadata extraction
Search everything you save: YouTube, articles, podcasts, PDFs, Notion, Obsidian. API key or OAuth.
Related MCP Servers
- AlicenseAqualityAmaintenancePrivacy-first local document search using semantic search. Runs entirely on your machine with no cloud services, supporting PDF, DOCX, TXT, and Markdown files.2293,151 npm390MIT
- AlicenseNot gradedqualityAmaintenanceOffline AI-powered local file search MCP server for Windows. Searches inside document contents (Word, Excel, PDF, PowerPoint, HWP) using BM25 + dense vector hybrid search. 100% local, no cloud, no login, no telemetry.7Apache 2.0
- AlicenseAqualityDmaintenanceA universal, local-first MCP hub that indexes personal files (documents, code, etc.) and provides private semantic search via hybrid dense+BM25 retrieval, enabling agents like Claude Desktop to query your data without sending it to the cloud.176MIT
- AlicenseNot gradedqualityBmaintenancePrivacy-first personal knowledge database for your AI that ingests data exports (Google Takeout first) and exposes them via MCP tools like search and list items. Runs locally with no cloud or telemetry.MIT