Documentation du serveur MCP
GlassFolio laisse des clients IA comme Claude Code, Codex, Cursor ou Antigravity utiliser ses outils sur vos propres données. Cette page explique comment cela fonctionne, comment connecter un client, et ce que font les outils.
Laissez votre IA se configurer
Le plus rapide : copiez ce prompt dans votre client IA (Antigravity, Cursor, Claude Code, Codex...). Il démarre le pont si besoin et ajoute le serveur à sa propre configuration, puis vous donne le jeton et l’adresse à coller dans GlassFolio (Réglages, IA & MCP). Le prompt ne contient aucun secret et il est toujours en anglais. Le jeton apparaîtra dans votre discussion avec l’IA ; vous pouvez le remplacer à tout moment.
Configure and connect the GlassFolio MCP server to your AI client.Instructions:1. Start the MCP bridge if needed (`npx -y glassfolio-mcp serve` or `node mcp-server/index.mjs serve`) and get the token with the `token` command.2. Add the MCP server "glassfolio" to your local MCP configuration.3. Give me only the token and the address to paste into GlassFolio (Settings > AI & MCP).
Comment ça fonctionne
Votre coffre est chiffré dans votre navigateur, et seul votre onglet GlassFolio ouvert détient la clé : aucun programme ne peut le lire de l’extérieur. Le serveur MCP est donc un pont qui tourne sur votre propre ordinateur. Votre client IA lui envoie un appel d’outil, le pont le transmet à votre onglet, l’onglet exécute l’outil sur vos données et renvoie le résultat. Rien ne passe par les serveurs de GlassFolio, et le pont ne conserve rien.
Ce qu’il faut
- Node.js 22 et une copie du dépôt : le pont est mcp-server/index.mjs et n’a aucune dépendance.
- GlassFolio ouvert dans un onglet du navigateur, connecté, avec votre coffre déverrouillé.
- « Autoriser les clients IA » activé dans Réglages, IA & MCP.
- Un client IA qui prend en charge MCP en stdio ou en Streamable HTTP.
$ git clone https://github.com/Damien-Esilv/GlassFolio.git$ cd GlassFolio$ node mcp-server/index.mjs --list
En local ou en ligne
GlassFolio sur votre machine (Docker ou npm run dev)
Le serveur de l’application contient déjà le pont, à son adresse /mcp : il n’y a rien d’autre à démarrer. Réglages, IA & MCP affiche l’adresse et le jeton à donner à votre client.
$ claude mcp add --transport http glassfolio http://localhost:3000/mcp --header "X-GlassFolio-Token: <token>"GlassFolio en ligne (app.glassfolio.dev)
Démarrez le pont sur votre ordinateur. Votre onglet s’y connecte alors en 127.0.0.1, comme il le fait pour un modèle Ollama local, donc rien ne quitte votre machine. Collez son jeton dans Réglages, IA & MCP. Certains navigateurs demandent votre autorisation avant qu’une page web atteigne une adresse locale, et certains peuvent la bloquer : si c’est le cas du vôtre, utilisez le mode local.
$ node mcp-server/index.mjs serve$ node mcp-server/index.mjs token
$ claude mcp add --transport http glassfolio http://127.0.0.1:47831/mcp --header "X-GlassFolio-Token: <token>"Connecter votre client IA
Donnez à votre client l’adresse du pont et son jeton (en-tête X-GlassFolio-Token), ou laissez-le démarrer la commande lui-même. Réglages, IA & MCP prépare ces extraits avec vos propres valeurs.
{"mcpServers": {"glassfolio": {"command": "node","args": ["/absolute/path/to/GlassFolio/mcp-server/index.mjs"]}}}
[mcp_servers.glassfolio]command = "node"args = ["/absolute/path/to/GlassFolio/mcp-server/index.mjs"]
Remplacez le chemin par le dossier de votre copie du dépôt. Les autres clients, comme Cursor ou Antigravity, prennent les mêmes informations dans leurs propres réglages MCP : l’adresse et le jeton, ou la commande.
Les modifications demandent votre approbation
Un outil qui modifie vos données, comme enregistrer une transaction ou créer un objectif, ne s’exécute pas quand le client le demande. GlassFolio affiche une carte dans votre onglet ouvert, et la modification n’est faite que si vous l’approuvez là. Sans réponse de votre part pendant environ une minute et demie, rien n’est modifié. En mode lecture seule, ces outils sont bloqués.
Le mode autonome (Réglages, IA & MCP) supprime cette confirmation : l’assistant, un modèle local et les clients IA modifient alors vos données tout de suite. Un avertissement explique les risques avant de l’activer, par exemple un agent qui suit une instruction cachée dans un document qu’il lit. Les actions sur le compte lui-même (verrouiller le coffre, changer la clé, exporter vos données, renvoyer l’e-mail de vérification) demandent toujours.
Ce qui quitte votre ordinateur
Les résultats des outils vont à votre client IA, puis au modèle qu’il utilise, comme lorsque vous collez des chiffres dans une conversation. Les clés d’API, les clés de récupération et les secrets d’authentification sont retirés avant qu’un résultat ne quitte GlassFolio. Si rien ne doit quitter votre machine, connectez un client qui utilise un modèle local.
Limites
- L’onglet doit rester ouvert et déverrouillé. Si vous verrouillez le coffre ou fermez l’onglet, le client est invité à vous demander d’ouvrir GlassFolio de nouveau.
- Un seul onglet sert les clients à la fois : en ouvrir un second prend le relais.
- Le pont n’écoute que sur votre propre ordinateur et n’accepte que le jeton que vous partagez.
Clients compatibles
Tout client qui prend en charge MCP en stdio ou en Streamable HTTP peut l’utiliser. Claude Code
Outils
Les 35 outils que propose le pont, tels que votre client les voit (les descriptions sont en anglais). Ceux marqués « Demande votre approbation » modifient vos données et l’attendent.
create_alert_ruleCreate a new custom alert rule for real-time portfolio monitoring (e.g. price threshold, P&L %, cash ratio). Requires user confirmation.Demande votre approbationcreate_goalCreate a new financial goal with a target amount. Requires explicit human confirmation before execution.Demande votre approbationexport_gdpr_archiveDownload the GDPR access / portability archive (profile, consent, JSON backup and CSV files) of the current real account in the browser. Not available for the demo account. Requires explicit user confirmation. The archive content is never returned to the assistant.Demande votre approbationget_asset_allocationGet the asset allocation breakdown by asset class (Equity, Crypto, Cash, ETF, Real Estate) with values and percentages.Lecture seuleget_cost_basis_methodRead-only. Return the cost basis method of accounts: WAC (weighted average cost, French PRU) or FIFO (first in, first out lots).Lecture seuleget_email_verification_statusCheck whether the email address of the current GlassFolio account is verified (email/password accounts receive a verification code and link by email).Lecture seuleget_gamification_statusRetrieve user gamification profile: current level, total XP, investor rank title, level progress percentage, and unlocked achievements count.Lecture seuleget_portfolio_summaryGet an overall financial summary of the user portfolio (net wealth, cost basis, unrealized profit/loss, and position count).Lecture seuleget_privacy_statusGet the legal and privacy status of GlassFolio: version and paths of the legal documents, the privacy contact, the current cookie / audience-measurement consent, and where to exercise GDPR rights (export and account deletion).Lecture seuleget_progress_statsRetrieve the Stats shown in the Progress page: this week (transactions of the week, current tracking streak in weeks, XP earned this week) and all-time figures (total transactions, active weeks, current and best streak, total XP, level, achievements unlocked, goals reached, date tracking started). Read-only.Lecture seuleget_security_statusInspect the current E2EE security posture of GlassFolio (vault lock state, encryption algorithm, 2FA/TOTP status, registered passkeys count, and recent security audit events with sanitized details).Lecture seuleget_storage_statusReport where GlassFolio keeps the data in local mode (the local server / Docker volume, or only this browser) and whether recent changes were saved. Read-only; never exposes data or error internals.Lecture seuleget_tax_summaryCalculate and return capital gains, tax estimates, and tax comparison (PFU flat tax vs barème progressif) for a given fiscal year in France.Lecture seuleimport_snapshotImport a holdings snapshot CSV into an account so its positions match the file exactly (non-fiscal adjustments, re-importing the same file changes nothing). Requires explicit human confirmation before execution. Use preview_snapshot_import first.Demande votre approbationlist_alert_rulesList all custom user-defined alert rules (price threshold, P&L %, cash ratio) with their trigger history and enabled state.Lecture seulelist_auth_methodsList all configured authentication and recovery methods for the current account (password, passkeys, TOTP 2FA, OAuth providers, and recovery key). Enrollment or removal of passkeys/TOTP cannot be performed via AI tools as it strictly requires biometric/physical user presence and interactive step-up validation.Lecture seulelist_goalsList user financial goals, target amounts, current amounts, and completion percentages.Lecture seulelist_instrumentsList the assets (instruments) known to the portfolio with their id, symbol, type (stock, etf, fund, crypto, cash, bond, other), ISIN and market identifiers. Use it to find the id before editing an asset.Lecture seulelist_notificationsList all notifications and alerts with optional category filter (portfolio, fiscal, goals, security, system), read filter, and limit.Lecture seulelist_positionsList user asset holdings and positions with quantities, average cost (PRU), current price, market value, and unrealized gains.Lecture seulelist_questsList active periodic gamification missions and progress towards completion.Lecture seulelist_transactionsList recent financial transactions with optional filtering by asset ticker or operation type (Buy, Sell, Deposit, Withdrawal).Lecture seulelist_vault_secretsList all configured external API providers in the encrypted secrets vault (masked values only).Lecture seulelock_vaultImmediately lock the encrypted vault, wiping all decrypted keys from memory. Requires explicit user confirmation.Demande votre approbationmanage_notificationsPerform management actions on notifications (mark single as read, mark all read, delete single, or clear all read). Requires user confirmation.Demande votre approbationpreview_csv_importRead-only. Detect how a broker/bank CSV export would be imported: delimiter, header row, broker preset, date order and the proposed column mapping (history = transaction journal, snapshot = current holdings). Nothing is saved.Lecture seulepreview_snapshot_importRead-only. Compare a holdings snapshot CSV with the current positions of an account and list what would change (new, increased, decreased, closed positions, average price updates). Nothing is saved.Lecture seulepropose_csv_mappingRead-only. Propose which GlassFolio field each column of any broker/bank CSV should feed, from its header and its cells (works on unknown layouts and foreign languages). Every column is reported as matched, ambiguous (a weak or contested guess) or unmatched, with example values and alternatives, so the user only has to decide the doubtful ones. Nothing is saved.Lecture seulerecord_transactionRecord a new financial transaction (Buy, Sell, Deposit, Withdrawal). Requires explicit human confirmation before execution.Demande votre approbationresend_verification_emailSend a new verification email (security code + confirmation link) to the current account address. Only for unverified email/password accounts. Requires explicit user confirmation.Demande votre approbationrotate_encryption_keyInitiate rotation of the Data Encryption Key (DEK) to re-encrypt all stored records with a fresh AES-256-GCM key. For client-side envelope encryption security, the master password cannot be accepted via AI tool arguments; this action directs the user to the interactive in-app step-up re-wrapping flow.Demande votre approbationset_cost_basis_methodChange the cost basis method of an account (WAC = weighted average cost / PRU, FIFO = first in first out) and recompute its positions and realized P&L. Requires explicit human confirmation before execution.Demande votre approbationsimulate_tax_impactSimulate French flat-tax (PFU: income tax + social contributions, at the rates of the fiscal year) impact for a hypothetical capital gain.Lecture seulesuggest_next_milestoneAnalyzes incomplete or partially unlocked achievements and recommends the closest financial milestone within reach with actionable advice.Lecture seuleupdate_instrumentEdit the metadata of an asset (name, symbol, type, ISIN, exchange, network, contract address, currency), for example to move a token from stocks to crypto. Positions and tax figures are recomputed. Identify the asset with instrumentId (see list_instruments) or its current symbol. Requires explicit human confirmation before execution.Demande votre approbation
Aller plus loin
L’assistant de l’application utilise les mêmes outils. Pour faire tourner toute l’application sur votre machine, lisez le guide d’auto-hébergement.
Poser une question