Integrations

Liferafts has a REST API and an MCP server, so you can read your goals and metrics from your own scripts or an AI assistant. Both read and write the same numbers as the site. To create a key or see your connected apps, go to your integrations page.

Authenticating

Every request needs a bearer token. Being signed in to the site is not enough.

API keys, for your own scripts

Create one on your integrations page. It is shown only once. If you lose it, revoke it and create another. A key can do anything you can, so keep it secret and out of version control.

Authorization: Bearer lr_...

OAuth, for applications

An application asks for your permission instead of using your key, so you can limit what it can do and disconnect it at any time. It uses the authorization code flow with PKCE, and clients register themselves, so there is nothing to set up 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 can ask for on the approval screen. Read and write are separate, so you can let an assistant see your numbers without changing them. API keys have every permission.

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 only the posts you wrote, not posts 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.

Base URL
https://theliferafts.com/api/v1/

The schema is an OpenAPI document, so you can generate a client from it.

List endpoints are paginated and return {"items": [...], "count": N}. Errors always have detail, code and errors.

MCP server

Lets an AI assistant read your goals and metrics and record values for you. It offers the same operations as the API over the Model Context Protocol.

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. It needs no key and nothing installed. Use it to bring in history from a spreadsheet or keep your own copy of your numbers.

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, and append adds to what is already there. Rows that can't be read are skipped and reported with their line numbers. You can edit an exported file and import it again.

Built-in integrations

Strava. Connect it from your integrations page and your activities are logged to the metrics you choose: distance, moving time, elevation, calories, a count of activities, whether one happened at all, and best times from 400m to the marathon. You choose which sports count towards each metric.

Each value links back to its Strava activity. Syncing an activity again updates its value instead of adding a second one.

Want something else? Sign in and request an integration, and tell us what you'd want from it. Until then, use the API, the MCP server or CSV import.