> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ai2fin.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect an assistant to the desktop app (local MCP)

> Give Claude Desktop, Cursor or any Model Context Protocol client access to your AI2Fin records on the desktop — over your machine's loopback connection, with nothing leaving the computer.

The cloud version connects assistants over the internet with an account and
OAuth. The **desktop** version does the same thing on your own machine: an
assistant reads your records over `127.0.0.1`, authenticated by this install's
own token, and **nothing leaves the computer.**

<Info>
  This is the desktop counterpart to the [hosted MCP server](/mcp/introduction).
  Same tools, same protocol — the difference is where it runs and who it answers
  as. On the desktop it answers as the one local identity, from your local
  database.
</Info>

## What you need

* The AI2Fin desktop app, running.
* An MCP client on the **same machine** — Claude Desktop, Cursor, or any other.

That is the whole requirement. There is no account to create, no key to mint on
a website, and no data leaving your computer.

## Connect it

<Steps>
  <Step title="Open the connection details">
    In the app, open **Connect your assistant** from the dashboard (or the
    **Local automation** page). It shows a ready-to-paste configuration block
    with your machine's MCP address and this install's token.
  </Step>

  <Step title="Copy the config into your client">
    Paste it into your assistant's MCP settings. For a client that reads a JSON
    config, it looks like this:

    ```json theme={null}
    {
      "mcpServers": {
        "fin-local": {
          "url": "http://127.0.0.1:<port>/mcp",
          "headers": { "x-local-token": "<this install's token>" }
        }
      }
    }
    ```

    The app fills in the real port and token for you — copy the block from the
    app rather than typing it, so both are correct.
  </Step>

  <Step title="Ask your assistant about your finances">
    "What did I spend on software last month?" "Categorise my uncategorised
    transactions." The assistant uses the same tools the hosted server exposes,
    against your local data.
  </Step>
</Steps>

## The token is per-launch

The app mints a fresh token **every time it starts.** That is not an
inconvenience to work around — it is what keeps other software on your machine,
and any web page you have open, out of your records. A scanned port is useless
without the current token, and the token is never in a URL or a cookie.

<Warning>
  After you restart the app, copy the configuration again — the token from the
  previous session no longer works. The connection panel always shows the current
  one.
</Warning>

## Why this is safe

The loopback server checks three things before any request reaches your data,
and an assistant on your machine passes them the same way the app does:

<AccordionGroup>
  <Accordion title="It is bound to 127.0.0.1">
    Nothing off your machine can reach it — not another device on your Wi-Fi,
    not the internet.
  </Accordion>

  <Accordion title="Origin and Host are checked first">
    A web page you have open cannot use the browser to reach in: the request is
    refused before the token is even compared, and a loopback-only Host check
    defeats DNS-rebinding tricks.
  </Accordion>

  <Accordion title="The token is required and per-launch">
    Compared in constant time, minted fresh at every start. Whoever holds the
    current token is the person sitting at the machine with the app open.
  </Accordion>
</AccordionGroup>

## What the assistant can and cannot do

It can read and work with your transactions, bills, categories, reports and tax
data — the same tool set the [hosted server documents](/mcp/tools-overview).
It cannot reach anything outside your local data, and it cannot make Fin send
your records anywhere: the assistant talks to your machine, and your machine
keeps your records on your machine.

<Card title="Prefer no assistant at all?" icon="plane" href="/guides/desktop-local-data">
  Local MCP is a connection like any other. Airplane mode and the per-connection
  switches in **Where your data lives** apply to it too.
</Card>
