@daften/fireflyiii-mcp 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +15 -0
- package/CHANGELOG.md +28 -0
- package/LICENSE +21 -0
- package/README.md +605 -0
- package/dist/args.d.ts +10 -0
- package/dist/args.d.ts.map +1 -0
- package/dist/args.js +65 -0
- package/dist/args.js.map +1 -0
- package/dist/client.d.ts +25 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +146 -0
- package/dist/client.js.map +1 -0
- package/dist/http.d.ts +13 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +271 -0
- package/dist/http.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +44 -0
- package/dist/index.js.map +1 -0
- package/dist/server.d.ts +5 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +13 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/_annotations.d.ts +17 -0
- package/dist/tools/_annotations.d.ts.map +1 -0
- package/dist/tools/_annotations.js +9 -0
- package/dist/tools/_annotations.js.map +1 -0
- package/dist/tools/_helpers.d.ts +17 -0
- package/dist/tools/_helpers.d.ts.map +1 -0
- package/dist/tools/_helpers.js +24 -0
- package/dist/tools/_helpers.js.map +1 -0
- package/dist/tools/accounts.d.ts +48 -0
- package/dist/tools/accounts.d.ts.map +1 -0
- package/dist/tools/accounts.js +151 -0
- package/dist/tools/accounts.js.map +1 -0
- package/dist/tools/attachments.d.ts +31 -0
- package/dist/tools/attachments.d.ts.map +1 -0
- package/dist/tools/attachments.js +112 -0
- package/dist/tools/attachments.js.map +1 -0
- package/dist/tools/bills.d.ts +43 -0
- package/dist/tools/bills.d.ts.map +1 -0
- package/dist/tools/bills.js +112 -0
- package/dist/tools/bills.js.map +1 -0
- package/dist/tools/budgets.d.ts +65 -0
- package/dist/tools/budgets.d.ts.map +1 -0
- package/dist/tools/budgets.js +209 -0
- package/dist/tools/budgets.js.map +1 -0
- package/dist/tools/categories.d.ts +27 -0
- package/dist/tools/categories.d.ts.map +1 -0
- package/dist/tools/categories.js +83 -0
- package/dist/tools/categories.js.map +1 -0
- package/dist/tools/currencies.d.ts +32 -0
- package/dist/tools/currencies.d.ts.map +1 -0
- package/dist/tools/currencies.js +104 -0
- package/dist/tools/currencies.js.map +1 -0
- package/dist/tools/exports.d.ts +10 -0
- package/dist/tools/exports.d.ts.map +1 -0
- package/dist/tools/exports.js +37 -0
- package/dist/tools/exports.js.map +1 -0
- package/dist/tools/index.d.ts +14 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +94 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/object-groups.d.ts +30 -0
- package/dist/tools/object-groups.d.ts.map +1 -0
- package/dist/tools/object-groups.js +107 -0
- package/dist/tools/object-groups.js.map +1 -0
- package/dist/tools/piggy-banks.d.ts +41 -0
- package/dist/tools/piggy-banks.d.ts.map +1 -0
- package/dist/tools/piggy-banks.js +110 -0
- package/dist/tools/piggy-banks.js.map +1 -0
- package/dist/tools/recurring.d.ts +70 -0
- package/dist/tools/recurring.d.ts.map +1 -0
- package/dist/tools/recurring.js +279 -0
- package/dist/tools/recurring.js.map +1 -0
- package/dist/tools/reports.d.ts +40 -0
- package/dist/tools/reports.d.ts.map +1 -0
- package/dist/tools/reports.js +413 -0
- package/dist/tools/reports.js.map +1 -0
- package/dist/tools/rules.d.ts +105 -0
- package/dist/tools/rules.d.ts.map +1 -0
- package/dist/tools/rules.js +361 -0
- package/dist/tools/rules.js.map +1 -0
- package/dist/tools/transaction-links.d.ts +30 -0
- package/dist/tools/transaction-links.d.ts.map +1 -0
- package/dist/tools/transaction-links.js +91 -0
- package/dist/tools/transaction-links.js.map +1 -0
- package/dist/tools/transactions.d.ts +72 -0
- package/dist/tools/transactions.d.ts.map +1 -0
- package/dist/tools/transactions.js +262 -0
- package/dist/tools/transactions.js.map +1 -0
- package/dist/transform.d.ts +48 -0
- package/dist/transform.d.ts.map +1 -0
- package/dist/transform.js +29 -0
- package/dist/transform.js.map +1 -0
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +61 -0
package/.env.example
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Required for both transports
|
|
2
|
+
FIREFLY_URL=https://your-firefly-instance.example.com
|
|
3
|
+
|
|
4
|
+
# Required for stdio transport (default)
|
|
5
|
+
FIREFLY_TOKEN=your-personal-access-token-here
|
|
6
|
+
|
|
7
|
+
# Required for HTTP transport (--transport http)
|
|
8
|
+
# Create a public OAuth client in Firefly III: Profile → OAuth → OAuth Clients → Create New Client
|
|
9
|
+
# Mark as "Public client" (no secret required — uses PKCE).
|
|
10
|
+
# Copy the Client ID here:
|
|
11
|
+
# FIREFLY_OAUTH_CLIENT_ID=your-oauth-client-id-here
|
|
12
|
+
|
|
13
|
+
# Required for HTTP transport when not on loopback (e.g. Docker, reverse proxy)
|
|
14
|
+
# Public base URL of THIS MCP server — used to construct OAuth redirect URIs.
|
|
15
|
+
MCP_BASE_URL=https://mcp.example.com
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
## [0.1.0] - 2026-05-23
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
- Initial release of the Firefly III MCP server.
|
|
20
|
+
- 140 tools across 14 groups: accounts, transactions, budgets, categories, bills, piggy banks, reports (tags + insights), automation rules, recurring transactions, attachments, currencies, data exports, object groups, transaction links.
|
|
21
|
+
- Two transports: stdio (Personal Access Token auth) and HTTP (OAuth 2.0 + PKCE with a built-in proxy for redirect-URI substitution).
|
|
22
|
+
- Tool filtering via `--preset`, `--groups`, and `--read-only` CLI flags. Presets: `minimal`, `default`, `budgeting`, `insights`, `automation`, `full`.
|
|
23
|
+
- Published as the `@daften/fireflyiii-mcp` npm package and the `ghcr.io/daften/fireflyiii-mcp` multi-arch Docker image (linux/amd64, linux/arm64).
|
|
24
|
+
- npm publish provenance via GitHub OIDC.
|
|
25
|
+
- GitHub Release auto-created from the tag annotation on each `v*` tag push.
|
|
26
|
+
|
|
27
|
+
[Unreleased]: https://github.com/daften/fireflyiii-mcp/compare/v0.1.0...HEAD
|
|
28
|
+
[0.1.0]: https://github.com/daften/fireflyiii-mcp/releases/tag/v0.1.0
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Dieter Blomme
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,605 @@
|
|
|
1
|
+
# Firefly III MCP Server
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@daften/fireflyiii-mcp)
|
|
4
|
+
[](https://www.npmjs.com/package/@daften/fireflyiii-mcp)
|
|
5
|
+
[](https://github.com/daften/fireflyiii-mcp/actions/workflows/ci.yml)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
|
|
8
|
+
An [MCP (Model Context Protocol)](https://modelcontextprotocol.io) server that connects Claude to your [Firefly III](https://www.firefly-iii.org) personal finance instance. Ask Claude questions about your finances in natural language.
|
|
9
|
+
|
|
10
|
+
## What you can ask Claude
|
|
11
|
+
|
|
12
|
+
Once configured, you can ask things like:
|
|
13
|
+
|
|
14
|
+
- *"How much did I spend on groceries last month?"*
|
|
15
|
+
- *"Show me my budget status for this month."*
|
|
16
|
+
- *"Find any duplicate transactions in the last 30 days."*
|
|
17
|
+
- *"Set up a piggy bank for my vacation fund with a €2000 target."*
|
|
18
|
+
- *"What were my biggest expense categories this year?"*
|
|
19
|
+
|
|
20
|
+
Claude handles the translation to Firefly III API calls — you get answers in plain English.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
Choose your setup method:
|
|
25
|
+
|
|
26
|
+
| Method | Transport | Best for |
|
|
27
|
+
|--------|-----------|----------|
|
|
28
|
+
| [npm — stdio](#option-1-npm-package--stdio-simplest) | stdio | Simplest setup, Claude on the same machine |
|
|
29
|
+
| [npm — HTTP](#option-2-npm-package--http-oauth) | HTTP + OAuth | Claude.ai or when you prefer OAuth over a PAT |
|
|
30
|
+
| [Docker — HTTP](#option-3-docker--http-self-hosted) | HTTP + OAuth | Self-hosted on a server or home lab |
|
|
31
|
+
| [Git checkout](#option-4-git-checkout-development) | stdio or HTTP | Contributing or local development |
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Option 1: npm package — stdio (simplest)
|
|
36
|
+
|
|
37
|
+
**Requires:** Node.js 20+, a Firefly III Personal Access Token (Profile → OAuth → Personal Access Tokens).
|
|
38
|
+
|
|
39
|
+
Add to your Claude MCP config (`.claude/mcp.json` or Claude Desktop `claude_desktop_config.json`):
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"mcpServers": {
|
|
44
|
+
"fireflyiii": {
|
|
45
|
+
"command": "npx",
|
|
46
|
+
"args": ["-y", "@daften/fireflyiii-mcp"],
|
|
47
|
+
"env": {
|
|
48
|
+
"FIREFLY_URL": "https://your-firefly-instance.example.com",
|
|
49
|
+
"FIREFLY_TOKEN": "your-personal-access-token-here"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Claude downloads and starts the server automatically on first use. No separate install step needed.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Option 2: npm package — HTTP (OAuth)
|
|
61
|
+
|
|
62
|
+
HTTP mode uses OAuth (Authorization Code + PKCE) instead of a Personal Access Token. The MCP client handles the OAuth flow automatically on first connection.
|
|
63
|
+
|
|
64
|
+
**Requires:** Node.js 20+.
|
|
65
|
+
|
|
66
|
+
### Step 1: Register an OAuth client in Firefly III
|
|
67
|
+
|
|
68
|
+
Go to **Profile → OAuth → OAuth Clients → Create New Client**:
|
|
69
|
+
|
|
70
|
+
| Field | Value |
|
|
71
|
+
|-------|-------|
|
|
72
|
+
| **Name** | Anything, e.g. `Claude MCP` |
|
|
73
|
+
| **Redirect URL** | `http://127.0.0.1:3000/oauth/callback` |
|
|
74
|
+
| **Confidential** | **Uncheck this box** |
|
|
75
|
+
|
|
76
|
+
Save and copy the **Client ID** (you do not need the secret).
|
|
77
|
+
|
|
78
|
+
> **Why uncheck Confidential?**
|
|
79
|
+
> Confidential clients require a secret stored securely on a server. PKCE-based flows use a code verifier instead, which is safe for clients (like Claude) that cannot securely store a secret. Unchecking "Confidential" creates a *public client* — the correct choice here.
|
|
80
|
+
|
|
81
|
+
> **Why this specific redirect URL?**
|
|
82
|
+
> Claude uses a random port for its OAuth callback (e.g. `http://localhost:61234/callback`), but Firefly III requires an exact URI match. This server acts as an OAuth proxy: it intercepts the request, substitutes its own stable callback URL (`http://127.0.0.1:3000/oauth/callback`), and forwards the authorization code back to Claude's real callback. Register this URL once and never touch it again.
|
|
83
|
+
|
|
84
|
+
### Step 2: Start the server
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
FIREFLY_URL=https://your-firefly-instance.example.com \
|
|
88
|
+
FIREFLY_OAUTH_CLIENT_ID=your-client-id \
|
|
89
|
+
npx @daften/fireflyiii-mcp --transport http
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
To use a different port: add `--port 4000`. Or install globally and omit `npx`:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
npm install -g @daften/fireflyiii-mcp
|
|
96
|
+
FIREFLY_URL=... FIREFLY_OAUTH_CLIENT_ID=... fireflyiii-mcp --transport http
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Step 3: Connect Claude
|
|
100
|
+
|
|
101
|
+
```json
|
|
102
|
+
{
|
|
103
|
+
"mcpServers": {
|
|
104
|
+
"fireflyiii": {
|
|
105
|
+
"type": "http",
|
|
106
|
+
"url": "http://127.0.0.1:3000"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Or via the CLI:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
claude mcp add --transport http fireflyiii http://127.0.0.1:3000
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
The `type: "http"` field is required — without it Claude Code assumes stdio and fails. On first connection Claude opens a browser to authorize with Firefly III; tokens are managed automatically after that.
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Option 3: Docker — HTTP (self-hosted)
|
|
123
|
+
|
|
124
|
+
Docker runs in HTTP mode only. Suitable for hosting on a server or home lab where Claude connects over the network.
|
|
125
|
+
|
|
126
|
+
### Step 1: Register an OAuth client in Firefly III
|
|
127
|
+
|
|
128
|
+
Same as Option 2, Step 1, but use your container's public URL as the redirect URI:
|
|
129
|
+
|
|
130
|
+
| Field | Value |
|
|
131
|
+
|-------|-------|
|
|
132
|
+
| **Redirect URL** | `https://mcp.example.com/oauth/callback` |
|
|
133
|
+
| **Confidential** | **Uncheck** |
|
|
134
|
+
|
|
135
|
+
Replace `https://mcp.example.com` with your actual `MCP_BASE_URL`.
|
|
136
|
+
|
|
137
|
+
### Step 2: Run the container
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
docker run \
|
|
141
|
+
-e FIREFLY_URL=https://your-firefly-instance.example.com \
|
|
142
|
+
-e FIREFLY_OAUTH_CLIENT_ID=your-client-id \
|
|
143
|
+
-e MCP_BASE_URL=https://mcp.example.com \
|
|
144
|
+
-p 3000:3000 \
|
|
145
|
+
ghcr.io/daften/fireflyiii-mcp:latest
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
`MCP_BASE_URL` is the externally reachable URL of your container — used to build OAuth redirect URIs. If omitted the server falls back to the `Host` request header, which is unreliable behind a reverse proxy.
|
|
149
|
+
|
|
150
|
+
Or with docker-compose (copy `docker-compose.yml` from the repo):
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
# Option A: use a .env file (copy .env.example and fill in values)
|
|
154
|
+
cp .env.example .env # then edit .env
|
|
155
|
+
docker compose up -d
|
|
156
|
+
|
|
157
|
+
# Option B: export variables in your shell
|
|
158
|
+
FIREFLY_URL=https://your-firefly-instance.example.com \
|
|
159
|
+
FIREFLY_OAUTH_CLIENT_ID=your-client-id \
|
|
160
|
+
MCP_BASE_URL=https://mcp.example.com \
|
|
161
|
+
docker compose up -d
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
To build the image locally instead of pulling from the registry, uncomment `build: .` in `docker-compose.yml`.
|
|
165
|
+
|
|
166
|
+
> **Note:** OAuth state is held in-process. Run only a single replica — multiple replicas will break the OAuth flow because the callback may land on a different instance than the one that initiated authorization.
|
|
167
|
+
|
|
168
|
+
### Step 3: Connect Claude
|
|
169
|
+
|
|
170
|
+
```json
|
|
171
|
+
{
|
|
172
|
+
"mcpServers": {
|
|
173
|
+
"fireflyiii": {
|
|
174
|
+
"type": "http",
|
|
175
|
+
"url": "https://mcp.example.com"
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## Option 4: Git checkout (development)
|
|
184
|
+
|
|
185
|
+
### Setup
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
git clone https://github.com/daften/fireflyiii-mcp.git
|
|
189
|
+
cd fireflyiii-mcp
|
|
190
|
+
npm install
|
|
191
|
+
npm run build
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### stdio mode
|
|
195
|
+
|
|
196
|
+
Create `.env` from `.env.example`:
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
FIREFLY_URL=https://your-firefly-instance.example.com
|
|
200
|
+
FIREFLY_TOKEN=your-personal-access-token-here
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Add to your Claude MCP config:
|
|
204
|
+
|
|
205
|
+
```json
|
|
206
|
+
{
|
|
207
|
+
"mcpServers": {
|
|
208
|
+
"fireflyiii": {
|
|
209
|
+
"command": "node",
|
|
210
|
+
"args": ["/absolute/path/to/fireflyiii-mcp/dist/index.js"],
|
|
211
|
+
"env": {
|
|
212
|
+
"FIREFLY_URL": "https://your-firefly-instance.example.com",
|
|
213
|
+
"FIREFLY_TOKEN": "your-personal-access-token-here"
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Use `npm run dev` instead of `node dist/index.js` during development to skip the build step.
|
|
221
|
+
|
|
222
|
+
### HTTP mode
|
|
223
|
+
|
|
224
|
+
Register an OAuth client in Firefly III as described in Option 2, Step 1, then add to `.env`:
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
FIREFLY_URL=https://your-firefly-instance.example.com
|
|
228
|
+
FIREFLY_OAUTH_CLIENT_ID=your-client-id-here
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Start the server:
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
npm run dev -- --transport http
|
|
235
|
+
# or after building:
|
|
236
|
+
node dist/index.js --transport http
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
Connect Claude as in Option 2, Step 3.
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## OAuth discovery
|
|
244
|
+
|
|
245
|
+
The server exposes `GET /.well-known/oauth-authorization-server` (no auth required) which returns RFC 8414 metadata. MCP clients use this to discover OAuth endpoints automatically — no manual OAuth configuration needed in the client.
|
|
246
|
+
|
|
247
|
+
## Available Tools
|
|
248
|
+
|
|
249
|
+
### Accounts
|
|
250
|
+
|
|
251
|
+
<details>
|
|
252
|
+
<summary><b>7 tools</b> — click to expand</summary>
|
|
253
|
+
|
|
254
|
+
| Tool | Description |
|
|
255
|
+
|------|-------------|
|
|
256
|
+
| `get_accounts` | List all accounts, filterable by type |
|
|
257
|
+
| `get_account` | Get a single account by ID with current balance |
|
|
258
|
+
| `create_account` | Create a new account |
|
|
259
|
+
| `update_account` | Update an existing account |
|
|
260
|
+
| `delete_account` | Delete an account. This action cannot be undone. |
|
|
261
|
+
| `get_account_transactions` | Get all transactions for a specific account, filterable by type and date range |
|
|
262
|
+
| `search_accounts` | Search accounts by name, IBAN, or account number |
|
|
263
|
+
|
|
264
|
+
</details>
|
|
265
|
+
|
|
266
|
+
### Transactions
|
|
267
|
+
|
|
268
|
+
<details>
|
|
269
|
+
<summary><b>8 tools</b> — click to expand</summary>
|
|
270
|
+
|
|
271
|
+
| Tool | Description |
|
|
272
|
+
|------|-------------|
|
|
273
|
+
| `get_transactions` | List transactions with filters (account, date, type) |
|
|
274
|
+
| `get_transaction` | Get a single transaction by ID with all splits |
|
|
275
|
+
| `search_transactions` | Keyword search across transactions |
|
|
276
|
+
| `create_transaction` | Create a new transaction |
|
|
277
|
+
| `create_split_transaction` | Create a split transaction (one receipt across multiple categories/budgets) |
|
|
278
|
+
| `update_transaction` | Update an existing transaction |
|
|
279
|
+
| `bulk_update_transactions` | Update multiple transactions at once using a search query |
|
|
280
|
+
| `delete_transaction` | Delete a transaction. This action cannot be undone. |
|
|
281
|
+
|
|
282
|
+
</details>
|
|
283
|
+
|
|
284
|
+
### Budgets
|
|
285
|
+
|
|
286
|
+
<details>
|
|
287
|
+
<summary><b>12 tools</b> — click to expand</summary>
|
|
288
|
+
|
|
289
|
+
| Tool | Description |
|
|
290
|
+
|------|-------------|
|
|
291
|
+
| `get_budgets` | List all budgets with spent/available amounts |
|
|
292
|
+
| `get_budget_limits` | Get budget limits for a specific budget and period |
|
|
293
|
+
| `create_budget` | Create a new budget |
|
|
294
|
+
| `update_budget` | Update an existing budget |
|
|
295
|
+
| `delete_budget` | Delete a budget. This action cannot be undone. |
|
|
296
|
+
| `create_budget_limit` | Create a budget limit for a specific period |
|
|
297
|
+
| `update_budget_limit` | Update an existing budget limit |
|
|
298
|
+
| `delete_budget_limit` | Delete a budget limit. This action cannot be undone. |
|
|
299
|
+
| `get_available_budgets` | List all available budget periods with amounts available |
|
|
300
|
+
| `get_available_budget` | Get a single available budget period by ID |
|
|
301
|
+
| `get_budget_transactions` | Get all transactions assigned to a specific budget |
|
|
302
|
+
| `get_transactions_without_budget` | Get transactions that have no budget assigned |
|
|
303
|
+
|
|
304
|
+
</details>
|
|
305
|
+
|
|
306
|
+
### Categories
|
|
307
|
+
|
|
308
|
+
<details>
|
|
309
|
+
<summary><b>5 tools</b> — click to expand</summary>
|
|
310
|
+
|
|
311
|
+
| Tool | Description |
|
|
312
|
+
|------|-------------|
|
|
313
|
+
| `get_categories` | List all categories |
|
|
314
|
+
| `get_category_transactions` | Get transactions for a specific category |
|
|
315
|
+
| `create_category` | Create a new category |
|
|
316
|
+
| `update_category` | Update an existing category |
|
|
317
|
+
| `delete_category` | Delete a category. This action cannot be undone. |
|
|
318
|
+
|
|
319
|
+
</details>
|
|
320
|
+
|
|
321
|
+
### Bills
|
|
322
|
+
|
|
323
|
+
<details>
|
|
324
|
+
<summary><b>5 tools</b> — click to expand</summary>
|
|
325
|
+
|
|
326
|
+
| Tool | Description |
|
|
327
|
+
|------|-------------|
|
|
328
|
+
| `get_bills` | List all bills with next expected match date |
|
|
329
|
+
| `create_bill` | Create a new bill |
|
|
330
|
+
| `update_bill` | Update an existing bill |
|
|
331
|
+
| `delete_bill` | Delete a bill. This action cannot be undone. |
|
|
332
|
+
| `get_bill_transactions` | Get all transactions linked to a specific bill |
|
|
333
|
+
|
|
334
|
+
</details>
|
|
335
|
+
|
|
336
|
+
### Piggy Banks
|
|
337
|
+
|
|
338
|
+
<details>
|
|
339
|
+
<summary><b>7 tools</b> — click to expand</summary>
|
|
340
|
+
|
|
341
|
+
| Tool | Description |
|
|
342
|
+
|------|-------------|
|
|
343
|
+
| `get_piggy_banks` | List all piggy banks with current/target amounts |
|
|
344
|
+
| `create_piggy_bank` | Create a new piggy bank |
|
|
345
|
+
| `update_piggy_bank` | Update an existing piggy bank |
|
|
346
|
+
| `delete_piggy_bank` | Delete a piggy bank. This action cannot be undone. |
|
|
347
|
+
| `get_piggy_bank_events` | Get all deposit/withdrawal events for a piggy bank |
|
|
348
|
+
| `create_piggy_bank_event` | Add a deposit or withdrawal event to a piggy bank |
|
|
349
|
+
| `delete_piggy_bank_event` | Delete a piggy bank event. This action cannot be undone. |
|
|
350
|
+
|
|
351
|
+
</details>
|
|
352
|
+
|
|
353
|
+
### Recurring Transactions
|
|
354
|
+
|
|
355
|
+
<details>
|
|
356
|
+
<summary><b>7 tools</b> — click to expand</summary>
|
|
357
|
+
|
|
358
|
+
| Tool | Description |
|
|
359
|
+
|------|-------------|
|
|
360
|
+
| `get_recurring` | List all recurring transaction rules |
|
|
361
|
+
| `get_recurrence` | Get a single recurring transaction rule by ID |
|
|
362
|
+
| `create_recurring` | Create a new recurring transaction rule |
|
|
363
|
+
| `update_recurring` | Update an existing recurring transaction rule |
|
|
364
|
+
| `delete_recurring` | Delete a recurring transaction rule. This action cannot be undone. |
|
|
365
|
+
| `get_recurrence_transactions` | Get transactions created by a recurring transaction rule |
|
|
366
|
+
| `trigger_recurrence` | Manually fire a recurring rule to create its transaction immediately |
|
|
367
|
+
|
|
368
|
+
</details>
|
|
369
|
+
|
|
370
|
+
### Automation Rules
|
|
371
|
+
|
|
372
|
+
<details>
|
|
373
|
+
<summary><b>15 tools</b> — click to expand</summary>
|
|
374
|
+
|
|
375
|
+
| Tool | Description |
|
|
376
|
+
|------|-------------|
|
|
377
|
+
| `get_rule_groups` | List all rule groups |
|
|
378
|
+
| `get_rule_group` | Get a single rule group by ID |
|
|
379
|
+
| `create_rule_group` | Create a new rule group |
|
|
380
|
+
| `update_rule_group` | Update an existing rule group |
|
|
381
|
+
| `delete_rule_group` | Delete a rule group and all its rules. This action cannot be undone. |
|
|
382
|
+
| `get_rules` | List all automation rules |
|
|
383
|
+
| `get_rule` | Get a single rule by ID |
|
|
384
|
+
| `create_rule` | Create a new automation rule with trigger conditions and actions |
|
|
385
|
+
| `update_rule` | Update an existing automation rule |
|
|
386
|
+
| `delete_rule` | Delete an automation rule. This action cannot be undone. |
|
|
387
|
+
| `trigger_rule_group` | Manually run all rules in a group against existing transactions |
|
|
388
|
+
| `trigger_rule` | Manually run a single rule against existing transactions |
|
|
389
|
+
| `test_rule_group` | Dry-run a rule group and return matching transactions (no changes applied) |
|
|
390
|
+
| `test_rule` | Dry-run a single rule and return matching transactions (no changes applied) |
|
|
391
|
+
| `get_rule_group_rules` | Get all rules belonging to a specific rule group |
|
|
392
|
+
|
|
393
|
+
</details>
|
|
394
|
+
|
|
395
|
+
### Attachments
|
|
396
|
+
|
|
397
|
+
<details>
|
|
398
|
+
<summary><b>7 tools</b> — click to expand</summary>
|
|
399
|
+
|
|
400
|
+
| Tool | Description |
|
|
401
|
+
|------|-------------|
|
|
402
|
+
| `get_attachments` | List all file attachments |
|
|
403
|
+
| `get_attachment` | Get a single attachment by ID |
|
|
404
|
+
| `create_attachment` | Create attachment metadata (step 1 of 2 — use `upload_attachment` to send file content) |
|
|
405
|
+
| `update_attachment` | Update attachment metadata |
|
|
406
|
+
| `delete_attachment` | Delete an attachment and its file data. This action cannot be undone. |
|
|
407
|
+
| `upload_attachment` | Upload base64-encoded file content for an existing attachment record (step 2 of 2) |
|
|
408
|
+
| `download_attachment` | Download the raw content of an attachment as text |
|
|
409
|
+
|
|
410
|
+
</details>
|
|
411
|
+
|
|
412
|
+
### Tags & Reports
|
|
413
|
+
|
|
414
|
+
<details>
|
|
415
|
+
<summary><b>37 tools</b> — click to expand</summary>
|
|
416
|
+
|
|
417
|
+
| Tool | Description |
|
|
418
|
+
|------|-------------|
|
|
419
|
+
| `get_tags` | List all tags |
|
|
420
|
+
| `get_tag_transactions` | Get transactions for a specific tag |
|
|
421
|
+
| `create_tag` | Create a new tag |
|
|
422
|
+
| `update_tag` | Update an existing tag |
|
|
423
|
+
| `delete_tag` | Delete a tag. This action cannot be undone. |
|
|
424
|
+
| `get_summary` | Basic balance summary (total assets, net worth) |
|
|
425
|
+
| `get_insight_expenses` | Expense insights grouped by category for a date range |
|
|
426
|
+
| `get_insight_income` | Income insights grouped by category for a date range |
|
|
427
|
+
| `get_insight_expenses_no_bill` | Expense totals for transactions with no bill attached |
|
|
428
|
+
| `get_insight_expenses_no_budget` | Expense totals for transactions with no budget attached |
|
|
429
|
+
| `get_insight_expenses_no_category` | Expense totals for transactions with no category attached |
|
|
430
|
+
| `get_insight_expenses_no_tag` | Expense totals for transactions with no tag attached |
|
|
431
|
+
| `get_insight_income_no_category` | Income totals for transactions with no category attached |
|
|
432
|
+
| `get_insight_income_no_tag` | Income totals for transactions with no tag attached |
|
|
433
|
+
| `get_insight_transfer_no_category` | Transfer totals for transactions with no category attached |
|
|
434
|
+
| `get_insight_transfer_no_tag` | Transfer totals for transactions with no tag attached |
|
|
435
|
+
| `get_about` | Get Firefly III server info (version, PHP version, OS) |
|
|
436
|
+
| `get_net_worth_summary` | Get net worth summary for a date range |
|
|
437
|
+
| `get_account_overview_chart` | Get account overview chart data for a date range |
|
|
438
|
+
| `get_balance_chart` | Get account balance chart data for a date range |
|
|
439
|
+
| `get_budget_chart` | Get budget overview chart data for a date range |
|
|
440
|
+
| `get_category_chart` | Get category overview chart data for a date range |
|
|
441
|
+
| `get_exchange_rate` | Get exchange rate between two currencies |
|
|
442
|
+
| `get_insight_expenses_by_bill` | Expense insights grouped by bill for a date range |
|
|
443
|
+
| `get_insight_expenses_by_budget` | Expense insights grouped by budget for a date range |
|
|
444
|
+
| `get_insight_expenses_by_tag` | Expense insights grouped by tag for a date range |
|
|
445
|
+
| `get_insight_expenses_by_asset` | Expense insights grouped by asset account |
|
|
446
|
+
| `get_insight_expenses_by_expense_account` | Expense insights grouped by expense account |
|
|
447
|
+
| `get_insight_expenses_total` | Total expense amount for a date range |
|
|
448
|
+
| `get_insight_income_by_revenue` | Income insights grouped by revenue account |
|
|
449
|
+
| `get_insight_income_by_tag` | Income insights grouped by tag |
|
|
450
|
+
| `get_insight_income_by_asset` | Income insights grouped by asset account |
|
|
451
|
+
| `get_insight_income_total` | Total income amount for a date range |
|
|
452
|
+
| `get_insight_transfers_by_category` | Transfer insights grouped by category |
|
|
453
|
+
| `get_insight_transfers_by_tag` | Transfer insights grouped by tag |
|
|
454
|
+
| `get_insight_transfers_by_asset` | Transfer insights grouped by asset account |
|
|
455
|
+
| `get_insight_transfers_total` | Total transfer amount for a date range |
|
|
456
|
+
|
|
457
|
+
</details>
|
|
458
|
+
|
|
459
|
+
### Currencies
|
|
460
|
+
|
|
461
|
+
<details>
|
|
462
|
+
<summary><b>8 tools</b> — click to expand</summary>
|
|
463
|
+
|
|
464
|
+
| Tool | Description |
|
|
465
|
+
|------|-------------|
|
|
466
|
+
| `get_currencies` | List all currencies configured in Firefly III |
|
|
467
|
+
| `get_currency` | Get a single currency by code (e.g. EUR, USD) |
|
|
468
|
+
| `create_currency` | Create a new currency |
|
|
469
|
+
| `update_currency` | Update an existing currency |
|
|
470
|
+
| `enable_currency` | Enable a currency for use in transactions |
|
|
471
|
+
| `disable_currency` | Disable a currency |
|
|
472
|
+
| `set_primary_currency` | Set a currency as the primary/default currency |
|
|
473
|
+
| `delete_currency` | Delete a currency. This action cannot be undone. |
|
|
474
|
+
|
|
475
|
+
</details>
|
|
476
|
+
|
|
477
|
+
### Data Export
|
|
478
|
+
|
|
479
|
+
<details>
|
|
480
|
+
<summary><b>9 tools</b> — click to expand</summary>
|
|
481
|
+
|
|
482
|
+
| Tool | Description |
|
|
483
|
+
|------|-------------|
|
|
484
|
+
| `export_transactions` | Export all transactions as CSV (supports date filters) |
|
|
485
|
+
| `export_accounts` | Export all accounts as CSV |
|
|
486
|
+
| `export_bills` | Export all bills as CSV |
|
|
487
|
+
| `export_budgets` | Export all budgets as CSV |
|
|
488
|
+
| `export_categories` | Export all categories as CSV |
|
|
489
|
+
| `export_tags` | Export all tags as CSV |
|
|
490
|
+
| `export_recurring` | Export all recurring transactions as CSV |
|
|
491
|
+
| `export_rules` | Export all rules as CSV |
|
|
492
|
+
| `export_piggy_banks` | Export all piggy banks as CSV |
|
|
493
|
+
|
|
494
|
+
</details>
|
|
495
|
+
|
|
496
|
+
### Object Groups
|
|
497
|
+
|
|
498
|
+
<details>
|
|
499
|
+
<summary><b>7 tools</b> — click to expand</summary>
|
|
500
|
+
|
|
501
|
+
| Tool | Description |
|
|
502
|
+
|------|-------------|
|
|
503
|
+
| `get_object_groups` | List all object groups (used to organise accounts and piggy banks) |
|
|
504
|
+
| `get_object_group` | Get a single object group by ID |
|
|
505
|
+
| `create_object_group` | Create a new object group |
|
|
506
|
+
| `update_object_group` | Update an existing object group |
|
|
507
|
+
| `delete_object_group` | Delete an object group. This action cannot be undone. |
|
|
508
|
+
| `get_object_group_bills` | Get all bills in a specific object group |
|
|
509
|
+
| `get_object_group_piggy_banks` | Get all piggy banks in a specific object group |
|
|
510
|
+
|
|
511
|
+
</details>
|
|
512
|
+
|
|
513
|
+
### Transaction Links
|
|
514
|
+
|
|
515
|
+
<details>
|
|
516
|
+
<summary><b>6 tools</b> — click to expand</summary>
|
|
517
|
+
|
|
518
|
+
| Tool | Description |
|
|
519
|
+
|------|-------------|
|
|
520
|
+
| `get_link_types` | List available transaction link types (Related, Refund, Paid, etc.) |
|
|
521
|
+
| `get_transaction_links` | Get all links attached to a transaction journal entry |
|
|
522
|
+
| `get_transaction_link` | Get a single transaction link by ID |
|
|
523
|
+
| `create_transaction_link` | Create a link between two transactions |
|
|
524
|
+
| `update_transaction_link` | Update an existing transaction link |
|
|
525
|
+
| `delete_transaction_link` | Delete a transaction link. This action cannot be undone. |
|
|
526
|
+
|
|
527
|
+
</details>
|
|
528
|
+
|
|
529
|
+
## Filtering Tools
|
|
530
|
+
|
|
531
|
+
With 140 tools across 14 groups, loading everything can consume significant context window space. Three flags let you control exactly which tools are registered:
|
|
532
|
+
|
|
533
|
+
### `--preset <name>`
|
|
534
|
+
|
|
535
|
+
Load a named subset of tool groups:
|
|
536
|
+
|
|
537
|
+
| Preset | Groups included | Tools |
|
|
538
|
+
|--------|----------------|-------|
|
|
539
|
+
| `minimal` | accounts, transactions | 15 |
|
|
540
|
+
| `default` | accounts, transactions, budgets, categories, bills | 37 |
|
|
541
|
+
| `budgeting` | accounts, transactions, budgets, categories, bills, piggy-banks | 44 |
|
|
542
|
+
| `insights` | accounts, transactions, categories, reports | 57 |
|
|
543
|
+
| `automation` | accounts, transactions, rules, recurring | 37 |
|
|
544
|
+
| `full` | all 14 groups | 140 |
|
|
545
|
+
|
|
546
|
+
```bash
|
|
547
|
+
node dist/index.js --preset default
|
|
548
|
+
npx @daften/fireflyiii-mcp --preset budgeting
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
### `--groups <list>`
|
|
552
|
+
|
|
553
|
+
Comma-separated list of specific groups to load. Cannot be combined with `--preset`.
|
|
554
|
+
|
|
555
|
+
Valid group names: `accounts`, `transactions`, `budgets`, `categories`, `bills`, `piggy-banks`, `reports`, `rules`, `recurring`, `attachments`, `currencies`, `exports`, `object-groups`, `transaction-links`
|
|
556
|
+
|
|
557
|
+
```bash
|
|
558
|
+
node dist/index.js --groups accounts,transactions,reports
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
### `--read-only`
|
|
562
|
+
|
|
563
|
+
Filter any selection down to read-only tools (`get_*`, `search_*`, `test_*`). All create, update, delete, trigger, and upload tools are excluded. Can be combined with `--preset` or `--groups`.
|
|
564
|
+
|
|
565
|
+
```bash
|
|
566
|
+
node dist/index.js --preset default --read-only
|
|
567
|
+
node dist/index.js --groups rules --read-only
|
|
568
|
+
```
|
|
569
|
+
|
|
570
|
+
Without any filter flags the server registers all 140 tools (equivalent to `--preset full`).
|
|
571
|
+
|
|
572
|
+
---
|
|
573
|
+
|
|
574
|
+
## Development
|
|
575
|
+
|
|
576
|
+
```bash
|
|
577
|
+
npm test # Run unit tests
|
|
578
|
+
npm run test:watch # Watch mode
|
|
579
|
+
npm run test:integration # Run against live Firefly III (requires FIREFLY_URL + FIREFLY_TOKEN)
|
|
580
|
+
npm run dev # Run without building (uses tsx)
|
|
581
|
+
npm run build # Compile TypeScript to dist/
|
|
582
|
+
```
|
|
583
|
+
|
|
584
|
+
## Resources
|
|
585
|
+
|
|
586
|
+
- [Firefly III API Documentation](https://api-docs.firefly-iii.org/) — interactive Swagger UI for all API versions
|
|
587
|
+
- [Firefly III OpenAPI YAML](https://api-docs.firefly-iii.org/firefly-iii-6.5.5-v1.yaml) — machine-readable spec; fetch with `curl -s "https://api-docs.firefly-iii.org/firefly-iii-6.5.5-v1.yaml" -A "Mozilla/5.0"` (direct browser access blocked by bot protection)
|
|
588
|
+
- [Firefly III Docs](https://docs.firefly-iii.org/)
|
|
589
|
+
- [MCP Documentation](https://modelcontextprotocol.io/)
|
|
590
|
+
|
|
591
|
+
## Contributing
|
|
592
|
+
|
|
593
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for the development loop, tool-add checklist, and commit conventions.
|
|
594
|
+
|
|
595
|
+
## Security
|
|
596
|
+
|
|
597
|
+
See [SECURITY.md](SECURITY.md) for the vulnerability disclosure policy.
|
|
598
|
+
|
|
599
|
+
## Acknowledgements
|
|
600
|
+
|
|
601
|
+
Feature comparison informed by [fabianonetto/mcp-server-firefly-iii](https://github.com/fabianonetto/mcp-server-firefly-iii) and [etnperlong/firefly-iii-mcp](https://github.com/etnperlong/firefly-iii-mcp).
|
|
602
|
+
|
|
603
|
+
## License
|
|
604
|
+
|
|
605
|
+
MIT
|
package/dist/args.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ToolFilterOptions } from './tools/index.js';
|
|
2
|
+
export interface ParsedArgs {
|
|
3
|
+
transport: 'stdio' | 'http';
|
|
4
|
+
host: string;
|
|
5
|
+
port: number;
|
|
6
|
+
portWasExplicit: boolean;
|
|
7
|
+
filterOptions: ToolFilterOptions;
|
|
8
|
+
}
|
|
9
|
+
export declare function parseArgs(args: string[]): ParsedArgs;
|
|
10
|
+
//# sourceMappingURL=args.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../src/args.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyC,KAAK,iBAAiB,EAAkB,MAAM,kBAAkB,CAAC;AAEjH,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,OAAO,GAAG,MAAM,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,OAAO,CAAC;IACzB,aAAa,EAAE,iBAAiB,CAAC;CAClC;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CA2DpD"}
|