Skip to main content
Glama
TreeBeam MCP Server

TreeBeam MCP Server

@treebeam/mcp

MCP (Model Context Protocol) server for TreeBeam — a financial management and accounting platform. This server lets AI assistants interact with your TreeBeam organizations and projects through any MCP-compatible client.

Prerequisites

New to these tools? Each link above has a plain-English guide walking you through installation step by step.

Related MCP server: freee Accounting MCP Server

Installation

npm install -g @treebeam/mcp

From source

git clone https://github.com/treebeam-code/tb-mcpserver.git
cd tb-mcpserver
npm install

Authentication

The server uses OAuth 2.0 device flow for authentication. Tokens are stored securely in your OS keychain (macOS Keychain, Windows Credential Manager, or the Linux Secret Service), never in a plain text file. On Linux without a Secret Service, such as WSL, see Keychain access issues. Once authenticated, tokens are cached and refreshed automatically.

The easiest way to authenticate is directly inside your AI conversation. Just ask the assistant to log in to TreeBeam — it will use the treebeam_login tool to start the device flow, provide you with a link, and handle the rest automatically. No terminal commands needed.

You can also ask the assistant to check your auth status or log out at any time using the treebeam_auth_status and treebeam_logout tools.

Command line (alternative)

If you prefer to authenticate outside of your AI client, you can use the CLI directly:

treebeam-mcp login       # Opens browser to complete sign-in
treebeam-mcp status      # Check current auth status
treebeam-mcp logout      # Remove stored credentials

If running from source, replace treebeam-mcp with npm run in the commands above.

Client Configuration

Claude Code

Run this once in a terminal to make TreeBeam available in all your projects:

claude mcp add --scope user treebeam -- treebeam-mcp

Use --scope project instead to add it to the current project's .mcp.json so it's shared with everyone on the project. Run claude mcp list to confirm it's connected.

Claude Desktop and other clients

Add the TreeBeam MCP server to your client's config file. The JSON structure is the same across clients — only the file location differs.

Config file locations:

Client

Path

Claude Desktop (macOS)

~/Library/Application Support/Claude/claude_desktop_config.json

Claude Desktop (Windows)

%APPDATA%\Claude\claude_desktop_config.json

If installed globally via npm:

{
  "mcpServers": {
    "treebeam": {
      "command": "treebeam-mcp"
    }
  }
}

If running from source:

{
  "mcpServers": {
    "treebeam": {
      "command": "node",
      "args": ["/absolute/path/to/tb-mcpserver/src/index.js"]
    }
  }
}

Other MCP Clients

Any MCP-compatible client can use this server. Configure it as a stdio transport — the client launches the process and communicates over stdin/stdout.

Available Tools

Once connected, the following tools are available to your AI assistant. Here are some highlights:

Tool

Description

treebeam_login

Authenticate via device flow (opens browser)

treebeam_logout

Remove stored credentials from OS keychain

treebeam_auth_status

Check whether a valid token exists and when it expires

list_organizations

List all accounting organizations you have access to

list_projects

List all projects, optionally filtered by organization ID

The server provides 56 tools in total covering full CRUD operations for entities, accounts, account groups, periods, unadjusted balances, adjustments, adjustment line items, and entity relationship sets. Each resource supports search_*, get_*, create_*, update_*, and delete_* operations. There are also pivot_* tools for trial balance, adjustment and consolidation summaries, and read-only tools for adjustment types. See src/tool.js for the complete list.

Authentication is handled automatically — if your token expires during a session, the server initiates re-authentication via device flow.

Troubleshooting

"Not authenticated" errors

Run treebeam-mcp login (or npm run login from source) to re-authenticate. If the problem persists, run treebeam-mcp logout first to clear stale credentials, then log in again.

Keychain access issues

Tokens are stored with @napi-rs/keyring, which ships prebuilt binaries, so no build tools or extra system packages are needed. Tokens are never written to a plain text file.

On Linux, including WSL, tokens go to the Secret Service (gnome-keyring, KWallet or KeePassXC) when one is running. Without one, the server uses the kernel keyring instead. Those tokens are kept in memory only, so you'll need to sign in again after a reboot or WSL restart. treebeam-mcp status says when this applies. To keep tokens across restarts on Linux, install and run a Secret Service, for example gnome-keyring.

Node.js version

Verify you're running Node.js 22 or later:

node --version

License

Apache License 2.0 — Copyright 2026 TNS Solutions, Inc.

Available Tools

56 tools
create_accountC

Create a new account within a project.

Inputs: name (required), number (required), collectionId (required), entityId, +2 more.

create_account_groupC

Create a new account group within a project.

Inputs: name (required), collectionId (required), number, description, +1 more.

create_adjustmentA

Create a new adjustment header within a project. To add line items, call create_adjustment_line_item for each line after this returns.

Inputs: name (required), periodId (required), collectionId (required), adjustmentTypeId (required), +4 more.

create_adjustment_line_itemC

Create a new adjustment line item within a project.

Inputs: amount (required), accountId (required), adjustmentId (required), collectionId (required), +3 more.

create_entityC

Create a new entity within a project.

Inputs: name (required), collectionId (required), number, description, +1 more.

create_entity_relationship_setC

Create a new entity relationship set within a project.

Inputs: name (required), collectionId (required), description.

create_periodC

Create a new accounting period within a project.

Inputs: name (required), endDate (required), startDate (required), collectionId (required), +4 more.

create_unadjusted_balanceC

Create an unadjusted balance within a project.

Inputs: amount (required), periodId (required), accountId (required), collectionId (required).

delete_accountB

Delete an account from a project. Requires the ETag for optimistic concurrency control.

Inputs: id (required), etag (required), collectionId (required).

delete_account_groupA

Delete an account group from a project. Requires the account group ETag for optimistic concurrency control.

Inputs: id (required), etag (required), collectionId (required).

delete_adjustmentA

Delete an adjustment from a project. Requires the ETag for optimistic concurrency control.

Inputs: id (required), etag (required), collectionId (required).

delete_adjustment_line_itemA

Delete an adjustment line item from a project. Requires the ETag for optimistic concurrency control.

Inputs: id (required), etag (required), collectionId (required).

delete_entityB

Delete an entity from a project. Requires the entity ETag for optimistic concurrency control.

Inputs: id (required), etag (required), collectionId (required).

delete_entity_relationship_setB

Delete an entity relationship set from a project. Requires the ETag for optimistic concurrency control.

Inputs: id (required), etag (required), collectionId (required).

delete_periodC

Delete an accounting period from a project. Requires the ETag for optimistic concurrency control.

Inputs: id (required), etag (required), collectionId (required).

delete_unadjusted_balanceB

Delete an unadjusted balance from a project. Requires the ETag for optimistic concurrency control.

Inputs: id (required), etag (required), collectionId (required).

get_accountB

Get a single account by ID within a project.

Inputs: id (required), collectionId (required).

get_account_groupB

Get a single account group by ID within a project.

Inputs: id (required), collectionId (required).

get_adjustmentB

Get a single adjustment by ID within a project.

Inputs: id (required), collectionId (required).

get_adjustment_line_itemB

Get a single adjustment line item by ID within a project.

Inputs: id (required), collectionId (required).

get_adjustment_typeB

Get a single adjustment type by ID.

Inputs: id (required).

get_entityB

Get a single entity by ID within a project.

Inputs: id (required), collectionId (required).

get_entity_relationship_setB

Get a single entity relationship set by ID within a project.

Inputs: id (required), collectionId (required).

get_periodA

Get a single accounting period by ID within a project.

Inputs: id (required), collectionId (required).

get_unadjusted_balanceB

Get a single unadjusted balance by ID within a project.

Inputs: id (required), collectionId (required).

list_adjustment_typesA

List all available adjustment types (e.g. PAJE, TAJE). These are global reference values not scoped to a project. Results are paginated — if a continuationToken is returned, pass it in the next call to retrieve more.

Inputs: continuationToken.

list_organizationsB

List all accounting organizations accessible to the user. Results are paginated — if a continuationToken is returned, pass it in the next call to retrieve more.

Inputs: continuationToken.

list_projectsA

List all accounting projects accessible to the user, optionally filtered by organization. Results are paginated — if a continuationToken is returned, pass it in the next call to retrieve more.

Inputs: o, continuationToken.

pivot_adjustments_by_accountA

PREFERRED for analyzing adjustment impact by account. Returns one row per impacted account with the sum of adjustment line item amounts and count of distinct adjustments, for each requested period. Only accounts that have adjustment activity are included. All data is returned in a single response with NO pagination. Use this tool whenever the user asks which accounts were adjusted, or how much adjustment activity hit a particular account. You must provide at least one periodId — use search_periods first to find period IDs if needed.

Inputs: periodIds (required), collectionId (required), entityIds, accountIds, +5 more.

pivot_adjustments_by_account_groupA

PREFERRED for analyzing adjustment impact by account group. Returns one row per impacted account group with summed adjustment amounts and distinct adjustment counts, for each requested period. Only account groups that have adjustment activity are included. All data is returned in a single response with NO pagination. Use this tool whenever the user asks about adjustment totals grouped by account group. You must provide at least one periodId — use search_periods first to find period IDs if needed.

Inputs: periodIds (required), collectionId (required), entityIds, fsGroupCodes, +4 more.

pivot_adjustments_by_adjustmentA

PREFERRED for reviewing adjustments. Returns each adjustment with its line items pre-joined, including the resolved account name and account number on each line item. All data is returned in a single response with NO pagination. Use this tool whenever the user asks to see adjustments with their detail line items, or needs to review journal entries. You must provide at least one periodId — use search_periods first to find period IDs if needed.

Inputs: periodIds (required), collectionId (required), entityIds, adjustmentIds, +3 more.

pivot_adjustments_by_fs_groupA

PREFERRED for high-level adjustment analysis. Returns one row per impacted financial statement type (Asset, Liability, Equity, Revenue, Expense) with summed adjustment amounts and distinct adjustment counts, for each requested period. Only financial statement types that have adjustment activity are included. All data is returned in a single response with NO pagination. Use this tool whenever the user asks about adjustment impact at the financial statement level. You must provide at least one periodId — use search_periods first to find period IDs if needed.

Inputs: periodIds (required), collectionId (required), entityIds, fsGroupCodes, +3 more.

pivot_consolidation_by_account_groupA

PREFERRED for multi-entity consolidated reporting. Returns a consolidated trial balance by account group — one row per account group with totals summed across all included entities, plus a per-entity breakdown showing each entity's contribution to the row totals. All data is returned in a single response with NO pagination. Use this tool whenever the user asks about consolidated balances, cross-entity totals, or needs to compare entities side by side at the account group level. You must provide at least one periodId — use search_periods first to find period IDs if needed.

Inputs: periodIds (required), collectionId (required), entityIds, fsGroupCodes, +3 more.

pivot_consolidation_by_fs_groupA

PREFERRED for high-level multi-entity consolidated reporting. Returns a consolidated trial balance by financial statement group — one row per financial statement type (Asset, Liability, Equity, Revenue, Expense) with totals summed across all included entities, plus a per-entity breakdown. All data is returned in a single response with NO pagination. Use this tool whenever the user asks about consolidated financial position at the highest level, or needs a summary across all entities by financial statement type. You must provide at least one periodId — use search_periods first to find period IDs if needed.

Inputs: periodIds (required), collectionId (required), entityIds, fsGroupCodes, +2 more.

pivot_trial_balance_by_accountA

PREFERRED for financial data retrieval. Returns a trial balance pivoted by account — one row per account with the unadjusted balance, total adjustments, and adjusted balance for each requested period. All data is returned in a single response with NO pagination. Use this tool whenever the user asks about account balances, trial balances, or financial position at the account level. You must provide at least one periodId — use search_periods first to find period IDs if needed.

Inputs: periodIds (required), collectionId (required), entityIds, accountIds, +4 more.

pivot_trial_balance_by_account_groupA

PREFERRED for financial data retrieval. Returns a trial balance pivoted by account group — one row per account group with amounts summed across all accounts in that group, for each requested period. All data is returned in a single response with NO pagination. Use this tool whenever the user asks about balances or totals grouped by account group (e.g. "Cash and Cash Equivalents", "Accounts Payable"). You must provide at least one periodId — use search_periods first to find period IDs if needed.

Inputs: periodIds (required), collectionId (required), entityIds, fsGroupCodes, +3 more.

pivot_trial_balance_by_fs_groupA

PREFERRED for high-level financial summaries. Returns a trial balance pivoted by financial statement group — one row per financial statement type (Asset, Liability, Equity, Revenue, Expense) with amounts summed across all account groups of that type, for each requested period. All data is returned in a single response with NO pagination. Use this tool whenever the user asks about high-level financial position, total assets vs liabilities, or financial statement summaries. You must provide at least one periodId — use search_periods first to find period IDs if needed.

Inputs: periodIds (required), collectionId (required), entityIds, fsGroupCodes, +2 more.

search_account_groupsA

Search/list raw account group records within a project. Supports filtering — see server instructions for filter syntax. Use this tool to look up a specific subset of account groups by type. DO NOT use this tool to build financial summaries by account group — use the pivot_trial_balance_by_account_group or pivot_trial_balance_by_fs_group tools instead, which return pre-aggregated totals in a single response with no pagination. Results are paginated — if a continuationToken is returned, pass it in the next call to retrieve more.

Inputs: collectionId (required), name, since, number, +4 more.

search_accountsA

Search/list raw account records within a project. Supports filtering — see server instructions for filter syntax. Use this tool to look up a specific subset of accounts by entity or account group. DO NOT use this tool to build trial balances or financial summaries — use the pivot_trial_balance_* tools instead, which return account-level balances pre-calculated in a single response with no pagination. Results are paginated — if a continuationToken is returned, pass it in the next call to retrieve more.

Inputs: collectionId (required), name, since, number, +5 more.

search_adjustment_line_itemsA

Search/list raw adjustment line item records within a project. Supports filtering — see server instructions for filter syntax. Use this tool to look up a specific subset of line items by adjustment, account, or amount. DO NOT use this tool to analyze adjustment activity across accounts or periods — use the pivot_adjustments_* tools instead, which return pre-joined and pre-aggregated data in a single response with no pagination. Results are paginated — if a continuationToken is returned, pass it in the next call to retrieve more.

Inputs: collectionId (required), since, amount, accountId, +5 more.

search_adjustmentsA

Search/list raw adjustment records within a project. Supports filtering — see server instructions for filter syntax. Use this tool to look up a specific subset of adjustments by period, type, status, or other criteria. DO NOT use this tool to summarize or analyze adjustment data across periods or accounts — use the pivot_adjustments_* tools instead, which return pre-aggregated totals in a single response with no pagination. Results are paginated — if a continuationToken is returned, pass it in the next call to retrieve more.

Inputs: collectionId (required), name, since, number, +9 more.

search_entitiesB

Search/list entities within a project. Supports filtering — see server instructions for filter syntax. Results are paginated — if a continuationToken is returned, pass it in the next call to retrieve more.

Inputs: collectionId (required), name, since, number, +3 more.

search_entity_relationship_setsB

Search/list entity relationship sets within a project. Results are paginated — if a continuationToken is returned, pass it in the next call to retrieve more.

Inputs: collectionId (required), since, continuationToken, includeDeprecatedItems.

search_periodsB

Search/list accounting periods within a project. Supports filtering — see server instructions for filter syntax. Results are paginated — if a continuationToken is returned, pass it in the next call to retrieve more.

Inputs: collectionId (required), name, since, number, +7 more.

search_unadjusted_balancesA

Search/list raw unadjusted balance records within a project. Supports filtering — see server instructions for filter syntax. Use this tool to look up a specific subset of balance records by period, account, or amount. DO NOT use this tool to calculate trial balances or summarize financial data — use the pivot_trial_balance_* tools instead, which return pre-calculated totals in a single response with no pagination. Results are paginated — if a continuationToken is returned, pass it in the next call to retrieve more.

Inputs: collectionId (required), since, amount, periodId, +4 more.

treebeam_auth_statusA

Check current TreeBeam authentication status — whether a valid token is stored and when it expires. If the user is not authenticated, log them in with the treebeam_login tool before using other tools that would require authentication.

Inputs: no named parameters.

treebeam_loginA

Start device flow authentication for TreeBeam. Returns a URL and code for the user to complete in their browser. The server polls for the token in the background automatically. ALWAYS display the entire output message from this tool to the user in your instructions.

Inputs: no named parameters.

treebeam_logoutA

Log out of TreeBeam by removing stored credentials from the OS keychain.

Inputs: no named parameters.

update_accountC

Update an existing account within a project.

Inputs: id (required), collectionId (required), name, number, +1 more.

update_account_groupC

Update an existing account group within a project.

Inputs: id (required), collectionId (required), name, number, +1 more.

update_adjustmentA

Update an existing adjustment header within a project. Line items are managed separately via the *_adjustment_line_item tools.

Inputs: id (required), collectionId (required), name, number, +5 more.

update_adjustment_line_itemC

Update an existing adjustment line item within a project.

Inputs: id (required), collectionId (required), amount, ordinal, +2 more.

update_entityC

Update an existing entity within a project.

Inputs: id (required), collectionId (required), name, number, +2 more.

update_entity_relationship_setC

Update an existing entity relationship set within a project.

Inputs: id (required), collectionId (required), name, description.

update_periodC

Update an existing accounting period within a project.

Inputs: id (required), collectionId (required), name, number, +4 more.

update_unadjusted_balanceC

Update an existing unadjusted balance within a project.

Inputs: id (required), amount (required), collectionId (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 56 tools

    Disambiguation5/5

    Each tool maps to a distinct resource+action (search/get/create/update/delete on period, entity, account, account group, adjustment, adjustment line item, unadjusted balance, entity relationship set), and the nine pivot tools are cleanly separated by pivot dimension. Descriptions explicitly steer agents away from using raw search tools for aggregation, which removes the main overlap risk. Boundaries between similarly named pivot tools (by_account vs by_account_group vs by_fs_group, single-entity vs consolidation) are spelled out clearly.

    Naming Consistency4/5

    The dominant pattern is consistent verb_noun (create_account, update_period, delete_adjustment_line_item, pivot_trial_balance_by_fs_group). Minor deviations: list_organizations/list_projects/list_adjustment_types use list_ where the rest of the surface uses search_, and the three auth tools use a treebeam_ prefix with noun-style suffixes (treebeam_login, treebeam_auth_status). Still highly readable and predictable.

    Tool Count2/5

    56 tools is heavy; while the accounting domain is genuinely broad, the surface is dominated by repetitive CRUD quads across eight resource types plus nine pivot variants. Several parallel pivot_* tools (by_account, by_account_group, by_fs_group, across trial_balance, adjustments_, and consolidation) could be parameterized rather than enumerated, and the auth trio is ancillary to the core surface. Volume is well past the comfortable 3-15 range and increases selection cost.

    Completeness4/5

    Coverage is strong: full lifecycle (search/get/create/update/delete with ETag concurrency) for accounts, account groups, periods, entities, adjustments, adjustment line items, and unadjusted balances, plus read-only reference data (organizations, projects, adjustment types) and aggregation pivots. Minor gaps: no update/delete for projects or organizations, and adjustment types are read-only, which is reasonable for reference data. No obvious dead ends for core accounting workflows.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Connects CashChat financial data to AI assistants, enabling users to manage transactions, view spending summaries, and track category breakdowns through natural language. It supports both local stdio and remote URL-based connections with secure OAuth 2.0 authentication.
      8
      MIT
    • A
      license
      B
      quality
      C
      maintenance
      Enables AI assistants to interact with freee accounting software API for managing companies, transactions, invoices, and reports via OAuth authentication.
      60
      3
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Enables AI assistants to query and manage self-hosted accounting data—invoices, balances, and books—through natural language, with read-only tools by default and optional scoped write operations.
      30
      19 PyPI
      2
      AGPL 3.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to interact with Beancount accounting books hosted on BeanHub, including listing accounts, searching transactions, checking balances, and updating ledgers with OAuth-based authentication.
      MIT