FinaryExport
Health Warn
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 5 GitHub stars
Code Warn
- fs module — File system access in .squad/templates/workflows/squad-heartbeat.yml
- fs module — File system access in .squad/templates/workflows/squad-issue-assign.yml
Permissions Pass
- Permissions — No dangerous permissions requested
No AI report is available for this listing yet.
Exports Finary's portfolio summaries, account balances, holdings, transactions, and dividends
FinaryExport (and MCP Server)
A .NET command-line tool that exports your Finary wealth management data to Excel (.xlsx) files.
Connects to the Finary API, authenticates via Clerk, and exports portfolio summaries, account balances, holdings, transactions, and dividends — one workbook per profile, plus a unified workbook across all profiles.
Prerequisites
- Windows 10 or later — required (DPAPI session encryption and TLS impersonation depend on Windows-only native libraries)
- .NET 10 SDK
- NuGet packages are restored automatically by
dotnet build
Build
dotnet build
Usage
All commands are run from the repository root. The --project flag tells dotnet run which project to execute.
Export data
dotnet run --project src/FinaryExport -- export
Exports all profiles to the default output directory. Each profile gets its own file (e.g., finary-export-jean-dupont.xlsx) and a unified workbook (finary-export-unified.xlsx) is generated combining all profiles.
Export with custom output path
dotnet run --project src/FinaryExport -- export --output myfile.xlsx
Force re-authentication
dotnet run --project src/FinaryExport -- clear-session
Discards the cached session and forces a fresh login on the next export.
Show version
dotnet run --project src/FinaryExport -- version
Authentication
On first run, FinaryExport prompts interactively for:
- Email — your Finary account email
- Password — your Finary account password
- TOTP code — a 6-digit code from your authenticator app (if 2FA is enabled)
After successful login, the session is encrypted and cached locally using DPAPI (Windows). Subsequent runs reuse the cached session until it expires, with automatic token refresh in the background.
Session Storage & Security
Your email, password, and TOTP codes are never saved to disk. They are used only during the interactive login prompt and discarded immediately after authentication.
What IS saved is a session token and cookies, stored in:
~/.finaryexport/session.dat
This file is encrypted at rest using DPAPI (Data Protection API) — a well-established Windows cryptographic framework used by Chrome, Edge, and other major applications to protect sensitive data. DPAPI encryption is scoped to the current Windows user account, meaning the file cannot be decrypted by other users on the same machine or if copied to another computer.
To discard the cached session, use clear-session (see above) or simply delete ~/.finaryexport/session.dat.
Currency Handling
Finary lets you choose a display currency in your account settings (e.g. EUR, USD). All monetary values in the export (balances, prices, P&L, dividends…) are expressed in this display currency, and the corresponding symbol (€, $, £…) is automatically applied to every amount column in the workbook.
Each account and transaction also has a Native Currency column showing the original currency of the underlying asset or operation — for example, a US brokerage account will show USD as native currency even if your display currency is set to EUR.
Tip: To change the currency used in the export, update your display currency in Finary's settings and re-export.
Output
Each profile export generates an .xlsx workbook. A unified workbook combining all profiles is also generated. A profile with data in every category produces up to 15 sheets:
Portfolio Summary
Overall portfolio metrics:
- Gross/net total, evolution (€ and %)
- Per-category breakdown: account count and total balance for each asset category
Account Sheets (one per category with data)
Up to 10 category-specific sheets — only created if the category has accounts:
| Sheet | Category |
|---|---|
| Checkings | Bank checking accounts |
| Savings | Savings accounts |
| Investments | Investment/brokerage accounts |
| Real Estate | Property holdings (SCPIs, etc.) |
| Cryptos | Cryptocurrency accounts |
| Fonds Euro | Euro-denominated funds |
| Commodities | Commodity holdings |
| Credits | Loans and credit lines |
| Other Assets | Miscellaneous assets |
| Startups | Startup equity/investments |
Each account sheet has columns: Name, Institution, Balance, Native Currency, Buying Value, Unrealized P&L, Annual Yield, IBAN, Opened At, Last Sync.
Holdings
Individual security positions from investment accounts: Account, Name, ISIN, Symbol, Type, Quantity, Buy Price, Current Price, Value, +/- Value, +/- %.
Crypto Holdings
Individual cryptocurrency and fiat positions held in crypto accounts: Account, Name, Code, Quantity, Buy Price, Current Price, Value, Buy Value, +/- Value, +/- %. Includes both crypto coins and fiat balances held within crypto accounts.
Transactions
Buy/sell/income/expense records across checking, savings, investment, and credit accounts: Category, Date, Name, Value, Type, Account, Institution, Native Currency, Commission, Transaction Category.
Note: Only 4 categories support transactions in the Finary API (checkings, savings, investments, credits). Real estate, cryptos, and others do not have transaction endpoints.
Dividends
Three sections in one sheet:
- Summary — annual income, past income, projected next year, yield %
- Past Dividends — investment name, amount, payment date, type, category
- Upcoming Dividends — investment name, projected amount, date, status, category
Multi-Profile
The tool discovers all Finary profiles (personal + organization memberships) and exports:
- One workbook per profile:
finary-export-{name}.xlsx(ownership-adjusted values) - One unified workbook:
finary-export-unified.xlsx(deduplicated, ownership-normalized full values across profiles)
MCP Server — Talk to Your Portfolio
FinaryExport includes an MCP server that lets you ask questions about your Finary data in plain language from any AI assistant — GitHub Copilot, Claude Desktop, or any MCP-compatible client. No API knowledge needed. Just ask.
Important: The MCP server queries the Finary API live — it does NOT read from previously exported xlsx files. Every question gets fresh, real-time data. The server shares the same Core library (authentication, API client, models) as the CLI exporter but operates independently; you don't need to run an export first. Think of it this way: the CLI exporter produces xlsx snapshots, while the MCP server provides interactive, on-demand access to the same data.
What You Can Do
Here are some things you can say to your AI assistant once the server is set up:
Portfolio overview
"What's my total portfolio value?"
"How has my portfolio performed over the last 6 months?"
"Give me a breakdown of fees across all my accounts"
Accounts & holdings
"Show me all my investment accounts"
"What accounts does my daughter have?"
"List my holdings with their current P&L"
"What are my individual positions worth right now?"
Transactions
"Show me all transactions for the last month"
"What buys and sells did I make this year in my brokerage account?"
Dividends
"Show me the dividends I'll receive this year"
"What was my dividend income last year?"
Allocation
"How are my investments allocated by sector?"
"Show me my geographical allocation"
Multi-profile (family accounts)
"Switch to my daughter's profile and show me her transactions"
"What profiles are available?"
"Switch to the kids' account"
The AI assistant figures out which data to fetch — you just describe what you want to know.
Setup
Add this to your MCP configuration file and restart your client:
- GitHub Copilot (CLI or VS Code):
~/.copilot/mcp-config.jsonor.vscode/mcp.json - Claude Desktop:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"finary": {
"type": "stdio",
"command": "dotnet",
"args": ["run", "--project", "C:/Dev/FinaryExport/src/FinaryExport.Mcp"]
}
}
}
Replace C:/Dev/FinaryExport with the absolute path to your clone. A published executable can be used instead for faster startup.
Authentication
The first time you use a Finary tool, the assistant will prompt you for your email, password, and TOTP code (if you have 2FA enabled). Your credentials are used once to log in and are never saved. The session token is encrypted with DPAPI and stored locally at ~/.finaryexport/session.dat, so you won't need to log in again until the session expires.
If you've already used the CLI exporter, the MCP server picks up your existing session automatically — no extra login required.
Note: If your MCP client doesn't support interactive prompts (elicitation), run the CLI exporter once first (
dotnet run --project src/FinaryExport -- export) to create the session file.
Multi-Profile
If you have a family account with multiple profiles (e.g., personal + kids), just ask the assistant to switch:
"Switch to my daughter's profile"
The server starts on the owner profile automatically. Portfolio data tools explicitly report scope: "active_profile"; global identity and profile-list responses use authenticated_user and available_profiles. After set_active_profile, subsequent portfolio calls use that profile until you switch again or restart the server.
Response and Data Semantics
- All 17 tools publish MCP output schemas and return structured content.
- Monetary values, quantities, and percentages are serialized as decimal strings so precision is not lost in JSON number conversion.
get_portfolio_summaryis the authoritative source for portfolio totals. Account rows must not be summed into a replacement total.get_all_accountsdeduplicates account rows by ID and groups repeated category appearances undercategory_values; those category values remain distinct additive components.- Account responses preserve IBANs and enrich connection state from Finary synchronization metadata when available. Raw ownership structures and internal provider identifiers remain omitted.
- Investment holdings include securities, investment-account fiat balances, and SCPI positions.
- List-heavy tools accept
offsetandlimit(default 100, maximum 500) to keep responses bounded. - Transaction periods are trailing windows ending now. Transaction tools default to
1m; useperiod: "all"explicitly for complete history. - MCP responses omit raw ownership structures, correlation IDs, and internal provider metadata. The XLSX exporter continues to use the full Core models independently.
Tool Reference
Available tools (for developers and advanced users)The server exposes 17 tools: 16 read-only data tools and one session-scoped profile switch. Supported periods are all, 1d, 1w, 1m, 3m, 6m, 1y, and 5y.
| Tool | What it does |
|---|---|
get_user_profile |
Authenticated user's profile info (name, email, currency) |
get_profiles |
Lists all available profiles (personal + org memberships) |
set_active_profile |
Switches the active profile for subsequent queries |
get_portfolio_summary |
Authoritative gross assets, liabilities, net worth, financial assets, allocation, and performance |
get_portfolio_timeseries |
Paged, normalized historical portfolio values |
get_portfolio_fees |
Concise annual/cumulated fee totals and contract savings |
get_accounts |
Paged accounts for one asset category |
get_all_accounts |
Paged accounts across all categories, deduplicated by account ID |
get_category_timeseries |
Paged historical values for one category |
get_transactions |
Bounded, date-filtered transactions for one supported category |
get_all_transactions |
Bounded, date-sorted transactions across supported categories |
get_holdings |
Paged investment holdings with security, fiat, and SCPI positions |
get_account_positions |
Paged individual positions (security, SCPI, crypto, or fiat) within a specific account, category-aware |
get_crypto_holdings |
Crypto and fiat positions for the active profile, grouped by account |
get_dividends |
Paged dividend events plus concise income totals |
get_geographical_allocation |
Portfolio allocation by region |
get_sector_allocation |
Portfolio allocation by economic sector |
License
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found