npm package: @lifegrid/mcp-bridge
Description: MCP Bridge for LifeGrid - connect AI assistants to your personal life operating system
Author: LifeGrid
Latest version: 0.1.0

# LifeGrid MCP Bridge

Connect AI assistants (Claude, etc.) to your LifeGrid personal life operating system via the Model Context Protocol (MCP).

## Installation

```bash
npm install -g @lifegrid/mcp-bridge
```

Or run directly:

```bash
npx @lifegrid/mcp-bridge
```

## Configuration

### 1. Get an API Key

1. Log in to [LifeGrid](https://lifegrid.do)
2. Go to [Account > API Keys](https://lifegrid.do/account/api)
3. Generate a new API key

### 2. Configure Credentials

**Option A: Environment Variable**

```bash
export LIFEGRID_API_KEY="lg_..."
```

**Option B: Config File**

Create `~/.lifegrid/credentials.json`:

```json
{
  "api_key": "lg_...",
  "api_url": "https://lifegrid.do"
}
```

## Usage with Claude Desktop

Add to your Claude Desktop config (`~/.config/claude/config.json` on macOS/Linux):

```json
{
  "mcpServers": {
    "lifegrid": {
      "command": "lifegrid-mcp",
      "args": []
    }
  }
}
```

Or with npx:

```json
{
  "mcpServers": {
    "lifegrid": {
      "command": "npx",
      "args": ["@lifegrid/mcp-bridge"]
    }
  }
}
```

## Available Tools

### Task Management
- `create_task` - Create a new task
- `get_task` - Get task details
- `update_task` - Update task properties
- `complete_task` - Mark task done
- `uncomplete_task` - Reopen a task
- `defer_task` - Defer to future date/week
- `plan_task` - Schedule for date/week
- `delete_task` - Delete a task

### Project Management
- `create_project` - Create a project
- `get_project` - Get project details
- `list_projects` - List projects
- `update_project` - Update project
- `archive_project` - Archive project

### Habit Tracking
- `create_habit` - Create a habit
- `get_habit` - Get habit details
- `list_habits` - List habits
- `log_habit` - Log completion
- `update_habit` - Update habit
- `get_habit_stats` - Get detailed stats

### Strategic (OKRs)
- `create_objective` - Create objective
- `get_objective` - Get objective details
- `list_objectives` - List objectives
- `update_objective` - Update objective
- `create_key_result` - Add key result
- `update_key_result` - Update KR progress
- `delete_key_result` - Delete KR
- `get_strategic_overview` - Full OKR view

### Life Areas
- `list_life_areas` - List all areas
- `get_life_area` - Get area details
- `create_life_area` - Create area
- `update_life_area` - Update area

### Queries
- `search` - Search everything
- `get_overview` - Daily/weekly overview
- `get_inbox` - Inbox items
- `get_queue` - Work queue
- `get_waiting` - Waiting items
- `get_deferred` - Deferred items

### Planning
- `get_planning_context` - Weekly planning data
- `get_weekly_reflection` - Week review data
- `save_week_review` - Mark week reviewed

### Tags
- `list_tags` - List all tags
- `create_tag` - Create tag
- `update_task_tags` - Set task tags

## Available Resources

- `lifegrid://today` - Today's dashboard
- `lifegrid://week` - Current week plan
- `lifegrid://week/{iso_week}` - Specific week
- `lifegrid://inbox` - Inbox items
- `lifegrid://queue` - Work queue
- `lifegrid://projects` - Active projects
- `lifegrid://projects/{id}` - Project details
- `lifegrid://habits` - Habit dashboard
- `lifegrid://habits/{id}` - Habit details
- `lifegrid://strategic` - OKR hierarchy
- `lifegrid://life-areas` - Life balance
- `lifegrid://life-areas/{id}` - Area details
- `lifegrid://deferred` - Deferred items
- `lifegrid://waiting` - Waiting items

## Available Prompts

- `daily_review` - End-of-day reflection
- `weekly_planning` - Plan your week
- `progress_check` - Check goal progress
- `quick_capture` - Rapid task entry
- `focus_session` - Get work recommendations

## Example Conversations

**"What's on my plate today?"**
```
Claude will fetch lifegrid://today and summarize your tasks, habits, and schedule.
```

**"Add a task to review the Q1 budget in my Finance project"**
```
Claude will find the Finance project and create a task in it.
```

**"How am I doing on my health goals?"**
```
Claude will fetch the strategic overview and summarize Health area progress.
```

**"Log my morning meditation"**
```
Claude will find the meditation habit and log a completion.
```

**"Defer the dentist task to next week"**
```
Claude will search for the task and defer it.
```

## Development

```bash
# Install dependencies
npm install

# Build
npm run build

# Run in development
npm run dev

# Type check
npm run typecheck
```

## License

MIT