Building integrations
Third-party application pattern
Run OAuth in the user’s browser and store tokens securely in your backend or native credential store. Use the discovered MCP schemas. Start with get_account_context, read only the data needed for the user’s request, then present an explicit edit before calling a write tool.
Use a backend for third-party web applications: the current browser Origin allowlist does not admit arbitrary sites. A connection represents one user. Never share tokens or data caches across users.
External references
create_behavior accepts external_ref for a calling client’s record identifier. References are scoped to that account and client, so they are not a global lookup or a public cross-client identity. Use an idempotency key for uncertain creation results. See create_behavior for constraints.
Incremental reads
list_behaviors, list_categories and list_occurrences accept updated_since. Follow each next_cursor and preserve filters. Save your read watermark only after processing the full result. Reconcile by stable record ID and revision, not title.
These reads are foundations, not a full synchronization protocol: they do not provide a deletion feed, push events or transactional cross-tool snapshots. Periodic reconciliation is needed if an external system maintains a replica. Archived Behaviors remain distinct from deleted records.
Facets foundations
A future Facets integration could associate a Behavior with its own record, read changed records and request an explicit status update. No Facets synchronization, REST adapter, webhook delivery or local account-free desktop MCP server is implemented. Cadence tracks adherence; it does not model doses, amounts, supply or refills.
Verification
Test with disposable records: read-only consent, each permitted edit, missing scope, stale revision, duplicate retry key, revoked access and a second account’s IDs. Confirm that no second-account record can be read or changed. Inspect error fields without logging tokens or note text.