lifeos — Claude Code MCP server: what it does, how to install
Connects your coding assistant to a self-hosted LifeOS instance to track habits, goals, tasks, expenses, and notes via API.
claude mcp add --env LIFEOS_BASE_URL=<LIFEOS_BASE_URL> --env LIFEOS_API_TOKEN=<LIFEOS_API_TOKEN> --env LIFEOS_MCP_TIMEOUT_MS=<LIFEOS_MCP_TIMEOUT_MS> --transport stdio mcp -- npx -y @edicodes/lifeos-mcpWhat lifeos does
The server runs over stdio on Node 22.9+ and communicates with a self-hosted LifeOS backend via /api/v1 HTTP requests. All data retrieval goes through a unified lifeos_query tool, which fetches dashboard metrics, habit logs, task boards, or balance summaries. Mutating actions, including creating goals or updating tasks, use dedicated tool calls with explicit approval points.
Security controls disallow plain HTTP for remote hosts; only local loopback addresses may use unencrypted traffic. Without a configured PHP backend and a token of at least 32 characters, initialization fails immediately. Confidential notes stay hidden unless explicitly requested with appropriate permissions.
What it helps with
- fetch LifeOS dashboard summaries and active tasks
- track daily habit completion
- create structured goals with milestone action items
- log expenses in Toman and inspect current finances
Example prompts for the agent
- Show my LifeOS dashboard summary
- Mark my reading habit as completed for today
- Log an expense of 450000 Toman for groceries
How to install lifeos
Platform CLI
claude mcp add --env LIFEOS_BASE_URL=<LIFEOS_BASE_URL> --env LIFEOS_API_TOKEN=<LIFEOS_API_TOKEN> --env LIFEOS_MCP_TIMEOUT_MS=<LIFEOS_MCP_TIMEOUT_MS> --transport stdio mcp -- npx -y @edicodes/lifeos-mcpReplace <…> with your own values
Platform CLI
codex mcp add mcp --env LIFEOS_BASE_URL=<LIFEOS_BASE_URL> --env LIFEOS_API_TOKEN=<LIFEOS_API_TOKEN> --env LIFEOS_MCP_TIMEOUT_MS=<LIFEOS_MCP_TIMEOUT_MS> -- npx -y @edicodes/lifeos-mcpReplace <…> with your own values
Config file
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@edicodes/lifeos-mcp"
],
"env": {
"LIFEOS_BASE_URL": "<LIFEOS_BASE_URL>",
"LIFEOS_API_TOKEN": "<LIFEOS_API_TOKEN>",
"LIFEOS_MCP_TIMEOUT_MS": "<LIFEOS_MCP_TIMEOUT_MS>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@edicodes/lifeos-mcp"
],
"env": {
"LIFEOS_BASE_URL": "<LIFEOS_BASE_URL>",
"LIFEOS_API_TOKEN": "<LIFEOS_API_TOKEN>",
"LIFEOS_MCP_TIMEOUT_MS": "<LIFEOS_MCP_TIMEOUT_MS>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e LIFEOS_BASE_URL=<LIFEOS_BASE_URL> -e LIFEOS_API_TOKEN=<LIFEOS_API_TOKEN> -e LIFEOS_MCP_TIMEOUT_MS=<LIFEOS_MCP_TIMEOUT_MS> mcp npx -y @edicodes/lifeos-mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about lifeos
How to install lifeos in Claude Code?
Run claude mcp add lifeos -e LIFEOS_BASE_URL=<LIFEOS_BASE_URL> -e LIFEOS_API_TOKEN=<LIFEOS_API_TOKEN> -- npx -y @edicodes/lifeos-mcp with your actual instance URL and API token.
What does the lifeos MCP server do?
It exposes tools for managing your self-hosted LifeOS data, including tasks, notes, habits, finances, and long-term goals.
What are the backend prerequisites for lifeos?
You need a running LifeOS PHP service, Node 22.9 or higher, and HTTPS enabled on remote domains. The API token must be at least 32 characters long.