npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

daylens-mcp

v1.0.0

Published

MCP server for Daylens — ask your AI assistant what you were working on

Readme

daylens-mcp

Your AI assistant can now answer "what was I working on?" with real precision.

daylens-mcp is a Model Context Protocol server that connects Claude Code, Cursor, Windsurf, and Claude Desktop to your local Daylens activity database. Ask natural questions about your work history, focus, and productivity — answered from your own machine in seconds.

Zero cloud. Zero API keys. Your data never leaves your Mac.


What is Daylens?

Daylens is a free, open-source macOS app that turns your app and browser activity into a timeline of labeled work sessions. Not "Chrome: 6 hours" — but what you were actually doing, when. AI labels every session automatically. Everything lives locally.

daylens-mcp gives your AI coding assistant a live window into that timeline.


Demo

You › what was I working on this morning?

  • 06:40–09:30 (2h 50m) — Tax Filing, Email & Planning
  • 09:30–12:57 (3h 26m) — Mixed Development & Research
    Top app: Codex  |  219 context switches
  • 12:57–13:12 (15m) — X.com, YouTube, Email

You › how focused was I this week?

  Your best day: Tuesday — 71% focus score, 1h 20m longest streak.
  Wednesday: 634 context switches. Scattered.
  Total active time Monday: 12h 21m (Dia + Codex dominated).

You › find all my coding sessions from the last 3 days

  Found 8 sessions matching "development":
  • 2026-03-31 09:30 (3h 26m) — Mixed Development & Research
  • 2026-03-30 18:23 (41m) — Building & Testing
  • 2026-03-29 14:10 (2h 12m) — Cursor + GitHub work
  ...

Install in 30 seconds

Option A — Auto-installer (recommended)

Detects all your MCP clients and configures them automatically:

git clone https://github.com/irachrist1/daylens-mcp.git
cd daylens-mcp && bash install.sh

That's it. Restart your AI client and ask "what was I working on today?"


Option B — Claude Code one-liner

git clone https://github.com/irachrist1/daylens-mcp.git
cd daylens-mcp && npm install && npm run build
claude mcp add daylens -- node --no-warnings $(pwd)/dist/index.js

Option C — Manual setup per client

Add to ~/.claude/mcp.json:

{
  "mcpServers": {
    "daylens": {
      "type": "stdio",
      "command": "node",
      "args": ["--no-warnings", "/absolute/path/to/daylens-mcp/dist/index.js"]
    }
  }
}

Or use the CLI:

claude mcp add daylens -- node --no-warnings /absolute/path/to/daylens-mcp/dist/index.js

One-click install:

Install in Cursor

Or manually add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "daylens": {
      "command": "node",
      "args": ["--no-warnings", "/absolute/path/to/daylens-mcp/dist/index.js"]
    }
  }
}

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "daylens": {
      "command": "node",
      "args": ["--no-warnings", "/absolute/path/to/daylens-mcp/dist/index.js"]
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "daylens": {
      "command": "node",
      "args": ["--no-warnings", "/absolute/path/to/daylens-mcp/dist/index.js"]
    }
  }
}

Requirements

  • Daylens installed and running on macOS
  • Node.js 22+ — check with node --version
  • At least one MCP-compatible client: Claude Code, Cursor, Windsurf, or Claude Desktop

Available tools

Once installed, your AI assistant gains access to five tools it can call automatically:

| Tool | Description | |---|---| | get_timeline | Full labeled work block timeline for any day | | get_focus_stats | Focus score (0–100%), active time, longest streak, context switches | | get_app_usage | Every app you used, ranked by time | | search_work | Search your history by keyword, app name, or category | | get_recent_activity | What you've been doing in the last N minutes |

Just ask naturally — your assistant picks the right tool automatically.


How it works

Daylens stores your activity in a local SQLite database at:

~/Library/Application Support/Daylens/daylens.sqlite

daylens-mcp opens it read-only and exposes it as MCP tools. When you ask your AI a question about your work history, it calls the appropriate tool, queries the database, and answers with your real data.

No network calls. No background processes. The server starts on demand and exits when your client closes.


Troubleshooting

Server doesn't appear in my client Fully restart your client after installing — not just a new chat window. In Claude Code, run claude mcp list to confirm it's registered.

"Database not found" error Daylens must be installed and have tracked at least one session. The database is created on first launch.

Node version error Requires Node.js 22+. Run node --version to check. Install the latest LTS from nodejs.org.

Permission denied on install.sh Run chmod +x install.sh first.


Related


License

MIT