🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

daybrain

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

daybrain

Private local memory for your AI. Gives Claude, Cursor, and ChatGPT context about your workday — no cloud required.

latest
Source
npmnpm
Version
0.3.4
Version published
Maintainers
1
Created
Source

DayBrain

Private local memory for any AI assistant.

Give Claude, Cursor, ChatGPT, OpenCode, and any MCP client persistent context about your workday — without sending your data anywhere.

npm tests license

The problem

AI assistants know everything about the internet. They know nothing about you. You spend 30 seconds re-telling Claude what you've been working on — every conversation, every day.

What DayBrain does

DayBrain runs on your machine as a background process. It watches what you work on, stores it in a local SQLite database, extracts useful insights, and exposes everything through the Model Context Protocol (MCP). Any AI tool that speaks MCP can query it.

No cloud. No accounts. No new chat app.

npx daybrain

Architecture

┌──────────────┐     ┌────────────────┐     ┌──────────────────┐
│  Activity    │────▶│                │────▶│  Any MCP client  │
│  sources     │     │   DayBrain     │     │  Claude, Cursor,  │
│              │     │                │     │  OpenCode, etc.   │
├──────────────┤     ├────────────────┤     └──────────────────┘
│ CGWindow API │     │  SQLite DB     │
│ Chrome ext.  │     │  Insight engine│     ┌──────────────────┐
│ ActivityWatch│     │  Scheduler     │────▶│  Telegram/Slack   │
│ Screenpipe   │     │  MCP server    │     │  (push insights)  │
└──────────────┘     └────────────────┘     └──────────────────┘

Features

  • 11 MCP tools — AI can query activity, commitments, patterns, baselines, and project context
  • Native window tracking — macOS CGWindow API, zero permissions required
  • Chrome extension — records browsing activity, one-click copy context anywhere
  • Commitment detection — 9 regex patterns catch promises from window titles ("I'll send the demo by Friday")
  • Context switching analysis — how often you jump between apps, which apps interrupt your flow
  • Baseline comparison — compares today vs 7-day average, flags anomalies
  • Focus block detection — identifies periods of sustained work on a single app
  • Project context detection — groups activity by project keywords found in window titles
  • Insight scheduling — hourly insight loop with overlap guard, no duplicated runs
  • Linear + GitHub integration — create tasks from detected commitments
  • Cross-device sync — push/pull endpoints for sharing context across your machines
  • 100% local — SQLite at ~/.daybrain/data/daybrain.db, nothing leaves your device

MCP tools

The full list of tools any AI client can call:

ToolDescriptionRequired params
get_activity_summaryToday's activity breakdown with top apps and total timeperiod (today/week/month)
get_raw_eventsRecent window/browser events with timestampslimit
get_insightsDetected commitments, patterns, and anomalieslimit, min_confidence
get_daily_summaryAggregated stats for a specific datedate (YYYY-MM-DD)
get_baselineCurrent vs historical averages, flags anomalies
get_contextFull workday context for injection into AI chatperiod, include_raw
create_linear_taskCreate a Linear issue from a detected commitmenttitle, description?
create_github_issueCreate a GitHub issue from a detected commitmenttitle, body?, repo
search_activityFull-text search across window titlesquery, limit
get_project_contextActivity grouped by detected project keywordskeywords
get_server_statusHealth check + data directory info

Quick start

npx daybrain              # start server (MCP + HTTP on :19840)

Connect to any AI

{
  "mcpServers": {
    "daybrain": {
      "command": "npx",
      "args": ["-y", "daybrain"]
    }
  }
}

Then ask: "What did I work on today?"

Chrome extension

  • Open chrome://extensions → enable Developer mode
  • Load unpacked → select /extension folder
  • Click the DayBrain icon → toggle recording → browse normally
  • Click "Copy context" → paste into any AI chat

Activity sources

SourcePlatformWhat it capturesSetup
CGWindow APImacOSActive window titles and app namesZero — built in
Chrome extensionAllBrowsing activity, URLs, page titlesLoad unpacked
ActivityWatchAllApps, window titles, AFK detectionInstall aw-watcher-afk + aw-watcher-window
Screenpipe (optional)macOS/LinuxScreen OCR + audio transcriptionInstall Screenpipe, set SCREENPIPE_ENABLED=true

What it detects

PatternExample matchConfidence
Commitments"I will send the report by Friday"80-90%
Deadlines"due by EOD", "needs to ship tomorrow"75%
Follow-ups"let me follow up on that", "I'll check"70%
Promises"I promise to fix", "I will deploy"85%
AvoidanceFrequent brief visits to social/distraction apps70%
Context switches87 app switches in one hour75%
Focus blocks30+ consecutive minutes in one app80%

Tests

npm test
21 passed, 0 failed

Covers: config loading, database CRUD, deduplication, insight engine (commitments, avoidance, app categorization, project detection, focus blocks, summarization, empty-input safety, large-input performance), scheduler overlap guard, security (config permissions 0600, path traversal blocked, immutable config clones), error handler registration.

Tech stack

  • Runtime: Node.js (TypeScript, compiled to CommonJS)
  • Database: SQLite via better-sqlite3 (synchronous, no network)
  • Protocol: MCP (Model Context Protocol) via @modelcontextprotocol/sdk
  • Window tracking: macOS CGWindow API via Python pyobjc
  • Browser: Chrome Extension Manifest V3
  • Testing: Custom assertion runner (tsx test.ts)

License

MIT

Keywords

mcp

FAQs

Package last updated on 03 Aug 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts