Integrations
Liferafts has a REST API and an MCP server, so you can read your goals and metrics from your own scripts, or let an AI assistant do it for you. Both read and write the same numbers the site does. To mint a key or see which apps you have connected, go to your integrations page.
Authenticating
Every request carries a bearer token. There is no session or cookie authentication, and no API is reachable while signed in to the site alone.
API keys — for your own scripts
Create one on your integrations page. It is shown once, when it is minted, and cannot be recovered afterwards — if you lose it, revoke it and make another. A key grants everything you can do yourself, so treat it like your password and keep it out of version control.
Authorization: Bearer lr_...
OAuth — for applications
An application asks for your permission instead of holding your key, so you can grant it less than everything and disconnect it later without breaking anything else. Authorization code with PKCE; clients may register themselves, so there is nothing for you to configure in advance.
- Discovery
- https://theliferafts.com/.well-known/openid-configuration
- Authorize
- https://theliferafts.com/identity/o/authorize
- Token
- https://theliferafts.com/identity/o/api/token
- Register
- https://theliferafts.com/identity/o/api/clients
Permissions
What an application may ask for, and what you see on the approval screen. Read and write are separate, so an assistant can be allowed to look at your numbers without being able to change them. API keys are not scoped and carry all of it.
- goals:read
- See your goals
- metrics:read
- See your metrics, targets and logged values
- metrics:write
- Record and change your metric values
- posts:read
- See your posts
posts:read covers the posts you wrote, and only those — never anything written by other members of your groups. It returns how many replies a post has, but not what they say.
REST API
Browse and try every endpoint in the interactive docs, which are generated from the code and so are always current.
- Base URL
- https://theliferafts.com/api/v1/
The schema is an OpenAPI document, so you can generate a client for your own language from it rather than writing requests by hand.
List endpoints are paginated and always return an object, never a bare array — {"items": [...], "count": N}. Errors are also consistently shaped, carrying detail, code and errors.
MCP server
Lets an AI assistant read your goals and metrics and record values for you. It exposes the same operations as the API over the Model Context Protocol, at a single endpoint.
- Endpoint
- https://theliferafts.com/mcp
{
"mcpServers": {
"liferafts": {
"url": "https://theliferafts.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
Replace YOUR_API_KEY with a key from your integrations page. An assistant that supports OAuth can use the endpoint directly and will ask you to approve it instead.
Assistants can read goals, metrics, targets, logged values, time periods and your own posts, and can record values or mark a habit done. They cannot create or delete goals and metrics, cannot write posts, and cannot read other members' posts or anyone's comments.
CSV — no key required
Every metric page has an Import / export CSV panel in its sidebar. This is the route that needs no API key, no OAuth and nothing installed — useful for getting history in from a spreadsheet, for keeping your own copy of the numbers, or when your tool of choice is never going to get a built-in sync.
- Columns
- entry_date, value, notes
A header row is optional and its column order is respected. Dates are YYYY-MM-DD. Importing offers the same two modes as the API — replace keeps one value per date, append adds alongside what is already there. Rows that cannot be read are reported with their line numbers and skipped; the rest still import. A file exported here re-imports unchanged, so it doubles as a backup you can edit.
Built-in integrations
Strava. Connect it from your integrations page and your activities write themselves into whichever metrics you bind them to: distance, moving time, elevation, calories, a count of activities, whether one happened at all, and best-effort times from 400m to the marathon. You pick the sports each binding listens to, so a cycling metric ignores your runs.
Values arrive tagged with their source and a link back to the activity, and re-syncing the same activity updates the row it already wrote rather than adding a second one. Strava stays the system of record; nothing here mirrors your activity history.
Want something else? Sign in and request an integration, telling us what you would want out of it. Until it exists, the API, the MCP server and CSV import are the ways to get numbers in from elsewhere.