
Mcp Firefly Iii
io.github.YakupEmreYerli由 GitHub 帳號 YakupEmreYerli 發布v1.1.2更新於 Oct 24, 2026
Security-first, self-hosted MCP server for Firefly III — 152 operations behind 5 scoped tools.
概覽
自架式的 MCP 伺服器,讓 AI 助理透過五個分權工具讀取、修改和刪除你自己 Firefly III 個人財務實例中的資料。
- 可以做什麼
- 透過 firefly_query 讀取任何 Firefly III 資料,包括帳戶、交易、預算、分類、報表和洞察端點;操作目錄寫在工具描述中,並可用 fields 清單裁剪回應欄位。用 firefly_mutate 建立或修改記錄,可先用 dry_run 預覽將送出的完整請求。用 firefly_destructive 刪除記錄或批次改寫某一欄位,該工具獨立隔離,無法經由讀取工具觸及。用 firefly_list_operations 和 firefly_get_schema 查詢可用操作及其參數。依篩選條件的批次更新必須提供 max_matches,掃描不完整時會在第一次寫入前拒絕執行。
- 適用情境
- 適合把財務資料放在自架 Firefly III 實例、希望助理回答支出問題、找出未分類或金額變動的交易,並把確認後的修改寫回實例的使用者。讀取、寫入與刪除分離的設計,適合要求寫入明確且可預覽的情境。
- 執行需求
- 需要執行中的 Firefly III 實例和個人存取權杖(FIREFLY_API_TOKEN),以及實例位址 FIREFLY_API_URL。npm 套件需 Node.js 20.6+,也可使用 Docker。遠端 HTTP 模式另需 MCP_HTTP_TOKEN 或 MCP_AUTH_PASSWORD、MCP_RESOURCE_URL,以及前方有 TLS 的公開 HTTPS 位址。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Mcp Firefly Iii,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Firefly III MCP Server
[npm version] [CI] [license] [MCP Registry] [Glama]
A Model Context Protocol server that gives an AI assistant access to your own Firefly III instance — 152 operations behind 5 scoped tools, with reading, writing and deleting kept as three separate, explicitly-authorized surfaces instead of one tool that can do all three.
Türkçe: README.tr.md
- "What did I spend the most on last month?"
- "Find uncategorised transactions from August and suggest categories."
- "Show me subscriptions whose amount went up."
Everyone runs this against their own Firefly instance with their own token — there is no hosted backend or relay in between.
Listed in the official MCP Registry as io.github.YakupEmreYerli/mcp-firefly-iii, on Glama, and in Firefly III's own third-party apps documentation. Every release is built and published by CI from a tagged commit, with npm provenance attesting that the tarball came from this repository.
Demo
https://github.com/user-attachments/assets/4866f13e-ff09-43b0-b99c-2b4789a30224
38-second demo: ask a financial question, read the answer through MCP, preview a change with dry_run, approve it, and write it back to Firefly III. Recorded against a synthetic instance — all financial data shown is fabricated.
Features
- 5 meta-tools, not 152.
firefly_query,firefly_mutate,firefly_destructive, plusfirefly_list_operationsandfirefly_get_schemafor discovery — a typed registry maps every Firefly endpoint onto these instead of flooding the model's tool list. dry_runon every write, returning the exact request — resolved record IDs included — without sending it.- Bulk writes can't run blind. Filter-driven updates require
max_matchesand refuse an incomplete scan before the first write; multi-split transaction groups are rejected outright rather than risk folding their amounts together. - Read/write/destructive are separately scoped and enforced, not just annotated — over stdio by the Firefly token, over HTTP by OAuth scope or a static token.
- Embedded OAuth 2.1 authorization server for Claude web, Claude mobile, and ChatGPT — no separate Keycloak or Authentik install.
- Docker images for
linux/amd64/linux/arm64, and a self-checking documentation pipeline that keeps the tool catalogue in sync with the code. - It tells you when it is out of date. Once a day it checks whether a newer version exists and, if so, says so once — a line on stderr, a sentence beside the next answer.
MCP_UPDATE_CHECK=falseturns it off.
Prerequisites
- A running Firefly III instance and a Personal Access Token (Firefly III → Options → Profile → OAuth → Create New Personal Access Token)
- Node.js 20.6+, unless you're using Docker
Usage
1. stdio (Claude Code, Claude Desktop, Cursor)
Let setup do it — it asks for your Firefly III address and token, checks that they actually work, then configures Claude Code and Claude Desktop if it finds them: npx -y @yakupemreyerli/firefly-mcp setup. For any other client it prints the configuration to paste.
By hand, Claude Code:
By hand, Claude Desktop / Cursor / other clients — add to the MCP config file:
2. Remote HTTP with a static token
For n8n, automation, or any caller that can't drive a browser-based OAuth flow. Set MCP_HTTP_TOKEN in .env, then run npx -y -p @yakupemreyerli/firefly-mcp firefly-mcp-http. Every request to /mcp must carry Authorization: Bearer <token> — one token, full access, no per-connection scoping.
3. Remote HTTP with OAuth (Claude web, Claude mobile, ChatGPT)
None of these clients can hold a static token, and none of them can spawn a local process — they connect to a public HTTPS URL and expect OAuth. With MCP_AUTH_PASSWORD set, this server is the OAuth 2.1 authorization server: it handles client registration, PKCE and token exchange itself, so there is no Keycloak, no Google sign-in, and no token to copy anywhere.
Step 1 — give the server a public HTTPS address. Cloudflare Tunnel is the easiest route for a home server (no port forwarding, no certificate); Caddy or Traefik work on a VPS. compose.example.yml ships cloudflare and caddy profiles for exactly this. Say the result is https://mcp.example.com.
Step 2 — configure .env:
MCP_RESOURCE_URL is the external origin, character for character, with no path — not the internal http://firefly-mcp:3000, and not the /mcp connection URL. A mismatch fails the token audience check and the client only reports "invalid token". MCP_AUTH_STATE_DIR must sit on a persistent volume (compose.example.yml mounts one) or every restart de-authorizes every client.
Step 3 — start it and verify:
If auth says bearer instead, the password never reached the process and the client will report that the server doesn't support OAuth.
Step 4a — Claude (web, Desktop, iOS/Android). Settings → Connectors → Add custom connector, URL https://mcp.example.com/mcp. Leave the authentication choices as detected — Claude probes the server and picks the flow it supports. The connector then works on every Claude surface you're signed into, phone included.
Step 4b — ChatGPT. In the custom connector / MCP screen, enter the same https://mcp.example.com/mcp and choose OAuth as the authentication method.
Step 5 — enter the password. A Firefly login screen opens in the browser; type MCP_AUTH_PASSWORD. That one screen is the whole decision — the connection is granted all three scopes (firefly:read, firefly:write, firefly:destructive), whatever the client itself asked for. There is no second consent screen: whoever holds the password could have ticked every box on it. To hand out a connection that genuinely cannot write, give the server a read-only Firefly Personal Access Token instead.
Full TLS recipes and troubleshooting: docs/oauth.md.
4. Docker
Recommended for either HTTP mode above:
Swap build: . in compose.example.yml for image: ghcr.io/yakupemreyerli/mcp-firefly-iii:latest to use the prebuilt image — pin a version tag, not :latest, for anything you depend on. Single container without Compose: docker run -d --env-file .env -p 3000:3000 ghcr.io/yakupemreyerli/mcp-firefly-iii:latest. It refuses to start without one of the two auth modes above, and /mcp needs TLS in front — compose.example.yml has optional cloudflare and caddy profiles for that. /health is open, for container probes.
Configuration
Every variable, including HTTP and OAuth mode: docs/configuration.md.
Tools
The split is enforced, not just advertised — a delete reached through firefly_query is refused, and a connection granted only firefly:read never even sees the two writing tools. Responses are trimmed before they reach the model: empty and null attributes are always dropped, and every execution tool takes a fields list — roughly a 90% cut on a large transaction list. Full reference: docs/api/operations.md.
Security
This server never sends your data to a third party, but it doesn't control what the AI client or model you connect it to does with a response once it has one. Full threat model: SECURITY.md. Found a vulnerability? Report it privately there.
Documentation
Development
Tests are mocked and never reach the network. npm run smoke:live is a maintainer tool that walks every read operation against the instance in .env; it is read-only and not part of the published package. Bug reports and pull requests are welcome — see CONTRIBUTING.md.
License
MIT — see LICENSE.
The flame-and-piggy logo in the banner and in docs/assets/ is Firefly III's own logo, not covered by this licence. It is used, as its logo guidelines allow, to refer to Firefly III; this project is not made or endorsed by Firefly III.
來源:README.md,提交 2b53a4e
工具
0版本歷史
1- v1.1.2最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分