# Bók Lífsins API

> Personal life archiving system for Ómar Örn Magnússon — stories, photos, health, voice calls, and AI-powered memory.

## MCP Server

- Endpoint (Streamable HTTP): https://mcp.2076.is/mcp (Streamable HTTP)
- Endpoint (SSE): https://mcp.2076.is/sse (SSE transport)
- Auth: OAuth 2.0 (recommended) or Bearer token (WORKER_API_TOKEN)
- Protocol: Model Context Protocol (MCP) 2025-03-26
- 89 tools across 13 categories
- Use `/mcp` for ChatGPT/custom GPT connectors and `/sse` for Claude Desktop/mobile
- If a client supports mode filtering, prefer smaller manifests such as `?mode=memory` or `?mode=memory,people`
- If tools appear to be missing, reconnect the server and start a new chat/session before assuming a tool is unavailable

## Mode-Based Tool Filtering

Connect with `?mode=` query parameter to load only relevant tools:

- `?mode=memory` — 10 tools: search, save story/diary, context, patterns, stats
- `?mode=people` — 8 tools: list, describe, lookup by phone, create, update
- `?mode=photos` — 10 tool: photo browsing with filters
- `?mode=health` — 8 tools: medication, blood pressure, weight, trends, correlations
- `?mode=voice` — 20 tools: call history, outbound calls, SMS, work orders, telephony
- `?mode=timeline` — 5 tools: timeline, sliding doors, songs, artworks
- `?mode=slideshow` — 6 tools: plan, create, render, status, cancel
- `?mode=flytiminni` — 7 tools: session memory KV, latest work order, work orders, xstats reporting
- `?mode=xstats` — 1 tool: xstats session reporting

Combine modes: `?mode=memory,people`

## Common Write Flows

- `save_story` — create a new story; minimum useful payload is `title` + `content`
- `update_story` — update an existing story by `id`; send only the fields that should change
- `save_diary` — save a diary entry
- For story cleanup/import work, prefer `get_stories` or `search_memory` first, then `update_story`

## REST API

Public (no auth):
- /api/random — seed data for story generation
- /api/random/family?audience=kids&tone=warm — family-safe seeder payload
- /api/random/adult?intensity=medium&tone=reflective — mature seeder payload
- /api/photos — photos with descriptions for visual style seeds
- /api/capabilities — full API discovery + data stats
- /api/stats — quick overview
- GET /api/story/pool?genre=&location=&audience=&age_band= — claim pre-generated story starter
- GET /api/story/pool/status — pool monitoring

Protected (Bearer token):
- POST /api/search
- GET/POST /api/stories
- GET /api/stories/:id
- GET/POST /api/diary
- GET/POST /api/patterns
- GET /api/people
- GET /api/people/describe
- GET /api/timeline
- GET /api/context
- POST /api/audio
- POST /api/session
- POST /api/session/message
- POST /api/slideshow/plan
- POST /api/slideshow/project
- GET /api/slideshow/project/:project_id
- PUT /api/slideshow/project/:project_id
- POST /api/slideshow/render
- GET /api/slideshow/render/:job_id
- POST /api/slideshow/render/:job_id/cancel
- GET /api/health/reminders
- POST /api/health/log/medication
- POST /api/health/log/bp
- POST /api/health/log/weight
- GET /api/health/trends
- GET /api/health/correlations
- POST /api/health/diary
- POST /api/health/expense
- POST /api/story/pool/fill
- POST /tool

Admin:
- POST /api/admin/tech-tag?batch=5 — AI-classify tech conversations
- POST /api/admin/extract-snippets?batch=3 — Extract code snippets
- POST /api/admin/build-skills — Build skill proficiency map
- GET /api/admin/tech-progress — Pipeline status

## OAuth 2.0

- Discovery: GET /.well-known/oauth-authorization-server
- Registration: POST /oauth/register (RFC 7591 Dynamic Client Registration)
- Authorization: GET /oauth/authorize (PKCE S256 required)
- Token: POST /oauth/token
- Works with ChatGPT Actions and Claude Desktop

## Discovery

- GET /llms.txt — concise LLM-facing overview
- GET /llms-full.txt — detailed LLM-facing reference
- GET /.well-known/openapi.json — curated OpenAPI schema
- GET /.well-known/openapi-full.json — full OpenAPI schema
- GET /.well-known/oauth-authorization-server
- GET /.well-known/oauth-protected-resource
- GET /.well-known/jwks.json
- GET /robots.txt

## Universal Clients

- ChatGPT: https://mcp.2076.is/mcp
- Claude Desktop/mobile: https://mcp.2076.is/sse
- Gemini / tool bridge clients: https://mcp.2076.is/mcp or https://mcp.2076.is/tool
- Web/mobile apps: https://mcp.2076.is/api/*

## Links

- Privacy: https://mcp.2076.is/privacy
- Health: https://mcp.2076.is/health
- Owner: 2076 ehf, Reykjavík, Iceland (omar@2076.is)
