@nonagon-link/mcp 0.3.0 → 0.3.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.
- package/README.md +27 -16
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @nonagon-link/mcp
|
|
2
2
|
|
|
3
|
-
MCP (Model Context Protocol) server for [NONAGON LINK](https://
|
|
3
|
+
MCP (Model Context Protocol) server for [NONAGON LINK](https://nnglink.ai) — lets AI agents discover paid APIs and pay for them over the [x402 protocol](https://www.x402.org) with **USDC on Solana**, and — when you configure an EVM wallet — with the **official JPYC** on Polygon / Ethereum (**TEST_JPYSC** on Sepolia for testing), and — only when you also set an EVM USDC cap — with **EVM USDC**. A 402 that asks for any other asset, a different network, or a `payTo` outside your allow-list is rejected without signing.
|
|
4
4
|
|
|
5
5
|
## Tools
|
|
6
6
|
|
|
@@ -52,9 +52,9 @@ Use `currency` together with `maxPrice` to set a budget; the tool rejects an unq
|
|
|
52
52
|
| Solana mainnet | Polygon (`eip155:137`), Ethereum (`eip155:1`) | JPYC |
|
|
53
53
|
| Solana devnet | Sepolia (`eip155:11155111`) | TEST_JPYSC (test token) |
|
|
54
54
|
|
|
55
|
-
1. Set `NONAGON_EVM_PRIVATE_KEY` to a **dedicated EVM wallet with a small balance** (`0x` + 64 hex). It is only used to sign typed data (the signer cannot sign transactions).
|
|
56
|
-
2. Set `NONAGON_EVM_PAY_TO` to the NONAGON LINK EVM treasury (
|
|
57
|
-
3. Pass `maxPaymentJpy` to `pay_and_call` (at most 4 decimals). Without it a yen 402 is not signed: the tool returns `PAYMENT_EXCEEDS_LIMIT` with `max: null` and the required amount. The ceiling is 100 by default; raise it with `MCP_MAX_PAYMENT_JPY_CAP` (
|
|
55
|
+
1. Set `NONAGON_EVM_PRIVATE_KEY` to a **dedicated EVM wallet with a small balance** (`0x` + 64 hex). It is only used to sign typed data (the signer cannot sign transactions). It works only when `NONAGON_NETWORK` is Solana mainnet or devnet, which selects the EVM networks in the table above; with any other network the server refuses to start.
|
|
56
|
+
2. Set `NONAGON_EVM_PAY_TO` to the NONAGON LINK EVM treasury (see [NONAGON LINK payees](#nonagon-link-payees) — never copy it from an untrusted 402). Unset = every EVM payment is refused.
|
|
57
|
+
3. Pass `maxPaymentJpy` to `pay_and_call` (at most 4 decimals). Without it a yen 402 is not signed: the tool returns `PAYMENT_EXCEEDS_LIMIT` with `max: null` and the required amount. The ceiling is 100 by default; raise it with `MCP_MAX_PAYMENT_JPY_CAP` (100–1000; below 100 the server does not start). Polygon JPYC listings start at 10 and Ethereum JPYC listings start at 300, so Ethereum ones need a cap of 300 or more.
|
|
58
58
|
|
|
59
59
|
Before signing, the server checks that the 402's network, asset (the pinned JPYC contract), EIP-712 domain, amount range, `exact` + `eip3009` method, `maxTimeoutSeconds` (≤ 300) and `payTo` all match; otherwise it returns `PAYMENT_REQUIREMENT_REJECTED` without signing. Without an EVM wallet a JPYC listing returns `EVM_WALLET_NOT_CONFIGURED`. EVM USDC is covered in [Paying in EVM USDC](#paying-in-evm-usdc).
|
|
60
60
|
|
|
@@ -114,31 +114,42 @@ Add to your MCP client config (e.g. `.claude/settings.json` or `claude_desktop_c
|
|
|
114
114
|
"mcpServers": {
|
|
115
115
|
"nonagon-link": {
|
|
116
116
|
"command": "npx",
|
|
117
|
-
"args": ["-y", "--ignore-scripts", "@nonagon-link/mcp@0.3.
|
|
117
|
+
"args": ["-y", "--ignore-scripts", "@nonagon-link/mcp@0.3.1"],
|
|
118
118
|
"env": {
|
|
119
119
|
"NONAGON_PRIVATE_KEY": "<Base58 Solana secret key>",
|
|
120
120
|
"NONAGON_LINK_BASE_URL": "https://api.nnglink.ai",
|
|
121
|
-
"NONAGON_PAY_TO": "
|
|
121
|
+
"NONAGON_PAY_TO": "8yXpNyyPg9iGdMST8BRyz7HEJVbQG81VP6kHBCKXrdH8"
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
```
|
|
127
127
|
|
|
128
|
-
> **Always pin an exact version** (`@nonagon-link/mcp@0.3.
|
|
128
|
+
> **Always pin an exact version** (`@nonagon-link/mcp@0.3.1`). Never use an unversioned `@nonagon-link/mcp` — your private key is passed to the process environment, so an unpinned install would expose it to whatever the latest published version is. `--ignore-scripts` additionally prevents dependency install scripts from running with your environment.
|
|
129
129
|
>
|
|
130
|
-
> **Set `NONAGON_PAY_TO`** to the NONAGON LINK
|
|
130
|
+
> **Set `NONAGON_PAY_TO`** to the NONAGON LINK Solana platform wallet (see [NONAGON LINK payees](#nonagon-link-payees)) — do not copy `payTo` from an untrusted 402. Unset = every **Solana USDC** payment is refused. EVM payments (JPYC, EVM USDC) are allowed separately by `NONAGON_EVM_PAY_TO`; unset, every EVM payment is refused.
|
|
131
|
+
|
|
132
|
+
### NONAGON LINK payees
|
|
133
|
+
|
|
134
|
+
The `payTo` values NONAGON LINK uses (public: they appear in every 402). Put them in the allow-lists:
|
|
135
|
+
|
|
136
|
+
| Environment | `NONAGON_PAY_TO` (Solana USDC) | `NONAGON_EVM_PAY_TO` (JPYC / EVM USDC) |
|
|
137
|
+
|---|---|---|
|
|
138
|
+
| Production (Solana mainnet; Ethereum / Polygon / Base) | `8yXpNyyPg9iGdMST8BRyz7HEJVbQG81VP6kHBCKXrdH8` | `0x7b689c9b29e5e51700f19d4bb02b382fb418f34d` |
|
|
139
|
+
| Testing (Solana devnet; Sepolia / Amoy / Base Sepolia) | `6JdW8xNvXrghY7acKXzMn2pJoK88g6nnAVU3YNo1YiF8` | `0xcaeb3ef5dcea1557765323379a292fc6b4011831` |
|
|
140
|
+
|
|
141
|
+
The current values are also listed at https://nnglink.ai/docs/mcp.
|
|
131
142
|
|
|
132
143
|
For stricter isolation, install once and reference the binary directly:
|
|
133
144
|
|
|
134
145
|
```bash
|
|
135
|
-
npm install -g @nonagon-link/mcp@0.3.
|
|
146
|
+
npm install -g @nonagon-link/mcp@0.3.1
|
|
136
147
|
```
|
|
137
148
|
|
|
138
149
|
```json
|
|
139
150
|
{
|
|
140
151
|
"mcpServers": {
|
|
141
|
-
"nonagon-link": { "command": "nonagon-mcp", "env": { "NONAGON_PRIVATE_KEY": "...", "NONAGON_PAY_TO": "
|
|
152
|
+
"nonagon-link": { "command": "nonagon-mcp", "env": { "NONAGON_PRIVATE_KEY": "...", "NONAGON_PAY_TO": "8yXpNyyPg9iGdMST8BRyz7HEJVbQG81VP6kHBCKXrdH8" } }
|
|
142
153
|
}
|
|
143
154
|
}
|
|
144
155
|
```
|
|
@@ -149,12 +160,12 @@ npm install -g @nonagon-link/mcp@0.3.0
|
|
|
149
160
|
|---|---|---|
|
|
150
161
|
| `NONAGON_PRIVATE_KEY` | ✅ | Agent's Solana secret key (Base58). Used to sign USDC payments |
|
|
151
162
|
| `NONAGON_NETWORK` | — | CAIP-2 network id. Defaults to Solana mainnet. 402 `network` must match |
|
|
152
|
-
| `NONAGON_PAY_TO` | For `pay_and_call` | Comma-separated Solana addresses allowed as 402 `payTo` (platform wallet). **Unset =
|
|
163
|
+
| `NONAGON_PAY_TO` | For Solana `pay_and_call` | Comma-separated Solana addresses allowed as 402 `payTo` (platform wallet). **Unset = every Solana USDC payment is refused** (EVM payments are governed by `NONAGON_EVM_PAY_TO`) |
|
|
153
164
|
| `NONAGON_USDC_MINT` | — | Override USDC mint **only for unknown `NONAGON_NETWORK`**. Known mainnet/devnet always use the built-in USDC mint |
|
|
154
165
|
| `MCP_MAX_PAYMENT_USDC_CAP` | — | Raise the `maxPaymentUsdc` (Solana USDC) ceiling (0.1–10, decimal notation, at most 6 decimals). Default 0.100. Does not affect EVM USDC |
|
|
155
|
-
| `NONAGON_EVM_PRIVATE_KEY` | For JPYC / EVM USDC / EVM history | EVM wallet key (`0x` + 64 hex) used to sign EVM payments (JPYC; EVM USDC when `MCP_MAX_PAYMENT_EVM_USDC_CAP` is set) and the EIP-712 `AgentChallenge` that reads the EVM wallet's payment history and spending. Unset = Solana USDC only. Validated at startup; the value is never logged or returned |
|
|
156
|
-
| `NONAGON_EVM_PAY_TO` | For JPYC / EVM USDC | Comma-separated EVM addresses allowed as the EVM 402 `payTo` (NONAGON LINK EVM treasury). **Unset =
|
|
157
|
-
| `MCP_MAX_PAYMENT_JPY_CAP` | — | Raise the `maxPaymentJpy` ceiling (100–1000, decimal notation, at most 4 decimals). Default 100 |
|
|
166
|
+
| `NONAGON_EVM_PRIVATE_KEY` | For JPYC / EVM USDC / EVM history | EVM wallet key (`0x` + 64 hex) used to sign EVM payments (JPYC; EVM USDC when `MCP_MAX_PAYMENT_EVM_USDC_CAP` is set) and the EIP-712 `AgentChallenge` that reads the EVM wallet's payment history and spending. Unset = Solana USDC only. Requires `NONAGON_NETWORK` to be Solana mainnet or devnet (otherwise the server refuses to start). Validated at startup; the value is never logged or returned |
|
|
167
|
+
| `NONAGON_EVM_PAY_TO` | For JPYC / EVM USDC | Comma-separated EVM addresses allowed as the EVM 402 `payTo` (NONAGON LINK EVM treasury). **Unset = every EVM payment is refused** (Solana USDC payments are governed by `NONAGON_PAY_TO`) |
|
|
168
|
+
| `MCP_MAX_PAYMENT_JPY_CAP` | — | Raise the `maxPaymentJpy` ceiling (100–1000, decimal notation, at most 4 decimals; below 100 the server does not start). Default 100. Ethereum JPYC listings need 300 or more |
|
|
158
169
|
| `MCP_MAX_PAYMENT_EVM_USDC_CAP` | For EVM USDC | The `maxPaymentEvmUsdc` ceiling and the switch for EVM USDC (range from the pinned USDC prices of the network family — 2–10 today; decimal notation, at most 6 decimals). **Unset = EVM USDC is never paid**. Requires `NONAGON_NETWORK` to be Solana mainnet or devnet |
|
|
159
170
|
| `NONAGON_LINK_BASE_URL` | For `search_listings` / `get_payment_history` / `get_spending` | NONAGON LINK API base URL (e.g. `https://api.nnglink.ai`). `https` only; `http` allowed for `localhost` in local development. `pay_and_call` does not require it |
|
|
160
171
|
| `MCP_AUTH_TOKEN` | HTTP mode only | Bearer token for Streamable HTTP transport (32-byte random, base64url or hex) |
|
|
@@ -174,8 +185,8 @@ npm install -g @nonagon-link/mcp@0.3.0
|
|
|
174
185
|
|
|
175
186
|
## Documentation
|
|
176
187
|
|
|
177
|
-
- Setup & verification guide: https://
|
|
178
|
-
- Agent developer guide: https://
|
|
188
|
+
- Setup & verification guide: https://nnglink.ai/docs/mcp
|
|
189
|
+
- Agent developer guide: https://nnglink.ai/docs/agent
|
|
179
190
|
|
|
180
191
|
## License
|
|
181
192
|
|