workbrain
Workbrain
你的 AI 辅助工作的个人操作层。
Workbrain 是一个本地 Model Context Protocol (MCP) 服务器,用于 Claude Code。它让 Claude 持续了解你的工作方式、本周关注的重点以及你已完成的工作——而无需将数据发送到云端或与你的团队共享。
概述
大多数 AI 编码设置告诉模型如何表现(规则、提示)。Workbrain 告诉它你在做什么——并让它随着你的工作不断更新这幅图景。
层 | 存储内容 | 示例 |
Playbook | 你的工作方式 | Bug 修复方法、沟通风格 |
Agenda | 你关注的重点 | 本周的优先事项和交付物 |
Work log | 你已完成的工作 | 关联到 agenda 条目的摘要 |
Commits | 原始 git 活动 | 通过可选钩子自动捕获 |
所有数据都保存在你机器上的 ~/.workbrain/ 目录中。除非你主动选择,否则不会提交到项目仓库。
Related MCP server: Melchizedek
功能特性
统一上下文 —
get_context一次调用即可返回 playbook、agenda、work log 和 commits实时周度看板 — Claude 可以在会话期间添加、更新和完成 agenda 条目
自动工作日志 — 将 agenda 条目标记为完成会自动创建关联的 work log 条目
本地优先且私密 — 磁盘上的 SQLite + markdown;无需账户,无需云同步
跨项目 — 在用户范围内注册;跟随你进入每个仓库
Git 集成 — 可选的 post-commit 钩子自动记录提交
CLI — 无需打开 Claude 即可从终端查看你的一周
环境要求
Node.js 22+(使用内置的
node:sqlite——无原生依赖)Claude Code CLI 或扩展(Cursor、VS Code 或终端)
快速开始
git clone https://github.com/himanshu-sharma-55/work-brain.git
cd work-brain
npm install
node bin/install.js注册 MCP 服务器(服务器名称为 workbrain;仓库文件夹为 work-brain):
claude mcp add --scope user workbrain -- node /absolute/path/to/work-brain/src/index.js添加到你的 shell 配置文件(~/.zshrc 或 ~/.bashrc):
export WORKBRAIN_ROOT=/absolute/path/to/work-brain在 Claude Code 中验证:输入 /mcp 并确认 workbrain 已连接。
编辑你的 playbook:~/.workbrain/playbook.md
工作原理
┌─────────────────────────────────────────────────────────┐
│ 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 按需调用 Workbrain 工具——你的规则不会加载到每条消息中,从而在需要之前保持上下文精简。
MCP 工具
工具 | 描述 |
| 推荐入口。 Playbook、当前 agenda、最近的 work log 和 commits |
| 读取你的个人 playbook |
| 替换或追加到你的 playbook |
| 周度看板:焦点、即将进行、预期 |
| 向看板添加条目 |
| 更新状态、标题、预估等。标记为完成时自动记录工作 |
| 删除 agenda 条目 |
| 将上周未完成的条目移至本周 |
| 给定周的 agenda 统计、work log 和 commits |
| 最近的工作摘要 |
| 记录你已完成的工作(可选地关联到 agenda 条目) |
| 由 git 钩子捕获的最近提交 |
推荐的会话流程
将此添加到你的个人 Cursor 或 Claude 规则中:
在工作会话开始时,调用
get_context。当我们完成一个明确的任务时,更新 agenda 并记录工作。将 agenda 条目标记为完成即可——它会自动记录。
示例提示
你说 | Workbrain 会做 |
"我这周的重点是什么?" | 调用 |
"将 CSV 导出标记为进行中" | 调用 |
"我这周完成了什么?" | 调用 |
"结转未完成的条目" | 调用 |
"我通常如何修复 bug?" | 读取 playbook |
CLI
无需 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配置
环境变量
变量 | 默认值 | 描述 |
|
| 数据目录(playbook、数据库) |
| — | work-brain 仓库的路径;git 钩子必需 |
数据目录结构
~/.workbrain/
├── playbook.md # How you work (markdown)
├── data.db # Agenda, work log, commits (SQLite)
└── git-template/ # Git hook template (created by install)自定义数据目录
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.jsGit 集成
node bin/install.js 配置全局 git 模板,使新仓库自动包含 post-commit 钩子。
对于现有仓库:
export WORKBRAIN_ROOT=/path/to/work-brain # in ~/.zshrc
node /path/to/work-brain/bin/setup-git-hook.js /path/to/repo每次提交都会将哈希、仓库、分支、消息和更改的文件记录到 ~/.workbrain/data.db 中。
多机器设置
克隆并在每台机器上注册:
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默认情况下,每台机器维护自己的 ~/.workbrain/。要同步数据:
方法 | 方式 |
云文件夹 | 将 |
Dotfiles 仓库 | 跟踪 |
共享路径 | 在两台机器上将 |
Cursor 设置
Workbrain 使用 Claude Code MCP,而不是 Cursor 的 ~/.cursor/mcp.json。
在 Cursor 中安装 Claude Code 扩展
打开集成终端
运行
claude mcp add(参见快速开始)在 Claude 面板中:
/mcp→ 启用 workbrain
隐私与范围
Workbrain 专为个人使用而设计:
MCP 使用
--scope user注册——不与任何项目仓库绑定个人数据永远不会离开你的机器,除非你自己同步
不要将
.mcp.json提交到共享的团队仓库
故障排除
问题 | 解决方法 |
| 安装 Claude Code CLI 或使用扩展终端 |
服务器在 | 重新运行 |
移动仓库后路径损坏 |
|
提交未记录 | 验证 |
服务器无法启动 | 手动运行 |
开发
npm install
npm start # run MCP server (stdio)
npm run install:local # install + init data dir + git template
npm run status # CLI status check对于使用全局 CLI 别名的本地开发:
cd work-brain && npm link
claude mcp add --scope user workbrain -- workbrain命名
名称 | 用途 |
| GitHub 仓库和本地克隆目录 |
| MCP 服务器名称、npm 包、数据目录( |
| 环境变量前缀 |
许可证
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityAmaintenanceProvides a persistent "second brain" for Claude featuring zero-latency hot caching, semantic cold storage, and automatic pattern mining from activity logs. It enables users to store, search, and automatically extract project facts and code patterns for enhanced contextual recall.567MIT
- AlicenseAqualityBmaintenancePersistent memory for Claude Code. Automatically indexes every conversation and provides production-grade hybrid search (BM25 + vectors + reranker) via MCP tools. 100% local, zero config, zero API keys, zero invoice.16557MIT
- AlicenseAqualityDmaintenanceCross-surface persistent memory for Claude. Bridges context between Claude Chat, Code, and Cowork via local SQLite with full-text search.6146MIT
- AlicenseNot gradedqualityDmaintenanceProvides persistent memory for Claude Code, automatically extracting and surfacing relevant context from past sessions to avoid re-explaining issues and decisions.MIT
Related MCP Connectors
Persistent context for Claude. Your AI always knows your projects and next actions across sessions.
Connect your team's living knowledge base — docs, data, issues, CRM — to Claude and ChatGPT.
Give your AI agent a persistent map of your project's structure, dependencies, and bugs.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/himanshu-sharma-55/work-brain'
If you have feedback or need assistance with the MCP directory API, please join our Discord server