carpool-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/LICENSE +21 -0
- package/README.md +94 -0
- package/dist/cli.js +1214 -0
- package/dist/consent.js +49 -0
- package/hooks/pre-publish.mjs +74 -0
- package/package.json +42 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Carpool contributors
|
|
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,94 @@
|
|
|
1
|
+
# carpool-mcp
|
|
2
|
+
|
|
3
|
+
The MCP server for [Carpool](https://carpool-dashboard-plum.vercel.app): before your agent spends
|
|
4
|
+
dollars on deep research, it searches for research someone already did, and buys it for a fraction
|
|
5
|
+
of the cost over x402 on Hedera. Authors earn a royalty on every sale.
|
|
6
|
+
|
|
7
|
+
Four tools:
|
|
8
|
+
|
|
9
|
+
- `carpool_search(question)`: free. Call it before starting deep research.
|
|
10
|
+
- `carpool_fetch(magnet)`: pays, verifies the body against the manifest hash, writes it to a file.
|
|
11
|
+
- `carpool_publish(...)`: lists research you already did. Asks for approval every time.
|
|
12
|
+
- `carpool_delist(magnet)`: withdraws something you published from sale.
|
|
13
|
+
|
|
14
|
+
Requires Node 20.19 or newer.
|
|
15
|
+
|
|
16
|
+
## Install in Claude Code
|
|
17
|
+
|
|
18
|
+
Search only (no keys, nothing is paid):
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
claude mcp add carpool \
|
|
22
|
+
-e CARPOOL_REGISTRY_URL=https://carpool-registry-production.up.railway.app \
|
|
23
|
+
-- npx -y carpool-mcp
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Buyer (a funded Hedera testnet ECDSA account holding test USDC):
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
claude mcp add carpool \
|
|
30
|
+
-e CARPOOL_REGISTRY_URL=https://carpool-registry-production.up.railway.app \
|
|
31
|
+
-e CARPOOL_BUYER_ACCOUNT_ID=0.0.xxxxx \
|
|
32
|
+
-e CARPOOL_BUYER_PRIVATE_KEY=<testnet ECDSA key> \
|
|
33
|
+
-- npx -y carpool-mcp
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Author (royalties are paid to this account):
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
claude mcp add carpool \
|
|
40
|
+
-e CARPOOL_REGISTRY_URL=https://carpool-registry-production.up.railway.app \
|
|
41
|
+
-e CARPOOL_AUTHOR_ACCOUNT_ID=0.0.xxxxx \
|
|
42
|
+
-e CARPOOL_AUTHOR_PRIVATE_KEY=<testnet ECDSA key> \
|
|
43
|
+
-- npx -y carpool-mcp
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Associate your account with test USDC
|
|
47
|
+
|
|
48
|
+
An account must be associated with the USDC token before it can receive a royalty or faucet USDC.
|
|
49
|
+
The key is read from the environment only, never from arguments, and is never printed:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
HEDERA_ACCOUNT_ID=0.0.xxxxx HEDERA_PRIVATE_KEY=<testnet ECDSA key> npx carpool-mcp associate
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
It checks the account on the mirror node first, and refuses ED25519 keys: the x402 Hedera signer
|
|
56
|
+
needs ECDSA. Create an ECDSA testnet account at portal.hedera.com.
|
|
57
|
+
|
|
58
|
+
## Consent hook for publishing
|
|
59
|
+
|
|
60
|
+
An MCP server cannot tell it is running inside a subagent, so the client enforces it. Add this
|
|
61
|
+
PreToolUse hook to your Claude Code settings. It denies subagents, non-prompting permission modes
|
|
62
|
+
and `CARPOOL_PUBLISH_MODE=off`, otherwise asks. It fails closed.
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
"hooks": {
|
|
66
|
+
"PreToolUse": [{
|
|
67
|
+
"matcher": "mcp__carpool__carpool_publish",
|
|
68
|
+
"hooks": [{ "type": "command", "command": "npx -y carpool-mcp consent-hook" }]
|
|
69
|
+
}]
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Keys: a caution
|
|
74
|
+
|
|
75
|
+
Values passed with `claude mcp add -e` are stored in plaintext in Claude Code's configuration.
|
|
76
|
+
Use testnet-only keys that hold nothing you would mind losing.
|
|
77
|
+
|
|
78
|
+
## Privacy of searches
|
|
79
|
+
|
|
80
|
+
This package does not ship the optional local embedder (about 240 MB of ONNX). Searches therefore
|
|
81
|
+
send your question text to the registry, which can read and log it, and every search result says so.
|
|
82
|
+
|
|
83
|
+
## Other settings
|
|
84
|
+
|
|
85
|
+
- `CARPOOL_ARTIFACT_DIR`: where bought artifacts are written (default: a folder in your temp dir).
|
|
86
|
+
- `CARPOOL_MAX_MICRO_USDC`: per-payment spend cap in micro-USDC (default 500000, $0.50).
|
|
87
|
+
- `CARPOOL_AUTHOR_ENS_NAME`: publish under an ENS name.
|
|
88
|
+
|
|
89
|
+
## Links
|
|
90
|
+
|
|
91
|
+
- Live site: https://carpool-dashboard-plum.vercel.app
|
|
92
|
+
- Source, and the contributor setup: https://github.com/RomarioKavin1/carpool
|
|
93
|
+
|
|
94
|
+
MIT licensed.
|