Skip to main content
Glama

Backstory

Search all your data exports in one place. It runs entirely on your own computer, and nothing ever leaves your PC.

CI NuGet Downloads .NET MCP Glama Platforms License: MIT Docs

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

backstory fetch google

Telegram

Messages, contacts

backstory fetch telegram

Spotify

Listening history, podcasts, searches

backstory fetch spotify

Instagram

Direct messages, posts, comments, searches

backstory fetch instagram

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 Backstory

Or build from source today:

git clone https://github.com/magna-nz/backstory && cd backstory
dotnet build Backstory.slnx -c Release

Get 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 watch

You 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.json

Then search:

backstory search "dinner plans with sarah"
backstory search "trip to japan" --from 2023-01-01

Use it from an AI agent

Backstory speaks MCP, so any MCP client (Claude and others) can query your timeline. Start the server:

backstory serve

Register it with one command:

claude mcp add backstory -- backstory serve

Or 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

fetch google|telegram|spotify|instagram

Show how to export your data, and open the page

watch [--dir <path>]

Import exports automatically as they download to ~/Downloads

import <path>

Import an export (file, folder, or Takeout zip)

search "<query>"

Search the timeline. Filters: --from --to --source --limit

timeline

List events in time order, with the same filters

entity "<name>"

Look up a person or place

stats

Counts by source and type, and the embedder in use

serve

Run the MCP server

model fetch

Download the semantic search model (optional, one time)

eval

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 fetch once (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

search_timeline

Ranked events for a natural-language query

get_events

Full event records by id, including a pointer to the source

lookup_entity

A person or place by name

summarize_period

Every event in a date range, for the agent to summarize

list_sources

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 tools
get_eventsA

Fetch full event records by id, including the pointer to the original source record.

ParametersJSON Schema
NameRequiredDescriptionDefault
idsYesComma-separated event ids.

TDQS

A3.5/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.1/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesName or alias to look up.

TDQS

C2.9/5.0
Behavior2/5

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.

Conciseness4/5

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.

Completeness3/5

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.

Parameters3/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
toNoOptional ISO-8601 upper bound on event time.
fromNoOptional ISO-8601 lower bound on event time.
limitNoMax results (default 10).
queryYesNatural-language query, e.g. 'dinner plans with Sarah'.
sourceNoOptional source filter: 'telegram' or 'google_takeout'.

TDQS

B3.1/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters3/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
toYesISO-8601 end of range.
fromYesISO-8601 start of range.
limitNoMax events (default 100).
sourceNoOptional source filter.

TDQS

C2.9/5.0
Behavior2/5

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.

Conciseness4/5

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.

Completeness3/5

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.

Parameters3/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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.

  1. 5 tool updatesv0.1.0
    • First observedget_events
    • First observedlist_sources
    • First observedlookup_entity
    • First observedsearch_timeline
    • First observedsummarize_period

TDQS

A3.6/5.0

Scored across 5 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: event retrieval by ID, source listing, entity lookup, semantic timeline search, and time-range summarization. No overlap.

Naming Consistency5/5

All tools follow a consistent verb_noun snake_case pattern (e.g., get_events, list_sources), making naming predictable and clear.

Tool Count5/5

Five tools is appropriate for a focused query/summary server, covering core operations without being overwhelming or insufficient.

Completeness4/5

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

ActivityStale
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    Privacy-first local document search using semantic search. Runs entirely on your machine with no cloud services, supporting PDF, DOCX, TXT, and Markdown files.
    22
    9
    3,151 npm
    390
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Offline 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.
    7
    Apache 2.0
  • A
    license
    A
    quality
    D
    maintenance
    A 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.
    17
    6
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Privacy-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