Skip to content

AI Assistants (MCP)

Dennis edited this page Nov 24, 2026 · 3 revisions

AI Assistants (MCP)

Tribu has a built-in Model Context Protocol (MCP) endpoint, so an AI assistant can read and update household data: "What is on today?", "Add milk to the shopping list", "Which tasks are overdue?".

It is meant first of all for local AI: a model running on your own hardware, for example with Ollama, llama.cpp, or LM Studio. Calendars, tasks, shopping lists, and family details then never leave your network.

How it works

  • The assistant signs in with a personal access token that you create for it. Browser sessions are not accepted.
  • Every request runs through Tribu's regular API with that token. Family membership, adult and admin roles, the token's permissions, and rate limits apply exactly as in the app.
  • The token's permissions decide what the assistant can see and do. An assistant with a narrow token cannot do more, however it is asked.

1. Create a token

  1. Open Settings → My account → API Tokens and choose Create token.
  2. Give it a name such as Local assistant and, if you like, an expiry date.
  3. Turn off Full access and pick only the permissions the assistant needs, for example Tasks and Shopping, each with read or write.
  4. Copy the token. It is shown only once.

Full access also lets the assistant delete data, and for an admin account change admin settings. Prefer narrow tokens, and a separate token per assistant so you can revoke one without affecting the others.

Every area has its own permission: calendar, tasks, shopping, meal plans, recipes, birthdays, contacts, gifts, rewards, school timetables, quick capture, activity (read only), templates, the setup checklist, families, and profile, plus Admin for admins. Without Full access, pick at least one; Create stays disabled until you do.

API Tokens are not shown to children.

2. Add the endpoint to your MCP client

The client must support Streamable HTTP and send an Authorization: Bearer header.

Setup Endpoint
Default Compose stack, or a reverse proxy that strips /api (all examples in the Self-Hosting Guide) https://<your-tribu>/api/mcp
Client talks to the backend directly, for example on the same Docker network http://<backend>:8000/mcp

If the client runs in Docker on the same host as Tribu, use an address that container can reach, not localhost.

Open WebUI

Open WebUI 0.6.31 or newer:

  1. As an admin, open Settings → Integrations.
  2. Under External Tool Servers, add a connection.
  3. Choose the type MCP (Streamable HTTP) and enter the endpoint URL.
  4. Pick Bearer authentication and paste the token into Key.

LM Studio

LM Studio 0.3.17 or newer: add the server to mcp.json:

{
  "mcpServers": {
    "tribu": {
      "url": "https://tribu.example.com/api/mcp",
      "headers": { "Authorization": "Bearer tribu_pat_your_token" }
    }
  }
}

Other clients

Any MCP client with Streamable HTTP and custom headers works the same way: the endpoint URL plus the header Authorization: Bearer <token>.

3. Choose a model

  • Use a model that supports tool calling.
  • Smaller local models work best with narrow tokens and focused requests, such as "today's tasks" or "add milk to the shopping list".
  • Local models often have small context windows. Answers longer than 24,000 characters are cut, and the assistant is told to ask for less, for example with a date range or a limit.
  • Deletes are permanent. The assistant is told to confirm with you before deleting or changing many things, but a narrow token is the safer guard.

What the assistant can do

The assistant gets four tools:

Tool What it does
whoami shows the signed-in person, the token's permissions, and the person's families
list_operations lists what the token may use, grouped by area such as tasks, shopping, or calendar
describe_operation shows the parameters of one operation before it is used
call_operation runs one operation and returns the result

Operations come from Tribu's own API. Routes that do not fit, such as file uploads, live streams, and calendar feeds, are left out.

Some things stay in the web app and are never available over MCP:

  • signing in, signing out, and sessions
  • passwords and two-step sign-in
  • creating or revoking API tokens
  • Single Sign-On settings
  • setup and restore
  • backup downloads
  • pairing display devices
  • adding member accounts with a password, and removing family members
  • deleting your account and leaving a family

Cloud assistants

Cloud assistants work too, with the same endpoint and token. Then household data is sent to the provider of that assistant. Use them only if that is fine for your family, and only with a narrow token. Your Tribu must also be reachable from wherever that assistant runs.

Revoking access

Open Settings → My account → API Tokens and choose Revoke on the token. The assistant loses access at once. Tokens with an expiry date stop working on their own.

To turn the endpoint off for everyone, set MCP_ENABLED=false for the backend and restart it. The endpoint then answers 404.

Troubleshooting

The client cannot connect

  • Check the endpoint path: /api/mcp through the frontend or a proxy that strips /api, /mcp on the backend directly.
  • The endpoint accepts only POST. Opening it in a browser answers 405 Method Not Allowed, which is expected.
  • 401 means the token is missing, mistyped, revoked, or expired, or the client did not send it as Authorization: Bearer <token>.
  • Confirm the client supports Streamable HTTP, not only local (stdio) servers.

The assistant says something is not allowed

The token lacks the permission for that area, or the account is not allowed to do it in the app either, for example a write that needs an adult. Ask the assistant to run whoami to see the token's permissions.

Answers are cut or the model loses track

Ask for less at a time: one day, one list, or one area. Use a model with tool calling and a larger context window if you can.

Related pages

Clone this wiki locally