Lifeos

io.github.edrisranjbar由 GitHub 帳號 edrisranjbar 發布v2.0.0更新於 Oct 24, 2026

Self-hosted life OS: habits, goals, tasks, finances and notes over a token-protected API.

已驗證STDIO僅桌面效率與工作流金融

概覽

AI 產生的概覽

本機 stdio MCP 伺服器,讓助理透過受權杖保護的 API 讀寫自架 LifeOS 的目標、任務、習慣、財務、筆記與記事本。

可以做什麼
  • 透過單一唯讀查詢工具讀取儀表板、目標、任務、習慣、今日習慣、財務摘要、支出、收入、筆記與記事本文件
  • 建立、更新與刪除目標、任務和筆記,並完成或取消完成任務與習慣
  • 以托曼為單位記錄支出與設定收入,可依期間篩選
  • 建立、更新與刪除記事本文件,內文支援 markdown 或 HTML
  • 寫入前可用來源、目標與看板篩選條件釐清任務與目標 ID 的歧義
適用情境
適合自架 LifeOS、希望助理查看儀表板、規劃目標與任務、打卡習慣、記錄支出或起草筆記,而不必開啟網頁介面的情境。它不是託管服務,沒有可連線的 LifeOS API 就無法使用。
執行需求
需要 Node.js 22.9 以上(建議 24)在本機以 stdio 執行 npm 套件 @edicodes/lifeos-mcp。需要已部署的 LifeOS API 及其 /api/v1 端點,並設定 LIFEOS_BASE_URL(HTTPS,開發時可用 32 字元專用 LIFEOS_API_TOKEN。LIFEOS_MCP_TIMEOUT_MS 為選用。不提供遠端 MCP 網址。
安裝前請注意
API 權杖屬於機密,不要寫進提交的用戶端設定,建議以環境變數轉送。刪除會永久移除目標、任務、筆記與記事本文件,並標示為破壞性操作,是否確認由用戶端決定。機密筆記預設隱藏,除非要求 include_secret 且伺服器允許。逾時可能發生在寫入已送出之後,重試建立或記錄支出前應先檢查已儲存狀態。回傳的 HTML 應視為資料。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Lifeos,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

LifeOS MCP server

Local stdio server using the official MCP SDK, Node 22.9+ (24 recommended) and Zod validation. All tools call LifeOS /api/v1 over HTTP. No SQL, filesystem, arbitrary state-key, config or credential-management tools are exposed.

Install and run

sh
cd mcpnpm cicp .env.example .envnpm start

Set the ignored .env:

dotenv
LIFEOS_BASE_URL=https://lifeos.example.comLIFEOS_API_TOKEN=replace-with-your-dedicated-random-tokenLIFEOS_MCP_TIMEOUT_MS=10000

Use the same dedicated token configured in PHP (at least 32 characters; generate 32 random bytes). Install the API first. Remote origins require verified HTTPS; HTTP is permitted only for localhost/127.0.0.1/::1 development. URL credentials, query strings and subpaths are rejected. Redirects are rejected to prevent forwarding credentials. Timeout covers response parsing and must be 100–120000 ms. Stdout contains only protocol messages; startup/errors do not log tokens or upstream response bodies.

npm start loads .env from mcp. Clients that launch node src/index.js directly must supply environment values. Do not commit real client configs or tokens.

Client configuration

The server is published on npm as @edicodes/lifeos-mcp and listed in the MCP Registry as io.github.edrisranjbar/lifeos, so clients can run it without cloning the repo:

json
{  "mcpServers": {    "lifeos": {      "command": "npx",      "args": ["-y", "@edicodes/lifeos-mcp"],      "env": {        "LIFEOS_BASE_URL": "https://lifeos.example.com",        "LIFEOS_API_TOKEN": "replace-with-your-dedicated-random-token"      }    }  }}

To run your own checkout instead, point the client at src/index.js:

json
{  "mcpServers": {    "lifeos": {      "command": "node",      "args": ["/absolute/path/lifeos/mcp/src/index.js"],      "env": {        "LIFEOS_BASE_URL": "https://lifeos.example.com",        "LIFEOS_API_TOKEN": "replace-with-your-dedicated-random-token"      }    }  }}

For Codex, set the token in its launch environment and forward it in user ~/.codex/config.toml, following the official OpenAI documentation:

toml
[mcp_servers.lifeos]command = "node"args = ["/absolute/path/lifeos/mcp/src/index.js"]env_vars = ["LIFEOS_API_TOKEN"]
[mcp_servers.lifeos.env]LIFEOS_BASE_URL = "https://lifeos.example.com"LIFEOS_MCP_TIMEOUT_MS = "10000"

Use actual absolute paths. No client configuration is installed automatically. This implementation is stdio only; clients requiring a remote MCP URL need a separate authenticated transport bridge/server. /api/v1 is not an MCP transport URL.

Tools

DomainTools
Read anythinglifeos_query
Goalslifeos_create_goal, lifeos_update_goal, lifeos_delete_goal
Taskslifeos_create_task, lifeos_update_task, lifeos_complete_task, lifeos_delete_task
Habitslifeos_complete_habit, lifeos_uncomplete_habit
Financelifeos_log_expense, lifeos_set_income
Noteslifeos_create_note, lifeos_update_note, lifeos_delete_note

All reads go through the read-only lifeos_query tool. Its type picks what to read: dashboard, goals, goal, tasks, task, habits, today_habits, finance_summary, expenses, incomes, notes or note. goal, task and note require id. tasks takes optional source, goal_id, board_id and column_id filters; task takes source, goal_id and board_id to resolve ambiguous IDs. finance_summary, expenses and incomes take an optional period. notes and note take include_secret. Parameters that don't apply to the chosen type are rejected before any request is made. Writes stay as separate tools, so each one gets its own approval prompt and destructive ones stay marked.

Upgrading from 1.x: version 2.0.0 replaces the 12 read tools (lifeos_dashboard, lifeos_list_goals, lifeos_get_goal, lifeos_list_tasks, lifeos_get_task, lifeos_list_habits, lifeos_get_today_habits, lifeos_finance_summary, lifeos_list_expenses, lifeos_list_incomes, lifeos_list_notes, lifeos_get_note) with lifeos_query. For example, lifeos_get_goal with { id } becomes lifeos_query with { type: "goal", id }. Clients that call the old names directly need updating; clients that discover tools at startup only need a restart.

Updates take id and a patch object. Goal measures/tasks supplied in a patch replace their lists; omitted fields survive. Task creation requires source and container IDs. Task update/complete/delete optionally take source/container filters to resolve ambiguous IDs; query tasks first to obtain IDs. Finance amounts are Toman; period defaults to active. Habit dates default to Tehran today. Completion/uncompletion/set-income are idempotent. Deletes permanently remove data and are explicitly marked destructive; approval behavior is controlled by the client.

Secret notes are omitted by default, including direct lookup. Explicit include_secret: true on a notes/note query or on update/delete requires server permission. Dashboard never includes secrets. No tool returns the token. Success returns concise JSON text and structured {data: ...}; failures have isError: true and safe code/message/status.

Example prompts:

  • Show me my LifeOS dashboard.
  • Create a SMART goal called Build dream home studio, due in three months.
  • Add Buy acoustic panels as a task to that goal.
  • Mark Reading complete for today.
  • Log a 450,000 Toman food expense.
  • Show my current financial balance.
  • Create a note called Studio Ideas.

Reload the browser after external edits. Stale UI saves return conflicts instead of replacing API changes. A network timeout can happen after a write commits; inspect saved state before retrying non-idempotent create/expense calls.

Tests

sh
npm test

Mocked errors/timeouts/malformed responses, schemas and a real stdio handshake run by default. For disposable MySQL/API integration, follow the root README and set LIFEOS_TEST_BASE_URL=http://localhost:8000. Integration refuses remote hosts and requires tests/mysql_fixture.php; it never loads production config.

Notepad

Read via lifeos_query types notepad_documents (list) and notepad_document (id). Write via lifeos_create_notepad_document, lifeos_update_notepad_document (id, patch), and lifeos_delete_notepad_document (id). Fields: title, body, format (markdown/html). Body replaces the source; omitted fields are preserved. Treat returned HTML as data. Reconnect the MCP client after updating its server.

來源:mcp/README.md,提交 5dc08c2

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v2.0.0最新Oct 10, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分