@attocash/mcp 0.1.0 → 0.1.1

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.
Files changed (3) hide show
  1. package/README.md +193 -126
  2. package/dist/main.js +0 -0
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -1,150 +1,134 @@
1
1
  # Atto MCP
2
2
 
3
- `@attocash/mcp` exposes 36 Atto wallet and network tools over local stdio. It
4
- uses [`@attocash/cli/core`](https://github.com/attocash/integrations/tree/main/atto-cli#library-api)
5
- directly and keeps one wallet session open for each MCP connection. Signing,
6
- password-store access, request IDs, and spending budgets are owned by that shared
7
- engine. Setup defaults to a dedicated wallet with read-only MCP access; you can
8
- instead select an existing CLI wallet and approve bounded spending locally.
3
+ **Give your AI assistant an Atto wallet, with access you choose.**
9
4
 
10
- ## Install and connect
5
+ **Beta** · [Install from npm](https://www.npmjs.com/package/@attocash/mcp)
11
6
 
12
- Requires **Node.js 24.15 or newer** and an available OS password store. Once a
13
- version is published, replace `VERSION` with that published version and run this
14
- in your own interactive terminal:
7
+ Ask about balances, put names on addresses, follow incoming payments, and review
8
+ wallet history in your MCP client. When you are ready, approve spending limits
9
+ in your terminal so the assistant can make payments within those limits.
10
+ Available as an initial beta, with 36 tools over local stdio.
15
11
 
16
- ```sh
17
- npx --yes @attocash/mcp@VERSION setup
18
- ```
12
+ [Connect](#install-and-connect) · [Try it](#try-these-prompts) ·
13
+ [Spending approvals](#approve-access-and-limit-changes) · [Tools](#tools) ·
14
+ [Troubleshooting](#troubleshooting)
19
15
 
20
- `--yes` here handles npm's installation prompt only. Wallet creation and spending
21
- approval still require you to review the displayed details and type `yes` in the
22
- local terminal. Setup lets you:
16
+ - **Start with observation.** Read-only access supports balances, history, labels, and watches.
17
+ - **Choose the wallet.** Create a dedicated MCP wallet or share your existing CLI wallet.
18
+ - **Set the allowance.** Approve per-payment and rolling spending caps locally.
19
+ - **Keep recovery local.** Recovery phrases stay in the OS password store and your terminal.
23
20
 
24
- 1. Choose a dedicated MCP wallet, or select an existing CLI wallet directory.
25
- 2. Reuse the selected wallet, or create/import one if it is uninitialized.
26
- 3. Keep the current payment pool, or choose account indexes and whether automatic
27
- payments may consolidate funds between them.
28
- 4. Approve read-only access, or enter per-payment and rolling 24-hour ATTO caps
29
- for spending access.
30
-
31
- The generated public MCP configuration includes the selected absolute
32
- `--data-dir`. Wallet state and credentials remain outside npm's cache, so
33
- reinstalling the package does not select a different wallet. Recovery phrases
34
- are stored in the OS password store and displayed or entered only in the
35
- terminal; they are absent from MCP tool inputs and responses.
21
+ ## Install and connect
36
22
 
37
- For an unpublished source checkout, build and run setup directly:
23
+ Requires **Node.js 24** and an available OS password store. Use the latest 24.x
24
+ release. For your first wallet, run setup in your own interactive terminal and
25
+ choose **Dedicated MCP wallet (default)**:
38
26
 
39
27
  ```sh
40
- npm ci
41
- npm run build
42
- node atto-mcp/dist/main.js setup
28
+ npx --yes @attocash/mcp@latest setup
43
29
  ```
44
30
 
45
- Setup prints a version-pinned `npx` launch configuration. Until that version is
46
- published, preserve its selected directory and replace the launch command with
47
- your built source entry point:
31
+ Setup lets you create or import a wallet, keep read-only access, or approve
32
+ bounded spending. `--yes` handles npm's installation prompt only; wallet creation
33
+ and spending approval still require your confirmation in the terminal.
34
+
35
+ Then add this default configuration to your MCP client:
48
36
 
49
37
  ```json
50
38
  {
51
39
  "mcpServers": {
52
40
  "atto": {
53
- "command": "node",
54
- "args": [
55
- "/absolute/path/to/integrations/atto-mcp/dist/main.js",
56
- "--data-dir",
57
- "/absolute/path/to/selected/profile"
58
- ]
41
+ "command": "npx",
42
+ "args": ["--yes", "@attocash/mcp@latest"]
59
43
  }
60
44
  }
61
45
  }
62
46
  ```
63
47
 
64
- Use an absolute Node.js path if your client cannot find `node`. Launch the server
48
+ This uses the default dedicated MCP wallet. No `--data-dir` is needed. Your
49
+ client starts the server automatically; you do not need to keep the setup
50
+ terminal open or run setup each time. An already initialized default wallet can
51
+ connect directly. Restart or reconnect your MCP client, then ask it to check
52
+ wallet status or run the `doctor` tool.
53
+
54
+ A global installation is optional. npm downloads the MCP server and its CLI
55
+ engine dependency automatically, and `@latest` selects the current published
56
+ release. Wallet state stays outside npm's cache. Recovery phrases are stored
57
+ in the OS password store and displayed or entered only in your terminal.
58
+
59
+ Use an absolute `npx` path if your client cannot find `npx`. Launch the server
65
60
  in the same OS user session that can access the password store. See the
66
61
  [CLI guide](https://github.com/attocash/integrations/tree/main/atto-cli#install)
67
62
  for Linux Secret Service, macOS Keychain, and Windows Credential Manager setup.
63
+ For keyring or connection problems, see [Troubleshooting](#troubleshooting).
68
64
 
69
- On Linux, the CLI can work in your terminal while MCP reports
70
- `SECRET_STORE_UNAVAILABLE`, even with an unlocked keyring. An MCP client may
71
- launch the server without the desktop-session environment. In the terminal
72
- where the CLI works, check:
65
+ ### Share a CLI wallet or choose another directory
66
+
67
+ To share your CLI wallet, run setup and choose **Existing CLI wallet**. To
68
+ select a specific directory, you can also pass it to setup:
73
69
 
74
70
  ```sh
75
- printenv DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR
71
+ npx --yes @attocash/mcp@latest --data-dir /absolute/path/to/wallet setup
76
72
  ```
77
73
 
78
- If these variables are missing from the MCP server's environment, add their
79
- actual values to the `atto` server's `env` configuration. For example:
74
+ Include that same directory in your MCP configuration:
80
75
 
81
76
  ```json
82
- "env": {
83
- "DBUS_SESSION_BUS_ADDRESS": "unix:path=/run/user/1000/bus",
84
- "XDG_RUNTIME_DIR": "/run/user/1000"
77
+ {
78
+ "mcpServers": {
79
+ "atto": {
80
+ "command": "npx",
81
+ "args": [
82
+ "--yes",
83
+ "@attocash/mcp@latest",
84
+ "--data-dir",
85
+ "/absolute/path/to/wallet"
86
+ ]
87
+ }
88
+ }
85
89
  }
86
90
  ```
87
91
 
88
- The paths above are examples; use your session's values. Restart the MCP
89
- connection after changing its configuration. These variables locate the
90
- desktop session; the keyring must still be unlocked, `secret-tool` installed,
91
- and the client must permit access to the session bus. The error alone does not
92
- distinguish a locked keyring from an unavailable password-store service.
92
+ Replace the example path with the absolute directory selected during setup.
93
+ Sharing a directory shares the wallet's funds, history, and spending limits.
94
+ Omitting `--data-dir` always selects the default dedicated MCP wallet.
93
95
 
94
- Call the **`doctor` MCP tool** to diagnose the environment that actually failed.
95
- It tests credential access, node APIs and streaming, fresh worker output, and
96
- wallet readiness. A working `atto doctor` in your terminal does not prove that
97
- the MCP launch environment works. On Linux, doctor can verify a suggested
98
- `env` configuration in an isolated credential probe. It only marks that suggestion
99
- verified when the credential matches this wallet; applying it still requires
100
- restarting the MCP connection and rerunning the tool. It never changes client
101
- configuration or grants spending approval.
96
+ Setup prints a configuration containing the selected directory and the package
97
+ version used. You can copy it directly, or replace its package version with
98
+ `@latest`; keep the selected directory when using another wallet.
99
+
100
+ ### Install globally
102
101
 
103
- If the server cannot start, use its independent terminal command with the same
104
- profile. After publication, it also works without a global installation:
102
+ If you prefer a global installation:
105
103
 
106
104
  ```sh
107
- atto-mcp --data-dir /absolute/path/to/profile doctor
108
- npx --yes @attocash/mcp@VERSION --data-dir /absolute/path/to/profile doctor
105
+ npm install --global @attocash/mcp
106
+ atto-mcp setup
109
107
  ```
110
108
 
111
- Doctor runs full checks and may prompt through the OS password store. Allow up
112
- to 60 seconds. It never returns recovery material or signs transactions, starts
113
- receiving, retries payments, or changes wallet state. Existing background wallet
114
- activity in an approved MCP session continues independently. Read-only MCP access
115
- is reported as intentional. Repair suggestions are data for the agent to review;
116
- apply only changes authorized by the user, then rerun doctor. See the
117
- [full report and timeout semantics](https://github.com/attocash/integrations/tree/main/atto-cli#diagnostics).
109
+ Use `atto-mcp` as the configured command with an empty argument list for the
110
+ default wallet. Add `--data-dir` and the selected path for another wallet.
111
+ Source installation is covered in [Install from source](#install-from-source).
118
112
 
119
- Alternatively, install the two local artifacts together, then run `atto-mcp setup`:
113
+ ## Try these prompts
120
114
 
121
- ```sh
122
- npm run pack
123
- npm install --global ./attocash-cli-0.1.0.tgz ./attocash-mcp-0.1.0.tgz
124
- atto-mcp setup
125
- ```
115
+ After setup, reconnect your MCP client and start with a request like one of
116
+ these. They work with read-only access:
126
117
 
127
- Until these versions are published, install both artifacts in the same npm
128
- command so MCP's exact CLI dependency resolves locally. Use `atto-mcp` as the
129
- configured command with `--data-dir` and the selected path as its arguments.
118
+ | Ask your assistant… | What it can use |
119
+ | --- | --- |
120
+ | “Show my balances and the last 10 payments.” | Balances and account history |
121
+ | “Label address 0 as Main and show my personal labels.” | Profile-local address names |
122
+ | “Watch my wallet for incoming payments.” | Session watches |
123
+ | “Explain my current spending limits and remaining allowance.” | Approved policy and usage |
124
+ | “Check why my wallet cannot connect.” | The `doctor` tool |
130
125
 
131
- The server accepts `--data-dir <directory>`, `--help`, and `--version`. Without
132
- `--data-dir`, it uses the dedicated `profiles/mcp` directory under the legacy
133
- Atto MCP data directory. It no longer implicitly shares the CLI default.
134
- To retain a wallet used by an older MCP configuration, choose the existing CLI
135
- wallet during setup or add its old directory explicitly. No wallet state or keys
136
- are moved. Sharing an absolute directory also shares funds, history, request IDs,
137
- and limits. See [profile paths and backup requirements](https://github.com/attocash/integrations/tree/main/atto-cli#profiles-and-recovery).
126
+ After you approve spending access and label a destination “Savings”, try:
138
127
 
139
- Terminal approval and doctor commands print readable text by default; add `--json` for a
140
- structured result or error. Setup always prints copyable client configuration
141
- JSON, with readable prompts on stderr. Server stdout is exclusively JSON-RPC,
142
- including when `--json` is supplied.
128
+ > Send 1 ATTO to Savings and show me the resolved address and transaction hash.
143
129
 
144
- Wallet reset is available only through `atto --data-dir <profile> wallet reset`
145
- in your terminal after stopping sessions that use that profile. It requires
146
- explicit confirmation and removes the credential, local history, and approvals.
147
- Back up the recovery phrase and public profile first. MCP has no reset tool.
130
+ The assistant uses the local label and an explicit request ID. Your approved
131
+ limits still apply. [See how payment approvals work](#approve-access-and-limit-changes).
148
132
 
149
133
  ## Approve access and limit changes
150
134
 
@@ -168,27 +152,21 @@ it does not change limits or grant access. For example:
168
152
  Omitting `pool` from `limits_propose` preserves the current approved pool. Read-only
169
153
  MCP can propose pool changes. Approval derives missing indexes without activating
170
154
  them for automatic receiving.
171
- A human must run approval in their own local terminal using the proposal ID and
172
- the exact directory from the MCP configuration. For a published version, replace
173
- `VERSION` and `PROPOSAL_ID` below:
155
+ A human must run approval in their own local terminal using the proposal ID
156
+ returned by `limits_propose`. For the default MCP wallet:
174
157
 
175
158
  ```sh
176
- npx --yes @attocash/mcp@VERSION --data-dir /absolute/path/to/profile limits approve PROPOSAL_ID
159
+ npx --yes @attocash/mcp@latest limits approve PROPOSAL_ID
177
160
  # Or reject it:
178
- npx --yes @attocash/mcp@VERSION --data-dir /absolute/path/to/profile limits reject PROPOSAL_ID
161
+ npx --yes @attocash/mcp@latest limits reject PROPOSAL_ID
179
162
  ```
180
163
 
181
- From a built source checkout, use:
182
-
183
- ```sh
184
- node atto-mcp/dist/main.js --data-dir /absolute/path/to/profile limits approve PROPOSAL_ID
185
- node atto-mcp/dist/main.js --data-dir /absolute/path/to/profile limits reject PROPOSAL_ID
186
- ```
187
-
188
- Installed users can also run `atto-mcp` or `atto` with the same arguments. Review
189
- the wallet, network, directory, proposed access, limits, exact account indexes,
190
- and consolidation setting displayed before
191
- confirming. There is no MCP approval tool or flag that skips this review.
164
+ If your MCP configuration includes `--data-dir`, add that same option and path
165
+ before `limits`. A globally installed `atto-mcp` accepts the same arguments.
166
+ To use `atto` instead, always specify the MCP wallet's directory with `--data-dir`.
167
+ Review the wallet, network, directory, proposed access, limits, exact account
168
+ indexes, and consolidation setting displayed before confirming. There is no
169
+ MCP approval tool or flag that skips this review.
192
170
  Proposals expire after 24 hours. A new proposal replaces the previous ID;
193
171
  approval fails if the wallet identity, network, directory, or policy revision
194
172
  changed since it was proposed.
@@ -335,6 +313,21 @@ changing policy does not remove historical spending or uncertain reservations.
335
313
 
336
314
  ## Session behavior
337
315
 
316
+ The server accepts `--data-dir <directory>`, `--help`, and `--version`. Without
317
+ `--data-dir`, it uses its default dedicated MCP wallet. To share a CLI wallet
318
+ or use another profile, specify its absolute directory as shown above. Sharing
319
+ a directory also shares funds, history, request IDs, and limits. See [profile paths and backup requirements](https://github.com/attocash/integrations/tree/main/atto-cli#profiles-and-recovery).
320
+
321
+ Terminal approval and doctor commands print readable text by default; add `--json` for a
322
+ structured result or error. Setup always prints copyable client configuration
323
+ JSON, with readable prompts on stderr. Server stdout is exclusively JSON-RPC,
324
+ including when `--json` is supplied.
325
+
326
+ Wallet reset is available only through `atto --data-dir <profile> wallet reset`
327
+ in your terminal after stopping sessions that use that profile. It requires
328
+ explicit confirmation and removes the credential, local history, and approvals.
329
+ Back up the recovery phrase and public profile first. MCP has no reset tool.
330
+
338
331
  Automatic receiving runs while the server is connected only when MCP has
339
332
  locally approved spending access and `autoReceive` is enabled in wallet settings.
340
333
  Approval and revocation take effect in an existing session; queued receives
@@ -378,20 +371,94 @@ mutations are coordinated through the shared state directory. Preserve that
378
371
  state when restoring or moving the wallet: recovery words alone do not restore
379
372
  spending history, request IDs, or pending publication records.
380
373
 
381
- ## Development
374
+ ## Troubleshooting
382
375
 
383
- From the repository root:
376
+ On Linux, the CLI can work in your terminal while MCP reports
377
+ `SECRET_STORE_UNAVAILABLE`, even with an unlocked keyring. An MCP client may
378
+ launch the server without the desktop-session environment. In the terminal
379
+ where the CLI works, check:
384
380
 
385
381
  ```sh
382
+ printenv DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR
383
+ ```
384
+
385
+ If these variables are missing from the MCP server's environment, add their
386
+ actual values to the `atto` server's `env` configuration. For example:
387
+
388
+ ```json
389
+ "env": {
390
+ "DBUS_SESSION_BUS_ADDRESS": "unix:path=/run/user/1000/bus",
391
+ "XDG_RUNTIME_DIR": "/run/user/1000"
392
+ }
393
+ ```
394
+
395
+ The paths above are examples; use your session's values. Restart the MCP
396
+ connection after changing its configuration. These variables locate the
397
+ desktop session; the keyring must still be unlocked, `secret-tool` installed,
398
+ and the client must permit access to the session bus. The error alone does not
399
+ distinguish a locked keyring from an unavailable password-store service.
400
+
401
+ Call the **`doctor` MCP tool** to diagnose the environment that actually failed.
402
+ It tests credential access, node APIs and streaming, fresh worker output, and
403
+ wallet readiness. A working `atto doctor` in your terminal does not prove that
404
+ the MCP launch environment works. On Linux, doctor can verify a suggested
405
+ `env` configuration in an isolated credential probe. It only marks that suggestion
406
+ verified when the credential matches this wallet; applying it still requires
407
+ restarting the MCP connection and rerunning the tool. It never changes client
408
+ configuration or grants spending approval.
409
+
410
+ If the server cannot start, run diagnostics in your terminal with the same
411
+ profile:
412
+
413
+ ```sh
414
+ npx --yes @attocash/mcp@latest --data-dir /absolute/path/to/profile doctor
415
+ ```
416
+
417
+ Doctor runs full checks and may prompt through the OS password store. Allow up
418
+ to 60 seconds. It never returns recovery material or signs transactions, starts
419
+ receiving, retries payments, or changes wallet state. Existing background wallet
420
+ activity in an approved MCP session continues independently. Read-only MCP access
421
+ is reported as intentional. Repair suggestions are data for the agent to review;
422
+ apply only changes authorized by the user, then rerun doctor. See the
423
+ [full report and timeout semantics](https://github.com/attocash/integrations/tree/main/atto-cli#diagnostics).
424
+
425
+ ## Install from source
426
+
427
+ Clone the repository, build both workspaces, and run setup from source:
428
+
429
+ ```sh
430
+ git clone https://github.com/attocash/integrations.git
431
+ cd integrations
386
432
  npm ci
387
433
  npm run build
388
- npm run check --workspace @attocash/mcp
389
- npm test --workspace @attocash/mcp
434
+ node atto-mcp/dist/main.js setup
435
+ ```
436
+
437
+ Setup normally prints an npm launch configuration. To run your local build,
438
+ keep its selected directory and use your absolute source entry point:
439
+
440
+ ```json
441
+ {
442
+ "mcpServers": {
443
+ "atto": {
444
+ "command": "node",
445
+ "args": [
446
+ "/absolute/path/to/integrations/atto-mcp/dist/main.js",
447
+ "--data-dir",
448
+ "/absolute/path/to/selected/profile"
449
+ ]
450
+ }
451
+ }
452
+ }
453
+ ```
454
+
455
+ To test the packaged local build, install both artifacts together so MCP uses
456
+ the CLI from the same checkout:
457
+
458
+ ```sh
459
+ npm run pack
460
+ npm install --global ./attocash-cli-0.1.1.tgz ./attocash-mcp-0.1.1.tgz
461
+ atto-mcp setup
390
462
  ```
391
463
 
392
- The root build compiles the CLI library before MCP. The server uses the public
393
- `@attocash/cli/core` and `@attocash/cli/profiles` exports; terminal setup and review
394
- use `@attocash/cli/terminal`. It does not spawn CLI commands or import wallet
395
- internals. Tests use the real SDK stdio client with temporary profiles and mock
396
- network services. The root packaging checks also exercise the installed CLI and
397
- MCP artifacts together.
464
+ For development and testing, see the [contributor guide](https://github.com/attocash/integrations/blob/main/docs/contributing.md).
package/dist/main.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@attocash/mcp",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Local Atto MCP server using the Atto CLI wallet engine",
5
5
  "license": "BSD-3-Clause",
6
6
  "type": "module",
@@ -21,7 +21,7 @@
21
21
  "directory": "atto-mcp"
22
22
  },
23
23
  "dependencies": {
24
- "@attocash/cli": "0.1.0",
24
+ "@attocash/cli": "0.1.1",
25
25
  "@modelcontextprotocol/server": "2.0.0",
26
26
  "commander": "14.0.2"
27
27
  }