@bateikoed/monobank-mcp 0.0.0-stage → 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/CHANGELOG.md +14 -0
- package/LICENSE +21 -0
- package/README.md +240 -2
- package/README.uk.md +241 -0
- package/SECURITY.md +31 -0
- package/dist/config.js +81 -0
- package/dist/config.js.map +1 -0
- package/dist/data/currencies.js +203 -0
- package/dist/data/currencies.js.map +1 -0
- package/dist/data/mcc.js +336 -0
- package/dist/data/mcc.js.map +1 -0
- package/dist/domain/client-info.js +140 -0
- package/dist/domain/client-info.js.map +1 -0
- package/dist/domain/currency.js +67 -0
- package/dist/domain/currency.js.map +1 -0
- package/dist/domain/dates.js +167 -0
- package/dist/domain/dates.js.map +1 -0
- package/dist/domain/decimal.js +49 -0
- package/dist/domain/decimal.js.map +1 -0
- package/dist/domain/mcc.js +26 -0
- package/dist/domain/mcc.js.map +1 -0
- package/dist/domain/money.js +38 -0
- package/dist/domain/money.js.map +1 -0
- package/dist/domain/net-worth.js +183 -0
- package/dist/domain/net-worth.js.map +1 -0
- package/dist/domain/rates.js +139 -0
- package/dist/domain/rates.js.map +1 -0
- package/dist/domain/statement-range.js +53 -0
- package/dist/domain/statement-range.js.map +1 -0
- package/dist/domain/statement.js +225 -0
- package/dist/domain/statement.js.map +1 -0
- package/dist/domain/text.js +25 -0
- package/dist/domain/text.js.map +1 -0
- package/dist/errors.js +254 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.js +68 -0
- package/dist/index.js.map +1 -0
- package/dist/lifecycle.js +29 -0
- package/dist/lifecycle.js.map +1 -0
- package/dist/limits.js +34 -0
- package/dist/limits.js.map +1 -0
- package/dist/logger.js +35 -0
- package/dist/logger.js.map +1 -0
- package/dist/monobank/cache.js +71 -0
- package/dist/monobank/cache.js.map +1 -0
- package/dist/monobank/client-info-schema.js +64 -0
- package/dist/monobank/client-info-schema.js.map +1 -0
- package/dist/monobank/client.js +391 -0
- package/dist/monobank/client.js.map +1 -0
- package/dist/monobank/endpoints.js +66 -0
- package/dist/monobank/endpoints.js.map +1 -0
- package/dist/monobank/http.js +110 -0
- package/dist/monobank/http.js.map +1 -0
- package/dist/monobank/rate-limiter.js +41 -0
- package/dist/monobank/rate-limiter.js.map +1 -0
- package/dist/monobank/schemas.js +39 -0
- package/dist/monobank/schemas.js.map +1 -0
- package/dist/monobank/statement-schema.js +51 -0
- package/dist/monobank/statement-schema.js.map +1 -0
- package/dist/server.js +32 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/define-tool.js +18 -0
- package/dist/tools/define-tool.js.map +1 -0
- package/dist/tools/get-client-info.js +38 -0
- package/dist/tools/get-client-info.js.map +1 -0
- package/dist/tools/get-currency-rates.js +30 -0
- package/dist/tools/get-currency-rates.js.map +1 -0
- package/dist/tools/get-net-worth.js +53 -0
- package/dist/tools/get-net-worth.js.map +1 -0
- package/dist/tools/get-statement.js +126 -0
- package/dist/tools/get-statement.js.map +1 -0
- package/dist/tools/register.js +11 -0
- package/dist/tools/register.js.map +1 -0
- package/package.json +64 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0
|
|
4
|
+
|
|
5
|
+
First public release.
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* read-only stdio MCP server for the Monobank Personal API
|
|
10
|
+
* get_currency_rates returns public exchange rates and works without a token
|
|
11
|
+
* get_client_info returns accounts and jars
|
|
12
|
+
* get_net_worth adds up own funds and converts them to UAH
|
|
13
|
+
* get_statement reads at most 31 days and 1 hour in Europe/Kyiv time, marks pending transactions and returns a continuation cursor
|
|
14
|
+
* the token is read only from the environment
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Eduard Bateiko
|
|
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
CHANGED
|
@@ -1,3 +1,241 @@
|
|
|
1
|
-
#
|
|
1
|
+
# monobank-mcp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A local [Model Context Protocol](https://modelcontextprotocol.io) server that lets Claude read your own Monobank accounts, jars, statements, currency rates and net worth. It is read-only: it cannot move money. It runs on your machine over stdio, and your personal token never leaves it.
|
|
4
|
+
|
|
5
|
+
Українська версія: [README.uk.md](https://github.com/bateikoEd/monobank-mcp/blob/master/README.uk.md). The English README is the source of truth.
|
|
6
|
+
|
|
7
|
+
## What it does
|
|
8
|
+
|
|
9
|
+
monobank-mcp talks to the [Monobank Personal API](https://api.monobank.ua/docs/) with your personal token and gives Claude four read-only tools. You ask Claude things like "what is my UAH balance", "list my jars", "what did I spend on groceries last week" or "what is the dollar rate", and Claude calls the tools for you.
|
|
10
|
+
|
|
11
|
+
It does not create payments, transfers or webhooks, and it never writes anything to disk. Results are cached in memory only, and the server respects Monobank's documented rate limits.
|
|
12
|
+
|
|
13
|
+
## Tools
|
|
14
|
+
|
|
15
|
+
| Tool | Needs a token | What it returns |
|
|
16
|
+
| -------------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
17
|
+
| `get_currency_rates` | No | Public Monobank exchange rates, cached for 300 seconds. |
|
|
18
|
+
| `get_client_info` | Yes | Your accounts and jars with balances. One Monobank request per 60 seconds, cached. |
|
|
19
|
+
| `get_net_worth` | Yes | Your own funds per currency, converted to UAH with the public rates. Uses the cached client info and never requests a statement. |
|
|
20
|
+
| `get_statement` | Yes | Transactions of one account or jar for at most 31 days and 1 hour per call, in Europe/Kyiv time, with pending marking and a continuation cursor. One request per 60 seconds. |
|
|
21
|
+
|
|
22
|
+
## Requirements
|
|
23
|
+
|
|
24
|
+
- Node.js 22 or newer, if you start the server with `npx`.
|
|
25
|
+
- Or Docker, if you start it from the container image.
|
|
26
|
+
- A Monobank personal token (see below).
|
|
27
|
+
|
|
28
|
+
## Get a Monobank token
|
|
29
|
+
|
|
30
|
+
Open [https://api.monobank.ua/](https://api.monobank.ua/), sign in with the Monobank app and issue a personal token. You can revoke it and issue a new one on the same page at any time. The token grants read access to your financial data, so treat it like a password.
|
|
31
|
+
|
|
32
|
+
## Claude Desktop
|
|
33
|
+
|
|
34
|
+
Add the server to Claude Desktop's config file (see "Config file location" below) with one of the two options. In both, the token goes in the `env` block and nowhere else.
|
|
35
|
+
|
|
36
|
+
### Option A: npx
|
|
37
|
+
|
|
38
|
+
<!-- x-release-please-start-version -->
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"mcpServers": {
|
|
43
|
+
"monobank": {
|
|
44
|
+
"command": "npx",
|
|
45
|
+
"args": ["-y", "@bateikoed/monobank-mcp@0.1.0"],
|
|
46
|
+
"env": {
|
|
47
|
+
"MONOBANK_TOKEN": "paste-your-token-here"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
<!-- x-release-please-end -->
|
|
55
|
+
|
|
56
|
+
Replace `paste-your-token-here` with your token. If Claude Desktop cannot find `npx`, see "PATH workaround".
|
|
57
|
+
|
|
58
|
+
### Option B: Docker
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"mcpServers": {
|
|
63
|
+
"monobank": {
|
|
64
|
+
"command": "/usr/local/bin/docker",
|
|
65
|
+
"args": [
|
|
66
|
+
"run",
|
|
67
|
+
"-i",
|
|
68
|
+
"--rm",
|
|
69
|
+
"-e",
|
|
70
|
+
"MONOBANK_TOKEN",
|
|
71
|
+
"ghcr.io/bateikoed/monobank-mcp:latest"
|
|
72
|
+
],
|
|
73
|
+
"env": {
|
|
74
|
+
"MONOBANK_TOKEN": "paste-your-token-here"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
- `-e MONOBANK_TOKEN` names the variable only. Docker copies the value from the environment that Claude Desktop sets from the `env` block, so the token never appears in the arguments, in the process list or in `docker inspect`.
|
|
82
|
+
- Run `which docker` in a terminal and use that absolute path as `command` (Claude Desktop often has a minimal PATH and cannot find a bare `docker`).
|
|
83
|
+
- Pull the image once in a terminal before the first start:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
docker pull ghcr.io/bateikoed/monobank-mcp:latest
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
- Keep `-i` and never add `-t`: a terminal allocation corrupts the JSON-RPC stream on stdout.
|
|
90
|
+
|
|
91
|
+
### Config file location
|
|
92
|
+
|
|
93
|
+
| System | Path |
|
|
94
|
+
| ------- | ----------------------------------------------------------------- |
|
|
95
|
+
| macOS | `~/Library/Application Support/Claude/claude_desktop_config.json` |
|
|
96
|
+
| Windows | `%APPDATA%\Claude\claude_desktop_config.json` |
|
|
97
|
+
| Linux | `~/.config/Claude/claude_desktop_config.json` |
|
|
98
|
+
|
|
99
|
+
After editing the file, fully quit and restart Claude Desktop (closing the window is not enough). On macOS the server logs are in `~/Library/Logs/Claude/` in files named `mcp*.log`.
|
|
100
|
+
|
|
101
|
+
## Claude Code
|
|
102
|
+
|
|
103
|
+
Set `MONOBANK_TOKEN` in the environment that starts `claude`, for example from your shell profile or from your password manager's command line tool. Do not type the token into any command below.
|
|
104
|
+
|
|
105
|
+
Add the server with the single-quoted reference form:
|
|
106
|
+
|
|
107
|
+
<!-- x-release-please-start-version -->
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
claude mcp add monobank -e 'MONOBANK_TOKEN=${MONOBANK_TOKEN}' -- npx -y @bateikoed/monobank-mcp@0.1.0
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
<!-- x-release-please-end -->
|
|
114
|
+
|
|
115
|
+
Or, from the container image:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
claude mcp add monobank -e 'MONOBANK_TOKEN=${MONOBANK_TOKEN}' -- docker run -i --rm -e MONOBANK_TOKEN ghcr.io/bateikoed/monobank-mcp:latest
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
The single quotes matter. The shell passes the text `${MONOBANK_TOKEN}` through unchanged, Claude Code stores only that reference in `~/.claude.json`, and Claude Code reads the real value from its own environment each time it starts the server. So the token is never in a command line, in your shell history or in the config file. Never type the token value into the command: it would end up in all three.
|
|
122
|
+
|
|
123
|
+
Check the result:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
claude mcp get monobank
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
The status should be Connected. A missing-variable warning means `MONOBANK_TOKEN` is not set in the environment where `claude` starts.
|
|
130
|
+
|
|
131
|
+
To share the setup with a team, put a project-scope `.mcp.json` in your project. It is safe to commit because it holds only the reference:
|
|
132
|
+
|
|
133
|
+
<!-- x-release-please-start-version -->
|
|
134
|
+
|
|
135
|
+
```json
|
|
136
|
+
{
|
|
137
|
+
"mcpServers": {
|
|
138
|
+
"monobank": {
|
|
139
|
+
"command": "npx",
|
|
140
|
+
"args": ["-y", "@bateikoed/monobank-mcp@0.1.0"],
|
|
141
|
+
"env": {
|
|
142
|
+
"MONOBANK_TOKEN": "${MONOBANK_TOKEN}"
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
<!-- x-release-please-end -->
|
|
150
|
+
|
|
151
|
+
Claude Code asks you to approve project servers the first time you use them.
|
|
152
|
+
|
|
153
|
+
## PATH workaround
|
|
154
|
+
|
|
155
|
+
Claude Desktop started from the Dock or the Start menu may have a minimal PATH, so `npx`, `node` or `docker` is not found. Find the absolute paths in a terminal:
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
which npx
|
|
159
|
+
which node
|
|
160
|
+
which docker
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Then use the absolute path of `npx` as `command`, and add the directory of `node` to `PATH` in the `env` block so the `#!/usr/bin/env node` line of the package can resolve `node` (this is common with nvm):
|
|
164
|
+
|
|
165
|
+
<!-- x-release-please-start-version -->
|
|
166
|
+
|
|
167
|
+
```json
|
|
168
|
+
{
|
|
169
|
+
"mcpServers": {
|
|
170
|
+
"monobank": {
|
|
171
|
+
"command": "/absolute/path/to/npx",
|
|
172
|
+
"args": ["-y", "@bateikoed/monobank-mcp@0.1.0"],
|
|
173
|
+
"env": {
|
|
174
|
+
"PATH": "/absolute/path/to/node/bin:/usr/bin:/bin",
|
|
175
|
+
"MONOBANK_TOKEN": "paste-your-token-here"
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
<!-- x-release-please-end -->
|
|
183
|
+
|
|
184
|
+
For Docker, use the output of `which docker` as `command`, as in Option B.
|
|
185
|
+
|
|
186
|
+
## Security
|
|
187
|
+
|
|
188
|
+
- The token comes only from the `MONOBANK_TOKEN` environment variable. It is never a tool argument, and the server never writes it to logs or tool output.
|
|
189
|
+
- Never paste your token into the chat with Claude. If a tool says the token is missing, fix the configuration instead.
|
|
190
|
+
- Use your personal token, which is read-only, and revoke it at [https://api.monobank.ua/](https://api.monobank.ua/) if you think it was exposed.
|
|
191
|
+
- Keep the token out of committed files. The `.mcp.json` example above holds only the `${MONOBANK_TOKEN}` reference.
|
|
192
|
+
- The MCP Inspector stores the environment values of stdio servers in the OS keychain, or in an unencrypted `~/.mcp-inspector/secrets.json` on machines without a keychain. Use a throwaway token for Inspector sessions.
|
|
193
|
+
- To report a vulnerability, see [SECURITY.md](https://github.com/bateikoEd/monobank-mcp/blob/master/SECURITY.md).
|
|
194
|
+
|
|
195
|
+
## Troubleshooting
|
|
196
|
+
|
|
197
|
+
### Missing token
|
|
198
|
+
|
|
199
|
+
If `MONOBANK_TOKEN` is not set, the server still starts and warns on stderr. `get_currency_rates` keeps working, and the other tools answer with a message that names `MONOBANK_TOKEN`. Add the token to the `env` block (Claude Desktop) and fully restart, or set it in the environment that starts `claude` (Claude Code). In Claude Code, a missing-variable warning in `claude mcp list`, or an invalid-token error right after setup, means the variable was not set where `claude` started.
|
|
200
|
+
|
|
201
|
+
### Rate limit (HTTP 429)
|
|
202
|
+
|
|
203
|
+
Monobank allows one request per 60 seconds for client info and one per 60 seconds for statements. When a tool reports a rate limit with `retryAfterSeconds`, wait that long and do not retry in a loop. Cached answers are served without a new request.
|
|
204
|
+
|
|
205
|
+
### EBADENGINE on an old Node
|
|
206
|
+
|
|
207
|
+
`npx` prints `EBADENGINE` when your Node.js is older than 22. Run `node --version`, upgrade to Node 22 or newer, or use the Docker option instead.
|
|
208
|
+
|
|
209
|
+
### Command not found (PATH)
|
|
210
|
+
|
|
211
|
+
If the server does not start and the log says `npx`, `node` or `docker` was not found, follow "PATH workaround" above and fully restart Claude Desktop.
|
|
212
|
+
|
|
213
|
+
### Docker not found
|
|
214
|
+
|
|
215
|
+
Use the absolute path from `which docker` as `command`, make sure Docker Desktop is running, and pull the image once in a terminal with `docker pull`, because `docker run` does not download it again when it is already present.
|
|
216
|
+
|
|
217
|
+
## Updating
|
|
218
|
+
|
|
219
|
+
For npx, change the version after the `@` in the args and restart the client. For Docker, pull the image again, because `docker run` does not refresh `:latest` by itself:
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
docker pull ghcr.io/bateikoed/monobank-mcp:latest
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
## Development
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
npm ci
|
|
229
|
+
npm test
|
|
230
|
+
npm run build
|
|
231
|
+
npm run smoke
|
|
232
|
+
npm run pack-check
|
|
233
|
+
node scripts/container-check.mjs monobank-mcp:ci
|
|
234
|
+
node scripts/smoke.mjs -- docker run -i --rm monobank-mcp:ci
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
Run the commands with `MONOBANK_TOKEN` unset: the tests must not need a real token.
|
|
238
|
+
|
|
239
|
+
## License
|
|
240
|
+
|
|
241
|
+
MIT. See [LICENSE](https://github.com/bateikoEd/monobank-mcp/blob/master/LICENSE).
|
package/README.uk.md
ADDED
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
# monobank-mcp
|
|
2
|
+
|
|
3
|
+
Локальний сервер [Model Context Protocol](https://modelcontextprotocol.io), який дозволяє Claude читати ваші власні рахунки, банки, виписки, курси валют і чисті активи в Monobank. Сервер працює лише на читання: він не може переказувати гроші. Він запускається на вашому комп'ютері через stdio, а ваш персональний токен ніколи його не залишає.
|
|
4
|
+
|
|
5
|
+
Це переклад. Джерелом істини є англійський README: [README.md](https://github.com/bateikoEd/monobank-mcp/blob/master/README.md). Якщо тексти розходяться, дійсним вважається англійський.
|
|
6
|
+
|
|
7
|
+
## Що це робить
|
|
8
|
+
|
|
9
|
+
monobank-mcp звертається до [Monobank Personal API](https://api.monobank.ua/docs/) з вашим персональним токеном і дає Claude чотири інструменти лише для читання. Ви питаєте Claude, наприклад, "який мій баланс у гривні", "покажи мої банки", "скільки я витратив на продукти минулого тижня" або "який курс долара", а Claude викликає інструменти за вас.
|
|
10
|
+
|
|
11
|
+
Сервер не створює платежів, переказів чи вебхуків і нічого не записує на диск. Результати кешуються лише в пам'яті, а сервер дотримується задокументованих лімітів запитів Monobank.
|
|
12
|
+
|
|
13
|
+
## Інструменти
|
|
14
|
+
|
|
15
|
+
| Інструмент | Потрібен токен | Що повертає |
|
|
16
|
+
| -------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
17
|
+
| `get_currency_rates` | Ні | Публічні курси валют Monobank, кеш на 300 секунд. |
|
|
18
|
+
| `get_client_info` | Так | Ваші рахунки та банки з балансами. Один запит до Monobank на 60 секунд, з кешем. |
|
|
19
|
+
| `get_net_worth` | Так | Ваші власні кошти за валютами, перераховані в гривні за публічними курсами. Використовує кешовану інформацію про клієнта і ніколи не запитує виписку. |
|
|
20
|
+
| `get_statement` | Так | Транзакції одного рахунку або банки максимум за 31 день і 1 годину за виклик, за київським часом, з позначкою транзакцій в обробці та курсором продовження. Один запит на 60 секунд. |
|
|
21
|
+
|
|
22
|
+
## Вимоги
|
|
23
|
+
|
|
24
|
+
- Node.js 22 або новіший, якщо ви запускаєте сервер через `npx`.
|
|
25
|
+
- Або Docker, якщо ви запускаєте його з образу контейнера.
|
|
26
|
+
- Персональний токен Monobank (див. нижче).
|
|
27
|
+
|
|
28
|
+
## Отримання токена Monobank
|
|
29
|
+
|
|
30
|
+
Відкрийте [https://api.monobank.ua/](https://api.monobank.ua/), увійдіть через застосунок Monobank і випустіть персональний токен. Ви можете будь-коли відкликати його та випустити новий на тій самій сторінці. Токен дає доступ на читання до ваших фінансових даних, тому ставтеся до нього як до пароля.
|
|
31
|
+
|
|
32
|
+
## Claude Desktop
|
|
33
|
+
|
|
34
|
+
Додайте сервер до файлу конфігурації Claude Desktop (див. "Розташування файлу конфігурації" нижче) одним із двох способів. В обох токен вказується в блоці `env` і більше ніде.
|
|
35
|
+
|
|
36
|
+
### Варіант A: npx
|
|
37
|
+
|
|
38
|
+
<!-- x-release-please-start-version -->
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"mcpServers": {
|
|
43
|
+
"monobank": {
|
|
44
|
+
"command": "npx",
|
|
45
|
+
"args": ["-y", "@bateikoed/monobank-mcp@0.1.0"],
|
|
46
|
+
"env": {
|
|
47
|
+
"MONOBANK_TOKEN": "paste-your-token-here"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
<!-- x-release-please-end -->
|
|
55
|
+
|
|
56
|
+
Замініть `paste-your-token-here` на ваш токен. Якщо Claude Desktop не знаходить `npx`, див. "Обхід проблеми з PATH".
|
|
57
|
+
|
|
58
|
+
### Варіант B: Docker
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"mcpServers": {
|
|
63
|
+
"monobank": {
|
|
64
|
+
"command": "/usr/local/bin/docker",
|
|
65
|
+
"args": [
|
|
66
|
+
"run",
|
|
67
|
+
"-i",
|
|
68
|
+
"--rm",
|
|
69
|
+
"-e",
|
|
70
|
+
"MONOBANK_TOKEN",
|
|
71
|
+
"ghcr.io/bateikoed/monobank-mcp:latest"
|
|
72
|
+
],
|
|
73
|
+
"env": {
|
|
74
|
+
"MONOBANK_TOKEN": "paste-your-token-here"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
- `-e MONOBANK_TOKEN` вказує лише ім'я змінної. Docker бере значення із середовища, яке Claude Desktop формує з блоку `env`, тому токен ніколи не потрапляє в аргументи, у список процесів чи в `docker inspect`.
|
|
82
|
+
- Виконайте `which docker` у терміналі та використайте цей абсолютний шлях як `command` (Claude Desktop часто має мінімальний PATH і не знаходить голий `docker`).
|
|
83
|
+
- Перед першим запуском один раз завантажте образ у терміналі:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
docker pull ghcr.io/bateikoed/monobank-mcp:latest
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
- Залишайте `-i` і ніколи не додавайте `-t`: виділення термінала псує потік JSON-RPC у stdout.
|
|
90
|
+
|
|
91
|
+
### Розташування файлу конфігурації
|
|
92
|
+
|
|
93
|
+
| Система | Шлях |
|
|
94
|
+
| ------- | ----------------------------------------------------------------- |
|
|
95
|
+
| macOS | `~/Library/Application Support/Claude/claude_desktop_config.json` |
|
|
96
|
+
| Windows | `%APPDATA%\Claude\claude_desktop_config.json` |
|
|
97
|
+
| Linux | `~/.config/Claude/claude_desktop_config.json` |
|
|
98
|
+
|
|
99
|
+
Після редагування файлу повністю закрийте та знову запустіть Claude Desktop (закрити вікно недостатньо). У macOS журнали сервера лежать у `~/Library/Logs/Claude/` у файлах з іменами `mcp*.log`.
|
|
100
|
+
|
|
101
|
+
## Claude Code
|
|
102
|
+
|
|
103
|
+
Задайте `MONOBANK_TOKEN` у середовищі, з якого запускається `claude`, наприклад у профілі оболонки або через командний рядок вашого менеджера паролів. Не вводьте токен в жодну з наведених нижче команд.
|
|
104
|
+
|
|
105
|
+
Додайте сервер у формі посилання в одинарних лапках:
|
|
106
|
+
|
|
107
|
+
<!-- x-release-please-start-version -->
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
claude mcp add monobank -e 'MONOBANK_TOKEN=${MONOBANK_TOKEN}' -- npx -y @bateikoed/monobank-mcp@0.1.0
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
<!-- x-release-please-end -->
|
|
114
|
+
|
|
115
|
+
Або з образу контейнера:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
claude mcp add monobank -e 'MONOBANK_TOKEN=${MONOBANK_TOKEN}' -- docker run -i --rm -e MONOBANK_TOKEN ghcr.io/bateikoed/monobank-mcp:latest
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Одинарні лапки важливі. Оболонка передає текст `${MONOBANK_TOKEN}` без змін, Claude Code зберігає в `~/.claude.json` лише це посилання, а справжнє значення бере зі свого середовища щоразу, коли запускає сервер. Тож токен ніколи не потрапляє в командний рядок, в історію оболонки чи у файл конфігурації. Ніколи не вводьте значення токена в команду: воно опиниться в усіх трьох місцях.
|
|
122
|
+
|
|
123
|
+
Перевірте результат:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
claude mcp get monobank
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Статус має бути Connected. Попередження про відсутню змінну означає, що `MONOBANK_TOKEN` не задано в середовищі, з якого запускається `claude`.
|
|
130
|
+
|
|
131
|
+
Щоб поділитися налаштуванням із командою, покладіть у проєкт файл `.mcp.json` рівня проєкту. Його безпечно комітити, бо він містить лише посилання:
|
|
132
|
+
|
|
133
|
+
<!-- x-release-please-start-version -->
|
|
134
|
+
|
|
135
|
+
```json
|
|
136
|
+
{
|
|
137
|
+
"mcpServers": {
|
|
138
|
+
"monobank": {
|
|
139
|
+
"command": "npx",
|
|
140
|
+
"args": ["-y", "@bateikoed/monobank-mcp@0.1.0"],
|
|
141
|
+
"env": {
|
|
142
|
+
"MONOBANK_TOKEN": "${MONOBANK_TOKEN}"
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
<!-- x-release-please-end -->
|
|
150
|
+
|
|
151
|
+
Claude Code просить підтвердити сервери проєкту під час першого використання.
|
|
152
|
+
|
|
153
|
+
## Обхід проблеми з PATH
|
|
154
|
+
|
|
155
|
+
Claude Desktop, запущений із Dock або меню Пуск, може мати мінімальний PATH, тому `npx`, `node` або `docker` не знаходяться. Знайдіть абсолютні шляхи в терміналі:
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
which npx
|
|
159
|
+
which node
|
|
160
|
+
which docker
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Потім використайте абсолютний шлях до `npx` як `command` і додайте каталог `node` до `PATH` у блоці `env`, щоб рядок `#!/usr/bin/env node` у пакеті знайшов `node` (це часто трапляється з nvm):
|
|
164
|
+
|
|
165
|
+
<!-- x-release-please-start-version -->
|
|
166
|
+
|
|
167
|
+
```json
|
|
168
|
+
{
|
|
169
|
+
"mcpServers": {
|
|
170
|
+
"monobank": {
|
|
171
|
+
"command": "/absolute/path/to/npx",
|
|
172
|
+
"args": ["-y", "@bateikoed/monobank-mcp@0.1.0"],
|
|
173
|
+
"env": {
|
|
174
|
+
"PATH": "/absolute/path/to/node/bin:/usr/bin:/bin",
|
|
175
|
+
"MONOBANK_TOKEN": "paste-your-token-here"
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
<!-- x-release-please-end -->
|
|
183
|
+
|
|
184
|
+
Для Docker використайте результат `which docker` як `command`, як у варіанті B.
|
|
185
|
+
|
|
186
|
+
## Безпека
|
|
187
|
+
|
|
188
|
+
- Токен береться лише зі змінної середовища `MONOBANK_TOKEN`. Він ніколи не є аргументом інструмента, а сервер ніколи не записує його в журнали чи вивід інструментів.
|
|
189
|
+
- Ніколи не вставляйте токен у чат із Claude. Якщо інструмент каже, що токена немає, виправте конфігурацію.
|
|
190
|
+
- Використовуйте свій персональний токен, який працює лише на читання, і відкличте його на [https://api.monobank.ua/](https://api.monobank.ua/), якщо підозрюєте, що він потрапив у чужі руки.
|
|
191
|
+
- Не тримайте токен у файлах, які комітяться. Приклад `.mcp.json` вище містить лише посилання `${MONOBANK_TOKEN}`.
|
|
192
|
+
- MCP Inspector зберігає значення середовища stdio-серверів у системній в'язці ключів, а на машинах без неї у незашифрованому файлі `~/.mcp-inspector/secrets.json`. Для сеансів Inspector використовуйте одноразовий токен.
|
|
193
|
+
- Щоб повідомити про вразливість, див. [SECURITY.md](https://github.com/bateikoEd/monobank-mcp/blob/master/SECURITY.md).
|
|
194
|
+
|
|
195
|
+
## Усунення несправностей
|
|
196
|
+
|
|
197
|
+
### Відсутній токен
|
|
198
|
+
|
|
199
|
+
Якщо `MONOBANK_TOKEN` не задано, сервер усе одно запускається і попереджає в stderr. `get_currency_rates` продовжує працювати, а інші інструменти відповідають повідомленням, яке називає `MONOBANK_TOKEN`. Додайте токен у блок `env` (Claude Desktop) і повністю перезапустіть, або задайте його в середовищі, з якого запускається `claude` (Claude Code). У Claude Code попередження про відсутню змінну в `claude mcp list` або помилка недійсного токена одразу після налаштування означає, що змінну не було задано там, де запустився `claude`.
|
|
200
|
+
|
|
201
|
+
### Ліміт запитів (HTTP 429)
|
|
202
|
+
|
|
203
|
+
Monobank дозволяє один запит на 60 секунд для інформації про клієнта і один на 60 секунд для виписок. Коли інструмент повідомляє про ліміт із `retryAfterSeconds`, зачекайте цей час і не повторюйте запит у циклі. Закешовані відповіді віддаються без нового запиту.
|
|
204
|
+
|
|
205
|
+
### EBADENGINE на старій версії Node
|
|
206
|
+
|
|
207
|
+
`npx` виводить `EBADENGINE`, коли ваш Node.js старший за версію 22. Виконайте `node --version`, оновіть Node до версії 22 або новішої, або скористайтеся варіантом із Docker.
|
|
208
|
+
|
|
209
|
+
### Команду не знайдено (PATH)
|
|
210
|
+
|
|
211
|
+
Якщо сервер не запускається, а в журналі сказано, що `npx`, `node` або `docker` не знайдено, виконайте кроки з розділу "Обхід проблеми з PATH" вище та повністю перезапустіть Claude Desktop.
|
|
212
|
+
|
|
213
|
+
### Docker не знайдено
|
|
214
|
+
|
|
215
|
+
Використайте абсолютний шлях із `which docker` як `command`, переконайтеся, що Docker Desktop запущений, і один раз завантажте образ у терміналі через `docker pull`, бо `docker run` не завантажує його повторно, якщо він уже є.
|
|
216
|
+
|
|
217
|
+
## Оновлення
|
|
218
|
+
|
|
219
|
+
Для npx змініть версію після `@` в аргументах і перезапустіть клієнт. Для Docker завантажте образ ще раз, бо `docker run` сам не оновлює `:latest`:
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
docker pull ghcr.io/bateikoed/monobank-mcp:latest
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
## Розробка
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
npm ci
|
|
229
|
+
npm test
|
|
230
|
+
npm run build
|
|
231
|
+
npm run smoke
|
|
232
|
+
npm run pack-check
|
|
233
|
+
node scripts/container-check.mjs monobank-mcp:ci
|
|
234
|
+
node scripts/smoke.mjs -- docker run -i --rm monobank-mcp:ci
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
Запускайте команди з незаданим `MONOBANK_TOKEN`: тестам не потрібен справжній токен.
|
|
238
|
+
|
|
239
|
+
## Ліцензія
|
|
240
|
+
|
|
241
|
+
MIT. Див. [LICENSE](https://github.com/bateikoEd/monobank-mcp/blob/master/LICENSE).
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Security policy
|
|
2
|
+
|
|
3
|
+
## Reporting a vulnerability
|
|
4
|
+
|
|
5
|
+
Please report security problems privately through GitHub private vulnerability reporting:
|
|
6
|
+
https://github.com/bateikoEd/monobank-mcp/security/advisories/new
|
|
7
|
+
|
|
8
|
+
Do not open a public issue for a vulnerability. In the report, include the version you ran and the
|
|
9
|
+
steps to reproduce. Never include a real Monobank token or real account data; describe the problem
|
|
10
|
+
with placeholder values instead.
|
|
11
|
+
|
|
12
|
+
## Supported versions
|
|
13
|
+
|
|
14
|
+
Only the latest published 0.x release receives security fixes.
|
|
15
|
+
|
|
16
|
+
## Security model
|
|
17
|
+
|
|
18
|
+
- The server is read-only. It only calls Monobank's client-info, statement and public currency
|
|
19
|
+
endpoints, so it cannot move money.
|
|
20
|
+
- The token is read only from the `MONOBANK_TOKEN` environment variable. It is never accepted as a
|
|
21
|
+
tool argument, and it is never written to stdout, stderr, logs or tool output. A canary-token test
|
|
22
|
+
enforces this.
|
|
23
|
+
- The server runs locally over stdio and stores nothing on disk.
|
|
24
|
+
- The container image takes the token only at run time through `-e MONOBANK_TOKEN`, never in an
|
|
25
|
+
image layer.
|
|
26
|
+
|
|
27
|
+
## Scope
|
|
28
|
+
|
|
29
|
+
In scope: this server, its published npm package and its container image.
|
|
30
|
+
|
|
31
|
+
Out of scope: the Monobank API itself, and how you store your own token.
|
package/dist/config.js
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { inspect } from 'node:util';
|
|
2
|
+
import * as z from 'zod/v4';
|
|
3
|
+
import { EnvValidationError } from './errors.js';
|
|
4
|
+
const LOOPBACK_HOSTS = new Set(['localhost', '127.0.0.1', '[::1]']);
|
|
5
|
+
// D-02, F-6: the personal token is sent to this host, so the override is parsed with the WHATWG
|
|
6
|
+
// URL parser (zod's URL validator accepts javascript:, file: and data:). Accepted: https to any
|
|
7
|
+
// host, or http only on loopback. A URL carrying a username or password is always rejected, so a
|
|
8
|
+
// host-only log line can never print credentials. URL.hostname keeps the brackets of an IPv6
|
|
9
|
+
// literal, so it is compared against '[::1]'.
|
|
10
|
+
export function isAllowedBaseUrl(raw) {
|
|
11
|
+
let url;
|
|
12
|
+
try {
|
|
13
|
+
url = new URL(raw);
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
if (url.username !== '' || url.password !== '')
|
|
19
|
+
return false;
|
|
20
|
+
if (url.protocol === 'https:')
|
|
21
|
+
return true;
|
|
22
|
+
return url.protocol === 'http:' && LOOPBACK_HOSTS.has(url.hostname);
|
|
23
|
+
}
|
|
24
|
+
// D-10: this module is the only place that reads the environment (src/index.ts
|
|
25
|
+
// just hands process.env to loadConfig).
|
|
26
|
+
const EnvSchema = z.object({
|
|
27
|
+
MONOBANK_TOKEN: z.string().optional(),
|
|
28
|
+
// Test-only override. The personal token is sent to this host, so it must be https, or http on
|
|
29
|
+
// loopback only, and never carry credentials (D-02). The issue path stays the variable name.
|
|
30
|
+
MONOBANK_API_BASE_URL: z.string().refine(isAllowedBaseUrl).optional(),
|
|
31
|
+
});
|
|
32
|
+
const REDACTED = '[REDACTED]';
|
|
33
|
+
// A pasted token often carries a trailing newline or one pair of matching quotes.
|
|
34
|
+
// Normalizing here means the redactor and the (later) X-Token header see the same string.
|
|
35
|
+
function normalizeToken(raw) {
|
|
36
|
+
if (raw === undefined)
|
|
37
|
+
return undefined;
|
|
38
|
+
let value = raw.trim();
|
|
39
|
+
const first = value[0];
|
|
40
|
+
if (value.length >= 2 && (first === '"' || first === "'") && value.endsWith(first)) {
|
|
41
|
+
value = value.slice(1, -1).trim();
|
|
42
|
+
}
|
|
43
|
+
return value === '' ? undefined : value;
|
|
44
|
+
}
|
|
45
|
+
export function loadConfig(env) {
|
|
46
|
+
// Unknown keys are stripped, so a full process.env never throws on unrelated variables.
|
|
47
|
+
const result = EnvSchema.safeParse(env);
|
|
48
|
+
if (!result.success) {
|
|
49
|
+
// Issue paths only: issue messages and inputs can echo the offending value.
|
|
50
|
+
const variables = new Set();
|
|
51
|
+
for (const issue of result.error.issues) {
|
|
52
|
+
const name = issue.path[0];
|
|
53
|
+
if (typeof name === 'string')
|
|
54
|
+
variables.add(name);
|
|
55
|
+
}
|
|
56
|
+
throw new EnvValidationError([...variables]);
|
|
57
|
+
}
|
|
58
|
+
const token = normalizeToken(result.data.MONOBANK_TOKEN);
|
|
59
|
+
// Research A7, T-03-12: whitespace or a control character would make every fetch throw on the
|
|
60
|
+
// X-Token header and read as a misleading "network error". Fail at startup, naming the variable.
|
|
61
|
+
if (token !== undefined && /[\s\p{Cc}]/u.test(token)) {
|
|
62
|
+
throw new EnvValidationError(['MONOBANK_TOKEN']);
|
|
63
|
+
}
|
|
64
|
+
const apiBaseUrl = result.data.MONOBANK_API_BASE_URL;
|
|
65
|
+
const masked = () => ({
|
|
66
|
+
token: token === undefined ? undefined : REDACTED,
|
|
67
|
+
apiBaseUrl,
|
|
68
|
+
});
|
|
69
|
+
const config = { token, apiBaseUrl };
|
|
70
|
+
// Non-enumerable, so Object.keys and spreads stay clean while JSON.stringify and
|
|
71
|
+
// util.inspect (console.error(config), a debugger) never reveal the token.
|
|
72
|
+
Object.defineProperties(config, {
|
|
73
|
+
toJSON: { value: masked, enumerable: false },
|
|
74
|
+
[Symbol.for('nodejs.util.inspect.custom')]: {
|
|
75
|
+
value: (depth, options) => inspect(masked(), { ...options, depth }),
|
|
76
|
+
enumerable: false,
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
return Object.freeze(config);
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"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"}
|