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.
On your machine (STDIO)
Section titled “On your machine (STDIO)”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.
Claude Desktop
Section titled “Claude Desktop”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.
Claude Code
Section titled “Claude Code”Requires the Treeline CLI.
claude mcp add treeline -- tl mcpGemini CLI, Cursor, and others
Section titled “Gemini CLI, Cursor, and others”Requires the Treeline CLI. Any client that supports the MCP STDIO transport can connect — point it at tl mcp as the command.
Over the network (a hub)
Section titled “Over the network (a hub)”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.
Available Tools
Section titled “Available Tools”Once connected, the agent has access to these tools:
| Tool | Description | Access |
|---|---|---|
status | Account balances, transaction counts, and connected integrations | Read-only |
schema | Get database schema (tables, views, columns) for SQL query planning | Read-only |
query | Execute a read-only SQL query against your financial database | Read-only |
query_write | Execute a SQL query with write access (INSERT, UPDATE, DELETE) | Read/Write |
sync | Pull latest transactions from connected bank integrations | Read/Write |
tag | Apply tags to transactions | Read/Write |
doctor | Run database health checks | Read-only |
demo | Enable, disable, or check demo mode | Read/Write |
skills_list | List available user-created financial skills | Read-only |
skills_read | Read a file from a skill directory | Read-only |
skills_write | Create or update a skill file | Read/Write |
encryption_status | Check database encryption and lock status | Read-only |
version | Get current CLI version and check for updates | Read-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.
Privacy
Section titled “Privacy”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.