neozip-mcp 0.1.0-beta
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/.cursor/mcp.json.global.example +10 -0
- package/CHANGELOG.md +16 -0
- package/DOCUMENTATION.md +40 -0
- package/LICENSE +16 -0
- package/README.md +223 -0
- package/SECURITY.md +37 -0
- package/dist/account/account-state.js +86 -0
- package/dist/account/format-account-status.js +37 -0
- package/dist/account/identity-provision.js +75 -0
- package/dist/account/identity-wrap.js +69 -0
- package/dist/account/profile-crypto.js +47 -0
- package/dist/account/profile-store.js +108 -0
- package/dist/account/require-account.js +29 -0
- package/dist/account/token-service-identity.js +395 -0
- package/dist/account/types.js +2 -0
- package/dist/account/wallet-evm.js +39 -0
- package/dist/archive/blockchain-status.js +303 -0
- package/dist/archive/crypto-self.js +114 -0
- package/dist/archive/detect-text.js +56 -0
- package/dist/archive/embed-metadata.js +283 -0
- package/dist/archive/encryption.js +166 -0
- package/dist/archive/extract-entry-buffer.js +18 -0
- package/dist/archive/find-entry.js +21 -0
- package/dist/archive/grep-content.js +141 -0
- package/dist/archive/identity-key.js +176 -0
- package/dist/archive/manifest.js +55 -0
- package/dist/archive/merkle.js +31 -0
- package/dist/archive/metadata-paths.js +14 -0
- package/dist/archive/mint-archive.js +61 -0
- package/dist/archive/open-archive.js +23 -0
- package/dist/archive/read-entry-buffer.js +11 -0
- package/dist/archive/read-entry-content.js +51 -0
- package/dist/archive/recipient-access.js +26 -0
- package/dist/archive/recipient-decrypt.js +21 -0
- package/dist/archive/recipient-lookup.js +55 -0
- package/dist/archive/timestamp-network.js +54 -0
- package/dist/config/capabilities.js +37 -0
- package/dist/config/index.js +74 -0
- package/dist/connect-cli.js +312 -0
- package/dist/connection/coordinator.js +74 -0
- package/dist/connection/credentials.js +29 -0
- package/dist/connection/crypto.js +56 -0
- package/dist/connection/dump.js +79 -0
- package/dist/connection/incomplete-setup.js +81 -0
- package/dist/connection/interactive.js +814 -0
- package/dist/connection/legacy-profile-reader.js +47 -0
- package/dist/connection/magic-link.js +138 -0
- package/dist/connection/migrate.js +76 -0
- package/dist/connection/onboarding.js +524 -0
- package/dist/connection/origin.js +63 -0
- package/dist/connection/phase.js +93 -0
- package/dist/connection/phone.js +20 -0
- package/dist/connection/promote-active.js +53 -0
- package/dist/connection/reset.js +20 -0
- package/dist/connection/setup-guidance.js +154 -0
- package/dist/connection/status-report.js +40 -0
- package/dist/connection/store.js +352 -0
- package/dist/connection/token-auth.js +42 -0
- package/dist/connection/types.js +2 -0
- package/dist/connection/wallet-setup.js +70 -0
- package/dist/constants/wallet-identity.js +11 -0
- package/dist/index.js +47 -0
- package/dist/load-env.js +16 -0
- package/dist/neozipkit-node.js +11 -0
- package/dist/register/resources.js +14 -0
- package/dist/register/tools.js +77 -0
- package/dist/resources/zip-resource.js +40 -0
- package/dist/resources/zip-uri.js +23 -0
- package/dist/security/auth.js +28 -0
- package/dist/security/capabilities.js +85 -0
- package/dist/security/rate-limiter.js +43 -0
- package/dist/security/resource-limiter.js +44 -0
- package/dist/security/sandbox.js +61 -0
- package/dist/server.js +32 -0
- package/dist/startup-account-gate.js +101 -0
- package/dist/startup-summary.js +40 -0
- package/dist/token-service/require-configured.js +23 -0
- package/dist/tools/account.js +504 -0
- package/dist/tools/compress.js +237 -0
- package/dist/tools/connect-status.js +143 -0
- package/dist/tools/extract.js +62 -0
- package/dist/tools/grep-entries.js +42 -0
- package/dist/tools/identity-status.js +157 -0
- package/dist/tools/info.js +147 -0
- package/dist/tools/list.js +118 -0
- package/dist/tools/lookup-recipient.js +37 -0
- package/dist/tools/mint.js +41 -0
- package/dist/tools/read-entry.js +35 -0
- package/dist/tools/search-entries.js +71 -0
- package/dist/tools/stamp.js +60 -0
- package/dist/tools/test.js +90 -0
- package/dist/tools/token-service-account.js +143 -0
- package/dist/tools/upgrade.js +60 -0
- package/dist/tools/verify.js +75 -0
- package/dist/tools/wallet-config-status.js +119 -0
- package/dist/tools/wallet-info.js +64 -0
- package/dist/translators/index.js +106 -0
- package/dist/types/index.js +7 -0
- package/dist/util/mask.js +30 -0
- package/dist/util/token-service-fetch.js +23 -0
- package/dist/vendor/neozipkit-pro.js +3 -0
- package/docs/NEOZIP_CONNECTION_STORE.md +238 -0
- package/docs/NEOZIP_CONNECT_CLI.md +185 -0
- package/docs/OPERATIONS.md +992 -0
- package/docs/examples/CLAUDE.md.example +22 -0
- package/docs/examples/claude/skills/neozip-mcp/SKILL.md +54 -0
- package/docs/examples/claude/skills/neozip-notarization/SKILL.md +75 -0
- package/docs/examples/mcp.json.claude.example +11 -0
- package/docs/examples/neozip-mcp-cursor-rule.mdc +31 -0
- package/docs/installation-guides/INSTALL_CLAUDE_CODE.md +286 -0
- package/docs/installation-guides/INSTALL_CLAUDE_WORKSPACE.md +301 -0
- package/docs/installation-guides/README.md +76 -0
- package/package.json +99 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# NeoZip MCP
|
|
2
|
+
|
|
3
|
+
This project uses **neozip-mcp** for ZIP and `.nzip` archive operations via MCP tools.
|
|
4
|
+
|
|
5
|
+
## Agent behavior
|
|
6
|
+
|
|
7
|
+
- Use **neozip-mcp** MCP tools for archive work — do not read or search for neozip-mcp source unless this repo is the neozip-mcp development repository.
|
|
8
|
+
- **Archives** (create, read, extract, search, inspect): skills under `.claude/skills/neozip-mcp/` — tools `compress`, `extract`, `list`, `info`, `test`, `read_entry`, `search_entries`, `grep_entries`.
|
|
9
|
+
- **Notarization / recipient encryption** (tokenize, timestamp, verify, encrypt for email): skills under `.claude/skills/neozip-notarization/` — call `connect_status` first; if not ready, tell the user to run `neozip-connect` and start a new session.
|
|
10
|
+
- Use **absolute paths** under the MCP sandbox (`NEOZIP_MCP_SANDBOX_PATHS`, typically `${CLAUDE_PROJECT_DIR:-.}` and `${HOME}`).
|
|
11
|
+
- Surface MCP tool errors (`Error: …`) verbatim to the user.
|
|
12
|
+
|
|
13
|
+
## Setup (maintainers)
|
|
14
|
+
|
|
15
|
+
Copy from the installed npm package:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
cp node_modules/neozip-mcp/docs/examples/mcp.json.claude.example .mcp.json
|
|
19
|
+
cp -R node_modules/neozip-mcp/docs/examples/claude/skills .claude/
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Or merge this file from `docs/examples/CLAUDE.md.example`.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: neozip-mcp
|
|
3
|
+
description: >-
|
|
4
|
+
Create, read, extract, search, and inspect ZIP and .nzip archives via
|
|
5
|
+
neozip-mcp MCP tools. Use when the user mentions zip, nzip, archives, compress,
|
|
6
|
+
extract, unzip, or NeoZip; or when inspecting archive contents (listing, reading
|
|
7
|
+
one file, searching names or file bodies) without full disk extraction. For
|
|
8
|
+
blockchain timestamp/tokenize/verify or recipient encryption, use the
|
|
9
|
+
neozip-notarization skill instead.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# NeoZip MCP — Archives
|
|
13
|
+
|
|
14
|
+
Use **neozip-mcp** MCP tools for all ZIP/.nzip work. End users install the published npm package — do not read or search for neozip-mcp source code.
|
|
15
|
+
|
|
16
|
+
## Archive tools
|
|
17
|
+
|
|
18
|
+
| Task | Tool |
|
|
19
|
+
|------|------|
|
|
20
|
+
| Create archive | `compress` |
|
|
21
|
+
| Unpack to directory | `extract` |
|
|
22
|
+
| List entries | `list` |
|
|
23
|
+
| Metadata / merkle / blockchain status | `info` |
|
|
24
|
+
| Integrity check | `test` |
|
|
25
|
+
| Read one file inside archive | `read_entry` |
|
|
26
|
+
| Find entries by path/name | `search_entries` |
|
|
27
|
+
| Search file contents in archive | `grep_entries` |
|
|
28
|
+
|
|
29
|
+
Prefer in-archive tools (`read_entry`, `grep_entries`, `search_entries`) over shell `unzip` or extracting to a temp directory.
|
|
30
|
+
|
|
31
|
+
## Paths
|
|
32
|
+
|
|
33
|
+
Use **absolute paths** under the configured sandbox (`NEOZIP_MCP_SANDBOX_PATHS`, typically project root and home). If a tool returns `Path is outside sandbox`, ask the user to widen sandbox paths or use a path inside the allowlist.
|
|
34
|
+
|
|
35
|
+
## Passwords
|
|
36
|
+
|
|
37
|
+
For encrypted archives, pass `options.password` to `extract`, `list`, `info`, `test`, `read_entry`, `search_entries`, and `grep_entries`. To create a password ZIP, set `options.password` on `compress`.
|
|
38
|
+
|
|
39
|
+
## Blockchain and recipient encryption
|
|
40
|
+
|
|
41
|
+
These need NeoZip Token Service / wallet setup and are covered by the **neozip-notarization** skill:
|
|
42
|
+
|
|
43
|
+
- `compress` with `options.timestamp`, `options.tokenize`, or `options.recipientEmails`
|
|
44
|
+
- `mint`, `verify`, `stamp`, `upgrade_timestamped`
|
|
45
|
+
|
|
46
|
+
Before any of those, call `connect_status`; if it is not ready, tell the user to run `neozip-connect` in a terminal and reload MCP.
|
|
47
|
+
|
|
48
|
+
## Errors
|
|
49
|
+
|
|
50
|
+
Tools return `Error: …` as text content — surface that message to the user verbatim.
|
|
51
|
+
|
|
52
|
+
## Reference
|
|
53
|
+
|
|
54
|
+
Full parameters: `OPERATIONS.md` in the installed `neozip-mcp` package (`node_modules/neozip-mcp/docs/OPERATIONS.md`).
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: neozip-notarization
|
|
3
|
+
description: >-
|
|
4
|
+
Blockchain timestamp, tokenize (NFT), verify, and recipient encryption for ZIP
|
|
5
|
+
and .nzip archives via neozip-mcp MCP tools. Use when the user mentions tokenize,
|
|
6
|
+
timestamp, notarize, stamp, mint, NFT, on-chain proof, blockchain verification,
|
|
7
|
+
or encrypting an archive for specific recipients by email. Requires NeoZip
|
|
8
|
+
Token Service / wallet setup via the neozip-connect CLI.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# NeoZip MCP — Notarization & Recipient Encryption
|
|
12
|
+
|
|
13
|
+
Use **neozip-mcp** MCP tools for blockchain notarization and recipient encryption of ZIP/.nzip archives. End users install the published npm package — do not read or search for neozip-mcp source code. For plain archive create/read/extract/search, use the **neozip-mcp** (archives) skill.
|
|
14
|
+
|
|
15
|
+
## Preflight — always run first
|
|
16
|
+
|
|
17
|
+
Before `compress` with `options.timestamp`, `options.tokenize`, or `options.recipientEmails`, or before `mint` / `stamp`:
|
|
18
|
+
|
|
19
|
+
1. Call `connect_status`.
|
|
20
|
+
2. If it is not `ready`, tell the user to run **`neozip-connect`** in a terminal and reload MCP. Do not guess wallet or Token Service credentials.
|
|
21
|
+
3. Surface any `Error: …` text verbatim.
|
|
22
|
+
|
|
23
|
+
`mint`, `stamp`, and `verify` require the `blockchain` capability group, which is added automatically when connect is ready and capabilities are `auto`.
|
|
24
|
+
|
|
25
|
+
`timestamp` and `tokenize` are **mutually exclusive** on `compress`. Prefer `tokenize: true` when a wallet is configured — tokenized archives provide on-chain proof and supersede the timestamp-only path.
|
|
26
|
+
|
|
27
|
+
## Tools
|
|
28
|
+
|
|
29
|
+
| Task | Tool |
|
|
30
|
+
|------|------|
|
|
31
|
+
| Timestamp + on-chain token at compress time | `compress` (`options.timestamp` / `options.tokenize`) |
|
|
32
|
+
| Encrypt for recipients at compress time | `compress` (`options.recipientEmails`) |
|
|
33
|
+
| Submit existing archive's merkle root for timestamping | `stamp` |
|
|
34
|
+
| Replace pending timestamp with confirmed on-chain metadata | `upgrade_timestamped` |
|
|
35
|
+
| Mint a merkle root as an NFT (Base) | `mint` |
|
|
36
|
+
| Verify a tokenized archive against the blockchain | `verify` |
|
|
37
|
+
| Resolve a recipient's public key by email | `lookup_recipient` |
|
|
38
|
+
| Wallet / network status (address, balance) | `wallet_info` |
|
|
39
|
+
| Token Service identity provisioning (decrypt readiness) | `identity_status` |
|
|
40
|
+
| Credential sources + readiness (no secrets) | `wallet_config_status` |
|
|
41
|
+
|
|
42
|
+
## Notarization workflows
|
|
43
|
+
|
|
44
|
+
**Timestamp a ZIP**
|
|
45
|
+
|
|
46
|
+
1. `connect_status` (verified email required)
|
|
47
|
+
2. `compress` with `options.timestamp: true` (or `useSHA256: true` then `stamp`)
|
|
48
|
+
3. `upgrade_timestamped` after the Token Service batch confirms on-chain
|
|
49
|
+
|
|
50
|
+
**Tokenize and verify**
|
|
51
|
+
|
|
52
|
+
1. `connect_status` (wallet required)
|
|
53
|
+
2. `compress` with `options.tokenize: true` (mints the merkle root; embeds `META-INF/TOKEN.NZIP`)
|
|
54
|
+
3. `verify` on the tokenized archive
|
|
55
|
+
|
|
56
|
+
`mint` is the standalone path when you already have a 64-char hex merkle root (e.g. from `info`).
|
|
57
|
+
|
|
58
|
+
## Recipient encryption
|
|
59
|
+
|
|
60
|
+
1. `connect_status` and, for each recipient, `lookup_recipient { "email": "user@example.com" }` to confirm a provisioned public key.
|
|
61
|
+
2. `compress` with `options.recipientEmails: ["a@example.com", "b@example.com"]` — embeds `META-INF/ACCESS.NZIP`.
|
|
62
|
+
3. `options.recipientEmails` is **mutually exclusive** with `password`, `timestamp`, and `tokenize`. Do not combine them.
|
|
63
|
+
4. To check whether the current account can open recipient-encrypted archives, use `identity_status`.
|
|
64
|
+
|
|
65
|
+
## Onboarding
|
|
66
|
+
|
|
67
|
+
Account setup is handled by the **`neozip-connect`** CLI (email verification, wallet, identity), not by MCP tools. When `connect_status` is not ready, instruct the user to run `neozip-connect` and reload MCP. Credentials live in `~/.neozip/connection/`; never request or echo secrets.
|
|
68
|
+
|
|
69
|
+
## Errors
|
|
70
|
+
|
|
71
|
+
Tools return `Error: …` as text content — surface that message to the user verbatim.
|
|
72
|
+
|
|
73
|
+
## Reference
|
|
74
|
+
|
|
75
|
+
Full parameters: `OPERATIONS.md` in the installed `neozip-mcp` package — see the "Blockchain Operations" and "NeoZip Token Service" sections (`node_modules/neozip-mcp/docs/OPERATIONS.md`).
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Use neozip-mcp MCP tools for ZIP archives; do not read neozip-mcp source
|
|
3
|
+
alwaysApply: true
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# NeoZip ZIP operations
|
|
7
|
+
|
|
8
|
+
For create, read, extract, search, or inspect ZIP/.nzip archives, use **neozip-mcp** MCP tools only:
|
|
9
|
+
|
|
10
|
+
- `compress` — create archives
|
|
11
|
+
- `extract` — unpack to a directory
|
|
12
|
+
- `list` — entry names (text or JSON)
|
|
13
|
+
- `info` — metadata, merkle root, blockchain status
|
|
14
|
+
- `test` — integrity check
|
|
15
|
+
- `read_entry` — read one file inside an archive
|
|
16
|
+
- `search_entries` — find entries by name/path pattern
|
|
17
|
+
- `grep_entries` — search file contents inside an archive
|
|
18
|
+
|
|
19
|
+
Do **not** read, search, or assume access to neozip-mcp source code. End users install the published npm package only.
|
|
20
|
+
|
|
21
|
+
**Paths:** use absolute paths under the configured sandbox (`NEOZIP_MCP_SANDBOX_PATHS`, typically the workspace and home directory).
|
|
22
|
+
|
|
23
|
+
**Blockchain options** (`compress` with `options.tokenize`, `options.timestamp`, or `options.recipientEmails`):
|
|
24
|
+
|
|
25
|
+
1. Call `connect_status` first.
|
|
26
|
+
2. If not ready, tell the user to run `neozip-connect` in a terminal and reload MCP.
|
|
27
|
+
3. Do not guess wallet or Token Service credentials.
|
|
28
|
+
|
|
29
|
+
**Diagnostics:** `connect_status`, `wallet_config_status` — no secrets returned.
|
|
30
|
+
|
|
31
|
+
**Errors:** tools return `Error: …` text; surface that message to the user.
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
# Install NeoZip MCP in Claude Code
|
|
2
|
+
|
|
3
|
+
Use **neozip-mcp** with [Claude Code](https://code.claude.com/) (terminal agent). Claude Code spawns the `neozip-mcp` stdio server; the agent calls MCP tools (`compress`, `list`, `info`, …). No neozip-mcp source checkout is required.
|
|
4
|
+
|
|
5
|
+
**Related:** [INSTALL_CLAUDE_WORKSPACE.md](./INSTALL_CLAUDE_WORKSPACE.md) (team `.mcp.json`), [OPERATIONS.md](../OPERATIONS.md) (tools), [NEOZIP_CONNECT_CLI.md](../NEOZIP_CONNECT_CLI.md) (account setup).
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Prerequisites
|
|
10
|
+
|
|
11
|
+
1. **Node.js 20+** — [nodejs.org](https://nodejs.org/)
|
|
12
|
+
2. **Claude Code** installed and authenticated
|
|
13
|
+
3. Open Claude Code **inside the project directory** you want to work in (recommended for correct sandbox scope)
|
|
14
|
+
4. **Optional:** [neozip-connect](../NEOZIP_CONNECT_CLI.md) account — only for tokenize, timestamp, recipient encryption, mint, and stamp
|
|
15
|
+
|
|
16
|
+
Plain ZIP operations (`compress` without blockchain options) do **not** require `neozip-connect`.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## 1. Install neozip-mcp (beta)
|
|
21
|
+
|
|
22
|
+
Run in your **system terminal** (not inside a Claude Code session):
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm install -g neozip-mcp@beta
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
This installs:
|
|
29
|
+
|
|
30
|
+
| Command | Purpose |
|
|
31
|
+
|---------|---------|
|
|
32
|
+
| `neozip-mcp` | MCP server (Claude Code spawns this) |
|
|
33
|
+
| `neozip-connect` | Interactive account setup |
|
|
34
|
+
|
|
35
|
+
Verify:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
which neozip-mcp
|
|
39
|
+
which neozip-connect
|
|
40
|
+
neozip-connect status
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## 2. Choose a configuration scope
|
|
46
|
+
|
|
47
|
+
Claude Code stores MCP servers at three scopes. Pick one:
|
|
48
|
+
|
|
49
|
+
| Scope | Stored in | Who gets it | Best for |
|
|
50
|
+
|-------|-----------|-------------|----------|
|
|
51
|
+
| **User** | `~/.claude.json` (top-level `mcpServers`) | You, all projects | Personal default on every machine |
|
|
52
|
+
| **Local** | `~/.claude.json` (under this project path) | You, this project only | Private experiments |
|
|
53
|
+
| **Project** | `.mcp.json` in repo root | Everyone who clones the repo | Team workspace — see [INSTALL_CLAUDE_WORKSPACE.md](./INSTALL_CLAUDE_WORKSPACE.md) |
|
|
54
|
+
|
|
55
|
+
When the same server name exists in multiple scopes, **local** wins over **project**, which wins over **user**.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## 3. User scope (recommended for individuals)
|
|
60
|
+
|
|
61
|
+
Available in **every project** on your machine. Good default when you use NeoZip across many repos.
|
|
62
|
+
|
|
63
|
+
### Option A — CLI (Claude Code 2.1.1+)
|
|
64
|
+
|
|
65
|
+
Run in your **system terminal** from any directory:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
claude mcp add-json neozip-mcp \
|
|
69
|
+
'{"type":"stdio","command":"neozip-mcp","env":{"NEOZIP_MCP_SANDBOX_PATHS":"${CLAUDE_PROJECT_DIR:-.},${HOME}"}}' \
|
|
70
|
+
--scope user
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Capabilities default to **`auto`**: blockchain tools appear after `neozip-connect` reaches `phase: ready` and you reload MCP. Pin `NEOZIP_MCP_CAPABILITIES` in `env` to override (see [Capability presets](#capability-presets) below).
|
|
74
|
+
|
|
75
|
+
### Option B — Edit `~/.claude.json`
|
|
76
|
+
|
|
77
|
+
Add or merge this block under the top-level `mcpServers` key:
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"mcpServers": {
|
|
82
|
+
"neozip-mcp": {
|
|
83
|
+
"type": "stdio",
|
|
84
|
+
"command": "neozip-mcp",
|
|
85
|
+
"env": {
|
|
86
|
+
"NEOZIP_MCP_SANDBOX_PATHS": "${CLAUDE_PROJECT_DIR:-.},${HOME}"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Copy from: [`docs/examples/mcp.json.claude.example`](../examples/mcp.json.claude.example) (same JSON works for user and project scope; merge into `~/.claude.json` here, or copy to `.mcp.json` for workspace scope).
|
|
94
|
+
|
|
95
|
+
> **Note:** `~/.claude.json` also stores per-project state. For user-scoped MCP, put `mcpServers` at the **top level**, not nested under a project path. Using `claude mcp add --scope user` avoids editing the file by hand.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## 4. Local scope (this project only)
|
|
100
|
+
|
|
101
|
+
Private to you for the current project. Stored in `~/.claude.json` under that project's entry.
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
cd /path/to/your/project
|
|
105
|
+
|
|
106
|
+
claude mcp add-json neozip-mcp \
|
|
107
|
+
'{"type":"stdio","command":"neozip-mcp","env":{"NEOZIP_MCP_SANDBOX_PATHS":"${CLAUDE_PROJECT_DIR:-.},${HOME}"}}' \
|
|
108
|
+
--scope local
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
`--scope local` is the default if you omit `--scope`.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## 5. One-time account setup (optional)
|
|
116
|
+
|
|
117
|
+
For **tokenize**, **timestamp**, **recipient encryption**, **mint**, or **stamp**:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
neozip-connect
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Complete the wizard (Token Service URL → email → verification code → wallet). Secrets are saved to `~/.neozip/connection/` with machine-local encryption — **do not** put wallet or Token Service tokens in MCP config.
|
|
124
|
+
|
|
125
|
+
Then start a **new** Claude Code session in your project.
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## 6. Verify installation
|
|
130
|
+
|
|
131
|
+
In your system terminal:
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
claude mcp list
|
|
135
|
+
claude mcp get neozip-mcp
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Start Claude Code in your project:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
cd /path/to/your/project
|
|
142
|
+
claude
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Inside Claude Code:
|
|
146
|
+
|
|
147
|
+
- Run `/mcp` to inspect connected servers and tools
|
|
148
|
+
- Confirm **neozip-mcp** appears with tools such as `compress`, `list`, `info`
|
|
149
|
+
|
|
150
|
+
**Smoke test prompts:**
|
|
151
|
+
|
|
152
|
+
- "List entries in `/path/to/archive.nzip`" → should call `list`
|
|
153
|
+
- "Is neozip-connect ready for tokenize?" → should call `connect_status`
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Configuration reference
|
|
158
|
+
|
|
159
|
+
### Capability presets
|
|
160
|
+
|
|
161
|
+
| Use case | `NEOZIP_MCP_CAPABILITIES` |
|
|
162
|
+
|----------|---------------------------|
|
|
163
|
+
| Default (recommended) | omit or `auto` |
|
|
164
|
+
| ZIP only | `zip` |
|
|
165
|
+
| ZIP + read-only verify | `zip,readonly` |
|
|
166
|
+
| Always expose blockchain | `zip,blockchain,readonly` |
|
|
167
|
+
| Strict startup gate | add `account` and `"NEOZIP_MCP_REQUIRE_ACCOUNT": "true"` |
|
|
168
|
+
|
|
169
|
+
### Sandbox paths
|
|
170
|
+
|
|
171
|
+
`NEOZIP_MCP_SANDBOX_PATHS` limits which paths tools may touch. Recommended for Claude Code:
|
|
172
|
+
|
|
173
|
+
```json
|
|
174
|
+
"NEOZIP_MCP_SANDBOX_PATHS": "${CLAUDE_PROJECT_DIR:-.},${HOME}"
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
- `${CLAUDE_PROJECT_DIR:-.}` — project root where Claude Code was launched
|
|
178
|
+
- `${HOME}` — archives under your home directory
|
|
179
|
+
|
|
180
|
+
For a fixed allowlist, use absolute paths:
|
|
181
|
+
|
|
182
|
+
```json
|
|
183
|
+
"NEOZIP_MCP_SANDBOX_PATHS": "/Users/you/projects,/Users/you/archives"
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Optional environment variables
|
|
187
|
+
|
|
188
|
+
| Variable | Purpose |
|
|
189
|
+
|----------|---------|
|
|
190
|
+
| `NEOZIP_MCP_REQUIRE_ACCOUNT` | `"true"` — exit at startup until `neozip-connect` is `phase: ready` |
|
|
191
|
+
| `NEOZIP_UNLOCK_PASSPHRASE` | Custom passphrase for `~/.neozip/connection/` (if not using machine-local default) |
|
|
192
|
+
| `NEOZIP_MCP_STARTUP_SUMMARY` | Log account summary to stderr on start (default: on) |
|
|
193
|
+
|
|
194
|
+
Token Service URL, access token, and wallet key come from **neozip-connect** only — not from MCP env.
|
|
195
|
+
|
|
196
|
+
Full list: [README.md](../../README.md#configuration) and [OPERATIONS.md](../OPERATIONS.md).
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## Agent instructions (recommended)
|
|
201
|
+
|
|
202
|
+
Claude Code loads skills from `.claude/skills/` (project, committable) or `~/.claude/skills/` (personal, all projects). Skills auto-invoke when your prompt matches their description, or invoke directly with `/neozip-mcp` and `/neozip-notarization`.
|
|
203
|
+
|
|
204
|
+
### Personal skills (all projects)
|
|
205
|
+
|
|
206
|
+
After `npm install -g`, copy once per machine:
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
pkg="$(npm root -g)/neozip-mcp"
|
|
210
|
+
mkdir -p ~/.claude/skills/neozip-mcp ~/.claude/skills/neozip-notarization
|
|
211
|
+
cp "$pkg/docs/examples/claude/skills/neozip-mcp/SKILL.md" ~/.claude/skills/neozip-mcp/
|
|
212
|
+
cp "$pkg/docs/examples/claude/skills/neozip-notarization/SKILL.md" ~/.claude/skills/neozip-notarization/
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
If installed to `~/.local`:
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
pkg=~/.local/lib/node_modules/neozip-mcp
|
|
219
|
+
mkdir -p ~/.claude/skills/neozip-mcp ~/.claude/skills/neozip-notarization
|
|
220
|
+
cp "$pkg/docs/examples/claude/skills/neozip-mcp/SKILL.md" ~/.claude/skills/neozip-mcp/
|
|
221
|
+
cp "$pkg/docs/examples/claude/skills/neozip-notarization/SKILL.md" ~/.claude/skills/neozip-notarization/
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
| Skill | Purpose |
|
|
225
|
+
|-------|---------|
|
|
226
|
+
| `neozip-mcp` | Archives — compress, extract, list, info, test, read_entry, search_entries, grep_entries |
|
|
227
|
+
| `neozip-notarization` | Tokenize, timestamp, verify, stamp, mint, recipient encryption |
|
|
228
|
+
|
|
229
|
+
Source: [`docs/examples/claude/skills/`](../examples/claude/skills/)
|
|
230
|
+
|
|
231
|
+
### Project memory (optional)
|
|
232
|
+
|
|
233
|
+
For always-on instructions in every session, copy or merge [`docs/examples/CLAUDE.md.example`](../examples/CLAUDE.md.example) into your repo's `CLAUDE.md`. For team workspaces, prefer committing `.claude/skills/` instead — see [INSTALL_CLAUDE_WORKSPACE.md](./INSTALL_CLAUDE_WORKSPACE.md).
|
|
234
|
+
|
|
235
|
+
### Cursor (optional)
|
|
236
|
+
|
|
237
|
+
Copy the same skill files to `~/.cursor/skills/`:
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
pkg="$(npm root -g)/neozip-mcp"
|
|
241
|
+
mkdir -p ~/.cursor/skills/neozip-mcp ~/.cursor/skills/neozip-notarization
|
|
242
|
+
cp "$pkg/docs/examples/claude/skills/neozip-mcp/SKILL.md" ~/.cursor/skills/neozip-mcp/
|
|
243
|
+
cp "$pkg/docs/examples/claude/skills/neozip-notarization/SKILL.md" ~/.cursor/skills/neozip-notarization/
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
Always-on Cursor rule (alternative): [`docs/examples/neozip-mcp-cursor-rule.mdc`](../examples/neozip-mcp-cursor-rule.mdc).
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## Troubleshooting
|
|
251
|
+
|
|
252
|
+
| Symptom | What to do |
|
|
253
|
+
|---------|------------|
|
|
254
|
+
| `neozip-mcp`: command not found | Re-run `npm install -g neozip-mcp@beta`; ensure npm global bin is on `PATH` |
|
|
255
|
+
| Server not in `claude mcp list` | Re-run `claude mcp add-json …` with correct `--scope`; validate JSON |
|
|
256
|
+
| Tools not appearing | New Claude Code session; run `/mcp`; check stderr from manual `neozip-mcp` |
|
|
257
|
+
| `Path is outside sandbox` | Add directory to `NEOZIP_MCP_SANDBOX_PATHS` |
|
|
258
|
+
| Tokenize / wallet errors | Run `neozip-connect`; new session; ask agent to run `connect_status` |
|
|
259
|
+
| `mint` / `stamp` missing | Run `neozip-connect`, reload MCP (default `auto` adds blockchain when ready), or set `NEOZIP_MCP_CAPABILITIES=zip,blockchain,readonly` |
|
|
260
|
+
| Duplicate server warnings | Same name in user + project scopes — remove one: `claude mcp remove neozip-mcp` |
|
|
261
|
+
|
|
262
|
+
### Remove and re-add
|
|
263
|
+
|
|
264
|
+
```bash
|
|
265
|
+
claude mcp remove neozip-mcp --scope user
|
|
266
|
+
# or --scope local / --scope project
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
Then repeat setup from section 3 or 4.
|
|
270
|
+
|
|
271
|
+
### Logs
|
|
272
|
+
|
|
273
|
+
- Inside Claude Code: `/mcp`
|
|
274
|
+
- Manual server test: run `neozip-mcp` in a terminal; logs go to stderr with `[neozip-mcp]` prefix
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
## Team projects
|
|
279
|
+
|
|
280
|
+
To share MCP config with teammates via git, use **project scope** and a committed `.mcp.json`. See [INSTALL_CLAUDE_WORKSPACE.md](./INSTALL_CLAUDE_WORKSPACE.md).
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
284
|
+
## Repo developers
|
|
285
|
+
|
|
286
|
+
Contributors building neozip-mcp from source use the repo launcher — not covered in this guide.
|