Skip to content

MCP Server

Treeline includes a built-in MCP (Model Context Protocol) server. It lets AI agents query your finances, sync accounts, tag transactions, and more.

It speaks MCP two ways: over STDIO for an agent on the same machine (tl mcp), and over HTTP for a networked agent that connects to a hub you run (tl serve). The tools are the same either way.

For an agent running on the same machine as your data — it launches tl mcp itself. Pick the client you’re using; you can use more than one, and they all share the same local database.

Two ways to connect, depending on whether you use the terminal.

Don’t use the terminal? Download the .mcpb extension from treeline.money/download and open it. Claude Desktop installs it automatically — no configuration needed.

Already have the CLI? Open Settings > Developer > Edit Config in Claude Desktop and add:

{
"mcpServers": {
"treeline": {
"command": "tl",
"args": ["mcp"]
}
}
}

Restart Claude Desktop. You should see Treeline listed in the tools menu.

Both options work in Chat and Cowork mode.

Requires the Treeline CLI.

Terminal window
claude mcp add treeline -- tl mcp

Requires the Treeline CLI. Any client that supports the MCP STDIO transport can connect — point it at tl mcp as the command.

A hub is any Treeline instance running tl serve, and it does two things:

  • Replication — your other devices push and pull the database to and from it, so your data can live on more than one machine.
  • Remote MCP — it exposes this MCP server over HTTP so a networked agent can reach it.

(See What’s a Hub? for the full picture.)

This page is about the second role. An agent that can’t launch a local process — ChatGPT, Claude on your phone, or any client that supports a remote (custom) MCP server — connects to your hub’s /mcp endpoint and makes requests over the network. Unlike push/pull, your data isn’t copied to the client — it stays on the hub, and the agent receives only the results of the queries it runs. The hub walks the client through authorizing with the scopes you approve.

Set up a hub →

Once connected, the agent has access to these tools:

ToolDescriptionAccess
statusAccount balances, transaction counts, and connected integrationsRead-only
schemaGet database schema (tables, views, columns) for SQL query planningRead-only
queryExecute a read-only SQL query against your financial databaseRead-only
query_writeExecute a SQL query with write access (INSERT, UPDATE, DELETE)Read/Write
syncPull latest transactions from connected bank integrationsRead/Write
tagApply tags to transactionsRead/Write
doctorRun database health checksRead-only
demoEnable, disable, or check demo modeRead/Write
skills_listList available user-created financial skillsRead-only
skills_readRead a file from a skill directoryRead-only
skills_writeCreate or update a skill fileRead/Write
encryption_statusCheck database encryption and lock statusRead-only
versionGet current CLI version and check for updatesRead-only

Over a hub the same tools are available, but the ones that read your database return an error until you’ve pushed one to it (tl hub push).

You don’t need to mention Treeline or MCP by name. Just ask questions naturally:

  • “What’s my net worth?”
  • “How much did I spend on groceries last month?”
  • “Show me my largest transactions this week”
  • “Tag all Starbucks transactions as coffee”
  • “Sync my bank accounts”

The agent will choose the appropriate Treeline tool based on your question.

Where your data goes depends on how the agent connects:

  • STDIO (same machine): the server runs on your machine and reads your Treeline database on disk. Nothing is sent anywhere by the server itself.
  • Over a hub (HTTP): the server runs on your hub. A networked agent reaches it over HTTPS and gets back only the results of the queries it runs — your full database stays on the hub, not on the client.

Either way, the agent — and the LLM behind it — sees the query results needed to answer you. With a cloud LLM, those results reach the provider (the same as any cloud assistant); with a local model, nothing leaves. The provider sees what you ask about, not your whole database.