workbrain

workbrain

Gives Claude persistent, local context about how you work, your weekly agenda, and shipped work, with automatic work logging and git integration—all stored privately on your machine.

Category
访问服务器

README

Workbrain

Your personal operating layer for AI-assisted work.

Workbrain is a local Model Context Protocol (MCP) server for Claude Code. It gives Claude persistent context about how you work, what you're focused on this week, and what you've shipped — without sending that data to the cloud or sharing it with your team.


Overview

Most AI coding setups tell the model how to behave (rules, prompts). Workbrain tells it what you're doing — and lets it keep that picture up to date as you work.

Layer What it stores Example
Playbook How you work Bug-fix approach, communication style
Agenda What you're focused on This week's priorities and deliverables
Work log What you shipped Summaries linked to agenda items
Commits Raw git activity Auto-captured via optional hook

Everything lives on your machine in ~/.workbrain/. Nothing is committed to project repos unless you choose to.


Features

  • Unified context — get_context returns playbook, agenda, work log, and commits in a single call
  • Living weekly board — Claude can add, update, and complete agenda items during a session
  • Automatic work logging — marking an agenda item done creates a linked work log entry
  • Local-first & private — SQLite + markdown on disk; no accounts, no cloud sync required
  • Cross-project — registered at user scope; follows you across every repo
  • Git integration — optional post-commit hook records commits automatically
  • CLI — check your week from the terminal without opening Claude

Requirements

  • Node.js 22+ (uses built-in node:sqlite — no native dependencies)
  • Claude Code CLI or extension (Cursor, VS Code, or terminal)

Quick start

git clone https://github.com/himanshu-sharma-55/work-brain.git
cd work-brain
npm install
node bin/install.js

Register the MCP server (server name is workbrain; repo folder is work-brain):

claude mcp add --scope user workbrain -- node /absolute/path/to/work-brain/src/index.js

Add to your shell profile (~/.zshrc or ~/.bashrc):

export WORKBRAIN_ROOT=/absolute/path/to/work-brain

Verify in Claude Code: type /mcp and confirm workbrain is connected.

Edit your playbook: ~/.workbrain/playbook.md


How it works

┌─────────────────────────────────────────────────────────┐
│                     Claude Code                         │
│              (Cursor / VS Code / CLI)                   │
└────────────────────────┬────────────────────────────────┘
                         │ MCP (stdio)
                         ▼
┌─────────────────────────────────────────────────────────┐
│                  Workbrain Server                       │
│  get_context · get_agenda · log_work · get_commits …   │
└────────────────────────┬────────────────────────────────┘
                         │
          ┌──────────────┼──────────────┐
          ▼              ▼              ▼
   playbook.md       data.db      git hook (optional)
   (how you work)   (agenda,       (commit capture)
                     work log,
                     commits)
          └──────────────┴──────────────┘
                         │
                    ~/.workbrain/
                    (or WORKBRAIN_HOME)

Claude calls Workbrain tools on demand — your rules aren't loaded into every message, keeping context lean until it's needed.


MCP tools

Tool Description
get_context Recommended entry point. Playbook, current agenda, recent work log, and commits
get_playbook Read your personal playbook
update_playbook Replace or append to your playbook
get_agenda Weekly board: focus, coming up, expected
add_agenda_item Add an item to the board
update_agenda_item Update status, title, estimate, etc. Auto-logs work when marked done
delete_agenda_item Remove an agenda item
rollover_agenda Move unfinished items from last week to the current week
get_weekly_summary Agenda stats, work log, and commits for a given week
get_work_log Recent work summaries
log_work Log what you shipped (optionally linked to an agenda item)
get_commits Recent commits captured by the git hook

Recommended session flow

Add this to your personal Cursor or Claude rules:

At the start of a work session, call get_context. When we finish a clear task, update the agenda and log work. Marking an agenda item done is enough — it auto-logs.

Example prompts

You say Workbrain does
"What's my focus this week?" Calls get_context
"Mark CSV export as in progress" Calls update_agenda_item
"What did I ship this week?" Calls get_weekly_summary
"Roll over unfinished items" Calls rollover_agenda
"How do I usually fix bugs?" Reads playbook

CLI

Check status without Claude:

node bin/workbrain.js status     # current week at a glance
node bin/workbrain.js summary    # full week recap
npm run status                   # shortcut via package script

Configuration

Environment variables

Variable Default Description
WORKBRAIN_HOME ~/.workbrain Data directory (playbook, database)
WORKBRAIN_ROOT — Path to the work-brain repo; required for git hooks

Data directory layout

~/.workbrain/
├── playbook.md    # How you work (markdown)
├── data.db        # Agenda, work log, commits (SQLite)
└── git-template/  # Git hook template (created by install)

Custom data directory

export WORKBRAIN_HOME=/path/to/shared/workbrain-data
claude mcp add --scope user workbrain -- \
  env WORKBRAIN_HOME=/path/to/shared/workbrain-data \
  node ~/work-brain/src/index.js

Git integration

node bin/install.js configures a global git template so new repositories automatically include the post-commit hook.

For an existing repository:

export WORKBRAIN_ROOT=/path/to/work-brain   # in ~/.zshrc
node /path/to/work-brain/bin/setup-git-hook.js /path/to/repo

Each commit records hash, repo, branch, message, and files changed into ~/.workbrain/data.db.


Multi-machine setup

Clone and register on each machine:

git clone https://github.com/himanshu-sharma-55/work-brain.git ~/work-brain
cd ~/work-brain && npm install && node bin/install.js
claude mcp add --scope user workbrain -- node ~/work-brain/src/index.js

Each machine maintains its own ~/.workbrain/ by default. To sync data:

Method Approach
Cloud folder Symlink ~/.workbrain to iCloud, Dropbox, etc.
Dotfiles repo Track playbook.md; copy data.db periodically
Shared path Set WORKBRAIN_HOME to the same location on both machines

Cursor setup

Workbrain uses Claude Code MCP, not Cursor's ~/.cursor/mcp.json.

  1. Install the Claude Code extension in Cursor
  2. Open the integrated terminal
  3. Run claude mcp add (see Quick start)
  4. In the Claude panel: /mcp → enable workbrain

Privacy & scope

Workbrain is designed for individual use:

  • MCP is registered with --scope user — not tied to any project repo
  • Personal data never leaves your machine unless you sync it yourself
  • Do not commit .mcp.json to shared team repositories

Troubleshooting

Issue Resolution
claude command not found Install Claude Code CLI or use the extension terminal
Server missing from /mcp Re-run claude mcp add --scope user workbrain -- node /path/to/work-brain/src/index.js
Broken path after moving the repo claude mcp remove workbrain, then re-add with the updated path
Commits not recording Verify echo $WORKBRAIN_ROOT and that .git/hooks/post-commit exists
Server won't start Run node src/index.js manually; check Node version (node -v ≥ 22)

Development

npm install
npm start              # run MCP server (stdio)
npm run install:local  # install + init data dir + git template
npm run status         # CLI status check

For local development with a global CLI alias:

cd work-brain && npm link
claude mcp add --scope user workbrain -- workbrain

Naming

Name Used for
work-brain GitHub repository and local clone directory
workbrain MCP server name, npm package, data dir (~/.workbrain)
WORKBRAIN_* Environment variable prefix

License

LICENSE

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选