lifeos-mcp
LifeOS MCP
为任何 AI 智能体提供对你 LifeOS 知识库的只读访问权限 —— 适用于 Claude Desktop、Claude Code、Cursor、ChatGPT、Codex 或任何兼容 MCP 的客户端。
该服务器从 ~/lifeos/ 读取内容,并通过 lifeos:// 资源 URI 和 lifeos__* 工具名称呈现所有内容。
安装
发布后(即将推出)
npx lifeos-mcp从源码安装(当前)
git clone https://github.com/bwats/lifeos-mcp
cd lifeos-mcp
npm install && npm run build
node bin/lifeos-mcp.js从源码全局安装
cd ~/lifeos-mcp
npm install -g .
lifeos-mcp # starts the MCP server on stdio它暴露了什么
lifeos-mcp 为任何兼容 MCP 的 AI 客户端提供对以下内容的直接只读访问:
表面 | ~/lifeos/ 中的路径 | 工具 |
身份 |
|
|
偏好 |
|
|
技能 |
|
|
项目 |
|
|
维基 |
|
|
规则 |
|
|
任意文件 | (路径安全) |
|
搜索 | (全文) |
|
模式
调用 | 发生什么 |
| 在 stdio 上启动 MCP 服务器(默认) |
| 在 stdio 上启动 MCP 服务器(显式) |
| 列出 |
| 验证仪式规范文件 |
| 将仪式渲染到目标工具中 |
| 显示所有子命令和选项 |
配置 MCP 客户端
Claude Desktop
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"lifeos": {
"command": "npx",
"args": ["lifeos-mcp"]
}
}
}或者从源码安装:
{
"mcpServers": {
"lifeos": {
"command": "node",
"args": ["/Users/yourname/lifeos-mcp/bin/lifeos-mcp.js"]
}
}
}Cursor (settings.json)
{
"mcpServers": {
"lifeos": {
"command": "node",
"args": ["/Users/yourname/lifeos-mcp/bin/lifeos-mcp.js"]
}
}
}Claude Code (~/.claude/settings.json)
{
"mcpServers": {
"lifeos": {
"command": "node",
"args": ["/Users/yourname/lifeos-mcp/bin/lifeos-mcp.js"]
}
}
}OpenAI Codex (codex.json)
{
"mcpServers": {
"lifeos": {
"command": "node",
"args": ["/Users/yourname/lifeos-mcp/bin/lifeos-mcp.js"]
}
}
}自定义 LifeOS 路径
传递 --lifeos-path 或设置 LIFEOS_PATH 环境变量:
{
"mcpServers": {
"lifeos": {
"command": "node",
"args": [
"/Users/yourname/lifeos-mcp/bin/lifeos-mcp.js",
"--lifeos-path", "/custom/path/to/lifeos"
]
}
}
}环境变量
变量 | 默认值 | 描述 |
|
| LifeOS 根目录的绝对路径 |
工具
工具 | 描述 |
| 检查服务器健康状况和 LifeOS 可用性 |
| 读取 |
| 读取 |
| 列出 |
| 读取指定技能的文档 |
| 列出 |
| 读取特定的规则文件 |
| 列出 |
| 读取特定的项目定义 |
| 递归列出所有维基页面路径 |
| 按路径读取维基页面 |
| 对所有 LifeOS 文件进行全文搜索 |
| 通过相对路径读取 |
| 在两个知识节点之间提出类型化的语义边 |
| 接受提议的边(需要写入许可) |
| 拒绝提议的边(需要写入许可) |
| 列出待处理的边提议(始终只读) |
资源
URI | 描述 |
| LifeOS 身份配置文件 ( |
| 用户偏好设置 ( |
|
|
|
|
|
|
|
|
所有模板资源都支持列表查询 — 客户端可以枚举可用资源。
CLI 子命令
# List all rituals with id, title, and trigger summary
lifeos-mcp list
# Validate a ritual spec (structural check)
lifeos-mcp validate ~/lifeos/cadence/rituals/morning-review.md
# Render a ritual to a harness
lifeos-mcp render ~/lifeos/cadence/rituals/morning-review.md --to openclaw
lifeos-mcp render ~/lifeos/cadence/rituals/morning-review.md --to claude-code渲染器接口(可插拔)
第三方渲染器通过 registerRenderer 在运行时插入:
import { registerRenderer } from "lifeos-mcp/dist/renderers/index.js";
registerRenderer({
name: "my-harness",
async render(spec, body, ctx) {
return {
files: [{ path: "/out/job.json", content: JSON.stringify(spec) }],
summary: `Rendered ${spec.id} to my-harness`,
};
},
});内置渲染器:openclaw (cron 任务 JSON), claude-code (斜杠命令 + launchd plist)。
安全性
所有文件路径都经过验证,确保在 LifeOS 根目录内 — 不可能发生路径遍历。
服务器默认只读;写入工具 (
lifeos__propose_edge,lifeos__accept_edge,lifeos__reject_edge) 需要通过~/Library/Application Support/LifeOS/mcp-write-config.json显式许可。仅可访问
~/lifeos/(或LIFEOS_PATH) 下的文件。
构建
cd ~/lifeos-mcp
npm install
npm run build
# Output: dist/ + bin/lifeos-mcp.js许可证
MIT
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/bwats/lifeos-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server