---
url: https://docs.trackalizer.de/en/operation/mcp.md
description: >-
  Asking about your Trackalizer data with an AI client through MCP: Claude,
  ChatGPT or a local AI, with API tokens and their rights.
---

# AI clients (MCP)

Trackalizer has no chat of its own. Instead it offers your data through **MCP** (Model Context
Protocol), and you ask with an AI client of your choice: Claude Code, Claude Desktop, claude.ai,
ChatGPT or a local AI. For example:

* "How much protein did I have on average last week, and on which days too little?"
* "Does my calorie target still match my weight trend?"
* "What did I spend on food this year, and which shops were the most expensive?"
* "Which bookings of the last three months still have no category? Suggest rules."

The client sees the same data you see in the app, only your account's.

## Switching access on

An admin sets under **System settings → Connections → MCP** where access is reachable from:

| Reachable | Meaning |
|---|---|
| **Off** | The MCP server answers no one. |
| **Local network only** (default) | Only devices with a private address: home network, VPN such as Tailscale, Docker network. |
| **From outside too (internet)** | Anyone with a valid token, also over the internet if the instance is reachable there. |

The page shows the MCP server's address (`https://<your-address>/api/mcp`), the address the server
sees for your browser and whether it counts as local. Under **Fixed addresses outside the home
network** you enter IPs or networks (one per line) that may connect even with "Local network only",
such as your office's fixed IP.

::: tip Local is usually enough
Claude Code, Claude Desktop and local AIs run on your computer and reach Trackalizer in the home
network or over VPN. You need "From outside too" only for claude.ai and ChatGPT, because those
services connect from the internet.
:::

## With an API token (Claude Code, Claude Desktop, local AI)

Under **Profile → API tokens**, **Create token** with a name (such as "Claude Code on the laptop")
and the **rights**:

* **Read only:** read all areas. Enough for questions.
* **Read and write measurements:** also add and delete measurements (such as weights from a
  spreadsheet; only values this token wrote can be deleted) and, under Finances, change categories,
  rules and how bookings are assigned, for example when going through the uncategorised bookings
  together.

The token is shown **only once**; copy it right away. The page also shows a ready command for
Claude Code:

```bash
claude mcp add --transport http trackalizer https://track.example.com/api/mcp --header "Authorization: Bearer trk_…"
```

Other clients need the same two things: the address and the token as the header
`Authorization: Bearer …`.

The list shows per token when it was created and last used, and from which IP. You change the rights
at any time; that applies from the next request. A client sees new tools after reconnecting (Claude
Code: `/mcp` → Reconnect). If you delete a token, it has no access any more. Values written stay and
are marked with the token's name.

## claude.ai and ChatGPT

These apps need no token; they sign in themselves:

1. An admin sets MCP to **From outside too (internet)**, and Trackalizer has to be reachable from the
   internet.
2. In claude.ai or ChatGPT add a connector with the address from **Profile → API tokens** (box
   "claude.ai, ChatGPT & co.").
3. The app sends you to Trackalizer. After signing in, **Approve access** shows which app asks and the
   rights (**Read only** or **Read and write**). **Allow** takes you back to the app.

The grant then appears as **App sign-in** in the list of API tokens. There you change its rights or
end the access.

## Security

* Every request is logged: time, token, IP, client, tool with arguments and outcome, for 90 days.
  You see your own under **Profile → API tokens**, admins see all (refused ones too) under
  **System settings → Connections → MCP**.
* An address outside the home network that sends a wrong token 10 times within an hour is blocked
  for an hour. Blocked addresses are listed at the top of the log.
* Tokens of disabled accounts are refused. Trackalizer stores only a fingerprint of a token, not the
  token itself.
* Files such as spreadsheets or bank statements are not sent to Trackalizer by the client. The AI
  reads them on your side and sends only the values.

::: warning What the AI sees, its provider sees
If you ask claude.ai, ChatGPT or another service, the data it reads goes to that provider. With a
local AI everything stays with you.
:::
