@ton/mcp 0.1.15-alpha.13 → 0.1.15-alpha.15

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 CHANGED
@@ -9,6 +9,7 @@ A Model Context Protocol (MCP) server for TON blockchain wallet operations. Buil
9
9
  - **Swaps**: Get quotes for token swaps via DEX aggregators.
10
10
  - **NFTs**: List, inspect, and transfer NFTs.
11
11
  - **DNS**: Resolve TON DNS-compatible domains and reverse-lookup addresses.
12
+ - **TonProof Authentication**: Generate signed TonConnect proof-of-ownership payloads for third-party services.
12
13
  - **Known Jettons**: Built-in directory of popular tokens.
13
14
  - **Agentic Wallets**: Manage agentic wallets. Create, import, or manage your agentic wallets.
14
15
  - **Multiple Transports**: Stdio (default), multi-session HTTP server, and serverless modes.
@@ -26,6 +27,8 @@ Choose one control path per task: either run `@ton/mcp` as an MCP server (stdio
26
27
 
27
28
  Self-custody wallets for autonomous agents. Your AI agent gets TON wallet capabilities — transfers, swaps, NFTs. User keeps the master key, agent keeps the operator key.
28
29
 
30
+ Key storage in this mode: wallet secrets are persisted inside the local config registry at `TON_CONFIG_PATH` or `~/.config/ton/config.json`. The config directory is created with `0700` permissions and the config file with `0600` permissions. The file is not stored as plain text, but the current protected-file format is only obfuscation-in-file, not real cryptographic protection with an external secret or password.
31
+
29
32
  **Learn more about [Agentic Wallets](https://agents.ton.org/).**
30
33
 
31
34
  Agentic Wallets mode is the default mode that allows you to manage agentic wallets. To create your first agentic wallet, ask your agent to `create agentic wallet` and follow the instructions.
@@ -48,6 +51,8 @@ TON_CONFIG_PATH=/path/to/config.json npx @ton/mcp@alpha
48
51
 
49
52
  Single-wallet mode is a mode where the server starts with one in-memory wallet. This mode is useful when you want to manage a single wallet or when you want to use the server for a one-off task.
50
53
 
54
+ Key storage in this mode: `MNEMONIC` / `PRIVATE_KEY` are read from environment variables and used only in memory for the current process; `@ton/mcp` does not persist them to disk in this mode. The values come in as plain environment variables, so any non-plain-text storage or encryption is the responsibility of the caller or host environment, not `@ton/mcp`.
55
+
51
56
  ```bash
52
57
  # Run as stdio MCP server with mnemonic
53
58
  MNEMONIC="word1 word2 ..." npx @ton/mcp@alpha
@@ -194,7 +199,7 @@ List Jettons held by any address with balances and metadata.
194
199
  Get metadata for a Jetton master contract.
195
200
 
196
201
  **Parameters:**
197
- - `address` (required): Jetton master contract address
202
+ - `jettonAddress` (required): Jetton master contract address
198
203
 
199
204
  #### `get_transactions`
200
205
  Get recent transaction history for the wallet (TON transfers, Jetton transfers, swaps, etc.).
@@ -241,6 +246,13 @@ Send a raw transaction with full control over messages. Supports multiple messag
241
246
  - `validUntil` (optional): Unix timestamp after which the transaction becomes invalid
242
247
  - `fromAddress` (optional): Sender wallet address
243
248
 
249
+ #### `emulate_transaction`
250
+ Dry-run a raw transaction without broadcasting it. Accepts the same `messages` format as `send_raw_transaction` and returns the expected TON and Jetton balance changes, fees, and high-level actions so agents can verify a transaction before sending.
251
+
252
+ **Parameters:**
253
+ - `messages` (required): Array of messages, each with `address`, `amount` in nanotons, and optional `stateInit` / `payload`
254
+ - `validUntil` (optional): Unix timestamp after which the transaction becomes invalid
255
+
244
256
  ### Swaps
245
257
 
246
258
  #### `get_swap_quote`
@@ -297,6 +309,19 @@ Reverse-resolve a TON wallet address to its associated DNS domain when available
297
309
  **Parameters:**
298
310
  - `address` (required): TON wallet address to reverse resolve
299
311
 
312
+ ### Authentication
313
+
314
+ #### `generate_ton_proof`
315
+ Generate a signed TonConnect proof-of-ownership payload for the active wallet. Use it to authenticate with third-party services that accept TonProof, such as APIs that ask for a domain and challenge payload.
316
+
317
+ **Parameters:**
318
+ - `domain` (required): Domain to generate the proof for (for example, `"getgems.io"`)
319
+ - `payload` (required): Challenge or payload string provided by the verifying service
320
+
321
+ **Returns:** Address, chain id, wallet state init, public key, timestamp, domain, payload, and base64 signature ready to submit to the verifying service.
322
+
323
+ TonProof does not broadcast a transaction, but it does require signing access to the selected wallet. Imported read-only agentic wallets need operator key rotation completed before this tool can generate a proof.
324
+
300
325
  ### Utility
301
326
 
302
327
  #### `get_known_jettons`
package/USAGE_EXAMPLES.md CHANGED
@@ -164,6 +164,24 @@ npx @ton/mcp@alpha get_known_jettons
164
164
 
165
165
  > `USDT` was found in the list of known jettons with master contract address `EQ...`. That address can be used with `send_jetton` or `get_swap_quote`.
166
166
 
167
+ ## TON Proof Authentication
168
+
169
+ ### Generate a TonProof for a service challenge
170
+
171
+ **User request**
172
+
173
+ `Generate a TonProof for getgems.io using payload getgems-llm`
174
+
175
+ **Approximate command list**
176
+
177
+ ```bash
178
+ npx @ton/mcp@alpha generate_ton_proof --domain getgems.io --payload getgems-llm
179
+ ```
180
+
181
+ **Approximate agent response**
182
+
183
+ > A signed TonProof was generated for `getgems.io`. The proof includes the wallet address, chain id, wallet state init, public key, timestamp, domain, payload, and signature needed by the verifying service.
184
+
167
185
  ## Transfers and Swaps
168
186
 
169
187
  ### Send TON to a TON DNS name