Integrations & Read API
Integrations & Read API
Hand an external AI agent or script a capability grant (API key) so it can read your journal, blood results, plans and targets, tasks, wishlist, scholar rank, and profile, without copying JSON by hand.
Where to start
- Open Account → Integrations on the main app (
/account/integrations). - Acknowledge health-data consent, then use Connect Claude, Connect Cursor, or Connect Grok (each mints its own labeled key).
- Copy the remote MCP URL + auth snippet for your platform (no clone, no npm install).
- Optional: click Test connection before leaving the browser. Prefer tool
check_my_dayor promptpregnancy_briefingonce connected.
Revoke any time. Revoke all is the panic button. Human read-only handoffs use share links (/account/shares) — different from API keys.
Remote MCP (recommended)
Hosted endpoint (same channel as the Read API):
- Production:
https://api.beingoptimal.org/mcp - Development:
https://api-dev.beingoptimal.org/mcp
Send Authorization: Bearer bo_live_…. Works with Claude Desktop, Claude Code, Cursor, and Grok CLI/Build.
Web connectors: claude.ai / ChatGPT “Add custom connector” use OAuth consent on this site (sign in → Allow). No key paste for those hosts. Desktop and CLI still mint a bearer key above.
Tools include list_capabilities, check_my_day (adaptive briefing that follows suggestedNext), get_pregnancy_overview, get_daily_journal, get_blood_results, get_nutrition_plan, get_saved_meal_plans, get_my_nutrition_targets, plus compute/read tools (get_ingredient_nutrients, simulate_meal_swap, suggest_day_fixes, explain_nutrient, get_my_timeline, get_environment_info, search_community). Resources: beingoptimal://capabilities, beingoptimal://pregnancy-overview. Prompts: pregnancy_briefing, daily_checkin, what_if_swap, ingredient_deep_dive.
Advanced: local stdio MCP
- Expand Advanced / offline setup on the mint success panel and download the stdio MCP config (embeds your key in
env— keep private). - Copy the
integrations/mcpfolder from the Being Optimal repo (or install@beingoptimal/mcpafter it is published), runnpm installinside it. - Set
argsto the absolute path ofintegrations/mcp/src/server.mjs. - Set
BEING_OPTIMAL_API_BASEto your channel (https://api.beingoptimal.orgorhttps://api-dev.beingoptimal.org).
What agents get
- Hydrated meal lines (
label/unit/basis) on journal and plans - Blood markers with ranges, flags, and trimester targets (units converted when possible)
- Weak
ETag+If-None-Match→304when nothing changed - HATEOAS
links(self,docs,related,next)
API hosts
- Production:
https://api.beingoptimal.org - Development:
https://api-dev.beingoptimal.org
Full reference: the repo guide docs/API.md and OpenAPI at docs/api/openapi.yaml.
Safety
- Keys are shown once; only a display prefix is stored.
- Reads are audited (who/what/when).
- Server-to-server only — do not embed keys in browsers.
- One key binds to one environment (same model as share links).
- Grant columns (scopes/hash) are immutable after mint; revoke is permanent.