Integrations & Read API
Integrations & Read API
Hand an external AI agent or script a capability grant (API key) so it can read your journal, bloods, daily plans, 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
get_snapshotor promptpregnancy_briefingonce connected.
Revoke any time. Revoke all is the panic button. Share Portfolio (/account/shares) is for human read-only links — 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.
Note: claude.ai web/mobile and grok.com “Add custom connector” do not yet accept a pasted key for individual users (OAuth is planned later).
Tools include get_meta, get_context, get_journal, get_bloods, get_plans, get_plan_templates, get_profile, and get_snapshot (adaptive briefing that follows suggestedNext). Resources: beingoptimal://meta, beingoptimal://context. Prompt: pregnancy_briefing.
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.