Osewa
For developers

Connect Osewato what you build

An API to read and write records, MCP to connect AI assistants, and an M5Stack button that records with one press. This page is for anyone who wants to make care logging more convenient with their own hands.

First, issue a personal API token

The API, MCP and the button all authenticate with a personal API token that you issue in the app's settings.

  • It is a string starting with osewa_. You can choose no expiry, 30 days or 90 days
  • The token string is shown only once, when you issue it. Save it right then
  • Issue a separate token per use, so you can delete only the ones you no longer need
Issue a token (login required)

Read and write records with GraphQL or REST

Both take the same token in the Authorization: Bearer header. Fetching the list of your teams is the quickest way to check that it works.

GraphQL

The endpoint is https://api.osewa.site/api/graphql.

curl
curl -X POST https://api.osewa.site/api/graphql \
  -H "Authorization: Bearer osewa_your_token_here" \
  -H "Content-Type: application/json" \
  -d '{"query": "query { teams { id name } }"}'

REST

The base URL is https://api.osewa.site/api. This example fetches the latest 10 records (careTargetId is the ID of the target).

curl
curl "https://api.osewa.site/api/care-records?careTargetId=1&limit=10" \
  -H "Authorization: Bearer osewa_your_token_here"

Main REST resources

/api/teams
List the teams you belong to
/api/targets
List care targets (filter by teamId)
/api/care-records
Fetch and create records (filter by careTargetId)

How to use the API (in the app)

Connect AI assistants (MCP)

Connect Osewa to an AI assistant that supports MCP (Model Context Protocol), and you can look up and add records just by chatting.

Remote MCP (recommended)

No installation. Just give the client the URL and your token.

Endpoint URL: https://mcp.osewa.site/mcp

Claude Code
claude mcp add --transport http osewa https://mcp.osewa.site/mcp \
  --header "Authorization: Bearer YOUR_API_TOKEN"
Cursor (config file)
{
  "mcpServers": {
    "osewa": {
      "url": "https://mcp.osewa.site/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

Claude Desktop's custom connectors only support OAuth and cannot send a personal token, so it can't connect directly for now. Go through mcp-remote, or use the local version below.

Local version (Docker, stdio)

On a PC with Docker, you can run the published image over standard input/output. Add this to Claude Desktop's config file.

claude_desktop_config.json
{
  "mcpServers": {
    "osewa": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "-e", "OSEWA_API_KEY", "ghcr.io/ushios/osewa-mcp:latest"],
      "env": {
        "OSEWA_API_KEY": "YOUR_API_TOKEN"
      }
    }
  }
}

Assistants you can connect

We have documented setup for Claude Code, Cursor and Claude Desktop (local version, or via mcp-remote). Other MCP clients should work too, as long as they can send an HTTP header.

Tools available to the AI

List and create teams and targets, and fetch, create and update records. Deleting records (delete_care_record) is disabled by default for safety. Only when running locally via Docker (stdio), pass the environment variable MCP_ENABLE_DELETE_TOOLS=true to enable it (not available on the hosted server).

  • list_teams
  • create_team
  • list_targets
  • create_target
  • list_care_records
  • create_care_record
  • update_care_record

Things you can say

The AI picks tools such as list_targets, list_care_records and create_care_record on its own.

  • 「When was my baby's last milk?」
  • 「Log that my baby just drank 120ml of milk」
  • 「Summarize last week's diaper changes by day」
  • 「Log today's watering for the plant」

Osewa records are self-reported data entered by family members. The connection instructions tell the AI not to diagnose or judge whether to see a doctor, and to suggest consulting a doctor or vet when something is worrying.

MCP setup guide (in the app)

Teach your AI how to use Osewa (Agent Skills)

Agent Skills are SKILL.md files that tell an AI assistant how to do a task step by step. MCP tells the AI what it can do; a skill tells it how to put the result together. They are released under the MIT license.

Available skills

osewa-checkup-summary
Before a checkup or doctor's visit, summarizes the last week of feeding, sleep, diapers, temperature, weight, symptoms and medicine. Read-only: it never writes records.

Install from the command line (Claude Code, Codex, Gemini CLI, Cursor and more)

The skills CLI (Node.js 22.20 or later) can install them straight from this site.

shell
npx skills add osewa.site

Install from a zip (claude.ai, Claude Desktop)

Download the zip, upload it under "Customize > Skills", and turn it on.

Download osewa-checkup-summary.zip

A skill works with the MCP connection above. Without it, the AI cannot read your records. Your token is not included in the skill.

The summaries are based on self-reported records entered by family members. The skill tells the AI not to diagnose or judge whether to see a doctor, and to suggest consulting a professional when something is worrying.

An M5Stack button that records with one press

A physical button for logging pee and poop, or timing formula feeds, without taking out your phone. It simply calls the public GraphQL API. How to build it, with the full program, is written up in articles on Zenn (in Japanese).

Dual Button version (Basic / Gray)

  • The external red button logs pee, the blue one logs poop
  • On the body, A starts a formula feed, B pauses and resumes, C ends it (enter the ml later in the app)
  • The screen shows the predicted time of the next feed and the time of the last one

Version without Dual Button (Basic / Gray / Core2 / CoreS3)

  • On the body, A logs pee, B logs poop, C logs both

What you need

  • An M5Stack that runs MicroPython
  • A personal API token
  • 2.4GHz Wi-Fi (5GHz-only networks won't work)

It only has buttons and an on-screen display. It does not use any sensors.

Handling your token

A personal API token hands what your account can do to the outside. Treat it like a password.

  • Don't write it into code or a repository. Keep it in an environment variable or a config file you don't commit
  • An AI assistant has the same permissions as the token's owner (you). Access to data you can't see returns an error
  • Use a separate token per use, with an expiry
  • If it leaks, delete it in settings. A deleted token stops working immediately
  • Keep it out of screen shares, screenshots and chat pastes

Back to Osewa