@ton/mcp 0.1.15-alpha.0 → 0.1.15-alpha.2

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.
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Copyright (c) TonTech.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+ type JsonSchema = {
9
+ type?: string | string[];
10
+ enum?: unknown[];
11
+ properties?: Record<string, JsonSchema>;
12
+ items?: JsonSchema;
13
+ additionalProperties?: boolean | JsonSchema;
14
+ anyOf?: JsonSchema[];
15
+ oneOf?: JsonSchema[];
16
+ };
17
+ export declare function parseCliArgs(args: string[], schema?: JsonSchema): Record<string, unknown>;
18
+ export {};
19
+ //# sourceMappingURL=cli-args.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-args.d.ts","sourceRoot":"","sources":["../../src/utils/cli-args.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,KAAK,UAAU,GAAG;IACd,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACzB,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACxC,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,oBAAoB,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IAC5C,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;CACxB,CAAC;AA6EF,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,MAAM,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAwBzF"}
package/llms.txt CHANGED
@@ -111,14 +111,6 @@ Parameters:
111
111
  - fromAddress (optional): sender address
112
112
  Returns: top-level normalizedHash plus details
113
113
 
114
- ### agentic_deploy_subwallet
115
- Deploy a new Agentic sub-wallet from a user-root Agentic wallet.
116
- Parameters:
117
- - operatorPublicKey (required): new sub-wallet operator public key (`uint256`, decimal or `0x`-hex)
118
- - metadata (required): onchain NFT metadata in TEP-64 format with mandatory `name`
119
- - amountTon (optional): attached TON amount, default `"0.05"`
120
- Returns: normalizedHash, deployed sub-wallet address, sub-wallet NFT index
121
-
122
114
  ### get_swap_quote
123
115
  Get quote for token swap.
124
116
  Parameters:
@@ -184,6 +176,26 @@ Parameters:
184
176
  - network (optional): mainnet or testnet
185
177
  - name (optional): wallet display name
186
178
 
179
+ ### agentic_rotate_operator_key
180
+ Registry mode only. Start agentic operator key rotation, persist a pending draft, and return a dashboard URL for the on-chain change.
181
+ Parameters:
182
+ - walletSelector (optional): wallet id, name, or address. Uses the active wallet when omitted
183
+
184
+ ### agentic_get_pending_operator_key_rotation
185
+ Registry mode only. Read one pending operator key rotation.
186
+ Parameters:
187
+ - rotationId (required): pending rotation identifier
188
+
189
+ ### agentic_complete_rotate_operator_key
190
+ Registry mode only. Complete an agentic operator key rotation after the dashboard transaction lands on chain, then update the stored operator key locally.
191
+ Parameters:
192
+ - rotationId (required): pending rotation identifier
193
+
194
+ ### agentic_cancel_rotate_operator_key
195
+ Registry mode only. Cancel a pending operator key rotation and discard its stored replacement key.
196
+ Parameters:
197
+ - rotationId (required): pending rotation identifier
198
+
187
199
  ### agentic_start_root_wallet_setup
188
200
  Registry mode only. Start first root-agent setup, generate operator keys, persist a pending draft, and return a dashboard URL.
189
201
  Parameters:
@@ -244,6 +256,12 @@ Parameters:
244
256
  3. If the wallet needs write access and no pending draft was recovered, use agentic_rotate_operator_key and then agentic_complete_rotate_operator_key
245
257
  4. Only then use write tools for that wallet
246
258
 
259
+ ### Rotating an Agentic Operator Key
260
+ 1. agentic_rotate_operator_key to create a pending rotation and get the dashboard URL
261
+ 2. Optionally inspect progress with agentic_get_pending_operator_key_rotation or agentic_list_pending_operator_key_rotations
262
+ 3. agentic_complete_rotate_operator_key after the on-chain change is confirmed
263
+ 4. agentic_cancel_rotate_operator_key if the pending rotation should be discarded
264
+
247
265
  ### Setting Up the First Agentic Root Wallet
248
266
  1. agentic_start_root_wallet_setup
249
267
  2. Tell the user to open the returned dashboard URL and create the wallet from their main wallet
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@ton/mcp",
3
- "version": "0.1.15-alpha.0",
3
+ "version": "0.1.15-alpha.2",
4
4
  "description": "TON MCP Server - Model Context Protocol server for TON blockchain wallet operations",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "main": "dist/index.cjs",
8
8
  "module": "dist/index.js",
9
9
  "types": "dist/index.d.ts",
10
- "bin": "./dist/cli.js",
10
+ "bin": "./bin/mcp.js",
11
11
  "exports": {
12
12
  ".": {
13
13
  "import": {
@@ -34,6 +34,7 @@
34
34
  "access": "public"
35
35
  },
36
36
  "files": [
37
+ "bin",
37
38
  "dist",
38
39
  "skills",
39
40
  "llms.txt",
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: ton-balance
3
+ description: Check TON wallet balances, token holdings, and transaction history. Use when the user wants to check their balance, see how much TON they have, list tokens, view jettons, check transaction history, look up a token, or verify a transaction status.
4
+ user-invocable: true
5
+ disable-model-invocation: false
6
+ ---
7
+
8
+ # TON Balance & Transaction Queries
9
+
10
+ Read-only queries for wallet balances, token holdings, and transaction history on TON.
11
+
12
+ ## MCP Tools
13
+
14
+ | Tool | Required | Optional |
15
+ | ---- | -------- | -------- |
16
+ | `get_wallet` | — | `walletSelector` |
17
+ | `get_balance` | — | `walletSelector` |
18
+ | `get_balance_by_address` | `address` | — |
19
+ | `get_jetton_balance` | `jettonAddress` | `walletSelector` |
20
+ | `get_jettons` | — | `walletSelector` |
21
+ | `get_jettons_by_address` | `address` | — |
22
+ | `get_jetton_info` | `address` | — |
23
+ | `get_known_jettons` | — | — |
24
+ | `get_transactions` | — | `limit`, `walletSelector` |
25
+ | `get_transaction_status` | `normalizedHash` | `walletSelector` |
26
+
27
+ ## Workflows
28
+
29
+ ### Check Balance
30
+ 1. Call `get_wallet` for address and network info
31
+ 2. Call `get_balance` for TON balance
32
+ 3. Call `get_jettons` for all token holdings
33
+
34
+ ### Check Specific Token
35
+ 1. If user mentions a token by name, call `get_known_jettons` to find its address
36
+ 2. Call `get_jetton_balance` with the `jettonAddress`
37
+
38
+ ### View Transaction History
39
+ 1. Call `get_transactions` with an optional `limit` (default varies)
40
+
41
+ ### Verify a Sent Transaction
42
+ 1. Call `get_transaction_status` with the `normalizedHash` returned by a send/swap operation
43
+
44
+ ## Notes
45
+
46
+ - All tools are read-only — no confirmation needed
47
+ - In registry mode, pass `walletSelector` to query a specific wallet instead of the active one
48
+ - Amounts are returned in human-readable format (e.g., "1.5" = 1.5 TON)
@@ -0,0 +1,157 @@
1
+ ---
2
+ name: ton-cli
3
+ description: Call TON MCP tools directly from the command line. Use when you want to query wallet info, check balances, send transactions, or run any TON wallet tool without starting an MCP server session. Works via `npx @ton/mcp@alpha <tool_name> [--arg value ...]`.
4
+ user-invocable: true
5
+ disable-model-invocation: false
6
+ allowed-tools: ["Bash(npx @ton/mcp@alpha *)"]
7
+ ---
8
+
9
+ # TON MCP Raw CLI Mode
10
+
11
+ Run any TON wallet MCP tool directly from the command line. The binary invokes the tool, prints the JSON result to stdout, and exits.
12
+
13
+ ## Invocation Modes
14
+
15
+ | Command | Description |
16
+ | ------- | ----------- |
17
+ | `npx @ton/mcp@alpha` | stdio MCP server (for Claude Desktop / MCP clients) |
18
+ | `npx @ton/mcp@alpha --http [port]` | HTTP MCP server |
19
+ | `npx @ton/mcp@alpha <tool_name> [--arg value ...]` | **Raw CLI: call one tool and exit** |
20
+
21
+ ## Raw CLI Usage
22
+
23
+ ```bash
24
+ # No arguments
25
+ npx @ton/mcp@alpha get_balance
26
+
27
+ # Named arguments (--key value)
28
+ npx @ton/mcp@alpha get_transactions --limit 5
29
+ npx @ton/mcp@alpha get_jetton_balance --jettonAddress EQAbc...
30
+
31
+ # All values are passed as plain strings; JSON objects/arrays are also accepted
32
+ npx @ton/mcp@alpha get_transactions --limit 10
33
+ npx @ton/mcp@alpha send_ton --toAddress UQA... --amount 0.1 --comment "hi"
34
+ ```
35
+
36
+ Arguments are passed as `--key value` pairs. Objects/arrays (`{...}` / `[...]`) are JSON-parsed; everything else is kept as a plain string.
37
+
38
+ ## Output
39
+
40
+ All tools print JSON to **stdout**. Errors are printed to **stderr** and the process exits with code `1`.
41
+
42
+ ```bash
43
+ # Capture output for scripting
44
+ BALANCE=$(npx @ton/mcp@alpha get_balance)
45
+ echo $BALANCE | jq '.balance'
46
+ ```
47
+
48
+ ## Environment Variables
49
+
50
+ The CLI respects the same environment variables as the server:
51
+
52
+ | Variable | Description |
53
+ | -------- | ----------- |
54
+ | `NETWORK` | `mainnet` (default) or `testnet` |
55
+ | `MNEMONIC` | 24-word mnemonic for single-wallet mode |
56
+ | `PRIVATE_KEY` | Hex-encoded private key (alternative to mnemonic) |
57
+ | `WALLET_VERSION` | `v5r1` (default), `v4r2`, or `agentic` |
58
+ | `TONCENTER_API_KEY` | Optional Toncenter API key |
59
+ | `TON_CONFIG_PATH` | Path to config file (default: `~/.config/ton/config.json`) |
60
+
61
+ Without `MNEMONIC` or `PRIVATE_KEY`, the CLI uses the local config registry at `~/.config/ton/config.json` (registry mode). In registry mode, wallet-scoped tools accept an optional `--walletSelector` to target a specific wallet by id, name, or address.
62
+
63
+ ## Tool Reference
64
+
65
+ ### Wallet & Balance
66
+
67
+ | Tool | Required args | Optional args |
68
+ | ---- | ------------- | ------------- |
69
+ | `get_wallet` | — | `--walletSelector` |
70
+ | `get_balance` | — | `--walletSelector` |
71
+ | `get_balance_by_address` | `--address` | — |
72
+ | `get_jetton_balance` | `--jettonAddress` | `--walletSelector` |
73
+ | `get_jettons` | — | `--walletSelector` |
74
+ | `get_jettons_by_address` | `--address` | — |
75
+ | `get_jetton_info` | `--jettonAddress` | — |
76
+ | `get_transactions` | — | `--limit`, `--walletSelector` |
77
+ | `get_transaction_status` | `--normalizedHash` | `--walletSelector` |
78
+ | `get_known_jettons` | — | — |
79
+
80
+ ### Wallet Registry (config-registry mode only)
81
+
82
+ | Tool | Required args | Optional args |
83
+ | ---- | ------------- | ------------- |
84
+ | `list_wallets` | — | — |
85
+ | `get_current_wallet` | — | — |
86
+ | `set_active_wallet` | `--walletSelector` | — |
87
+ | `remove_wallet` | `--walletSelector` | — |
88
+
89
+ ### Transfers
90
+
91
+ | Tool | Required args | Optional args |
92
+ | ---- | ------------- | ------------- |
93
+ | `send_ton` | `--toAddress`, `--amount` | `--comment`, `--walletSelector` |
94
+ | `send_jetton` | `--toAddress`, `--jettonAddress`, `--amount` | `--comment`, `--walletSelector` |
95
+ | `send_nft` | `--nftAddress`, `--toAddress` | `--comment`, `--walletSelector` |
96
+ | `send_raw_transaction` | `--messages` | `--walletSelector` |
97
+
98
+ ### Swaps
99
+
100
+ | Tool | Required args | Optional args |
101
+ | ---- | ------------- | ------------- |
102
+ | `get_swap_quote` | `--fromToken`, `--toToken`, `--amount` | `--walletSelector` |
103
+
104
+ ### NFTs
105
+
106
+ | Tool | Required args | Optional args |
107
+ | ---- | ------------- | ------------- |
108
+ | `get_nfts` | — | `--limit`, `--offset`, `--walletSelector` |
109
+ | `get_nfts_by_address` | `--address` | `--limit`, `--offset` |
110
+ | `get_nft` | `--nftAddress` | — |
111
+
112
+ ### DNS
113
+
114
+ | Tool | Required args |
115
+ | ---- | ------------- |
116
+ | `resolve_dns` | `--domain` |
117
+ | `back_resolve_dns` | `--address` |
118
+
119
+ ## Example Session
120
+
121
+ ```bash
122
+ # Check wallet address and network
123
+ npx @ton/mcp@alpha get_wallet
124
+
125
+ # Check TON balance
126
+ npx @ton/mcp@alpha get_balance
127
+
128
+ # List all tokens
129
+ npx @ton/mcp@alpha get_jettons
130
+
131
+ # Last 10 transactions
132
+ npx @ton/mcp@alpha get_transactions --limit 10
133
+
134
+ # Get balance of a specific jetton
135
+ npx @ton/mcp@alpha get_jetton_balance --address EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs
136
+
137
+ # Resolve a .ton domain
138
+ npx @ton/mcp@alpha resolve_dns --domain foundation.ton
139
+
140
+ # In registry mode: check balances for a named wallet
141
+ npx @ton/mcp@alpha get_balance --walletSelector "my-hot-wallet"
142
+
143
+ # In registry mode: list all registered wallets
144
+ npx @ton/mcp@alpha list_wallets
145
+
146
+ # Send TON (always confirm with user first)
147
+ npx @ton/mcp@alpha send_ton --toAddress UQA... --amount 0.5 --comment "payment"
148
+
149
+ # Swap quote
150
+ npx @ton/mcp@alpha get_swap_quote --fromToken TON --toToken EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs --amount 1
151
+ ```
152
+
153
+ ## Notes
154
+
155
+ - Always confirm with the user before running `send_ton`, `send_jetton`, `send_nft`, or `send_raw_transaction`.
156
+ - After sending, poll `get_transaction_status --normalizedHash <hash>` until status is `completed` or `failed` (unless the user asks to skip).
157
+ - In registry mode the active wallet from `~/.config/ton/config.json` is used by default.
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: ton-create-wallet
3
+ description: Create and deploy a TON agentic wallet. Use when the user wants to create a wallet, set up an agent wallet, deploy an agentic wallet, onboard a new wallet, or when any wallet operation fails because no wallet is configured. This skill is a prerequisite before sending, swapping, or managing assets.
4
+ user-invocable: true
5
+ disable-model-invocation: false
6
+ ---
7
+
8
+ # Create TON Agentic Wallet
9
+
10
+ Deploy an on-chain agentic wallet on TON. The agent generates operator keys, the user deploys the wallet contract from the dashboard, then provides the wallet address to complete setup.
11
+
12
+ ## MCP Tools
13
+
14
+ | Tool | Description |
15
+ | ---- | ----------- |
16
+ | `agentic_start_root_wallet_setup` | Generate operator keys, create pending setup, return dashboard URL |
17
+ | `agentic_list_pending_root_wallet_setups` | List pending setup drafts and their callback status |
18
+ | `agentic_get_root_wallet_setup` | Read one pending setup by `setupId` |
19
+ | `agentic_complete_root_wallet_setup` | Finish onboarding from callback or manual wallet address |
20
+ | `agentic_cancel_root_wallet_setup` | Cancel a pending setup |
21
+
22
+ ### Tool Parameters
23
+
24
+ | Tool | Required | Optional |
25
+ | ---- | -------- | -------- |
26
+ | `agentic_start_root_wallet_setup` | — | `network`, `name`, `source`, `collectionAddress`, `tonDeposit` |
27
+ | `agentic_get_root_wallet_setup` | `setupId` | — |
28
+ | `agentic_complete_root_wallet_setup` | `setupId` | `walletAddress`, `ownerAddress` |
29
+ | `agentic_cancel_root_wallet_setup` | `setupId` | — |
30
+
31
+ ## Workflow
32
+
33
+ 1. Call `agentic_start_root_wallet_setup` — this generates an operator key pair and returns a `setupId` and `dashboardUrl`
34
+ 2. Show the `dashboardUrl` to the user and tell them to open it, deploy the wallet from their TON wallet, and then come back with the deployed wallet address
35
+ 3. **Ask the user for the wallet address** — in CLI/stdio mode there is no callback, so the agent must ask the user to paste the wallet address after they finish deployment on the dashboard
36
+ 4. Call `agentic_complete_root_wallet_setup` with the `setupId` and the `walletAddress` provided by the user
37
+ 5. Confirm the wallet is active with `get_current_wallet` or `list_wallets` (see `ton-manage-wallets` skill)
38
+
39
+ ## How It Works
40
+
41
+ - The agent keeps the **operator private key** — it can sign transactions autonomously
42
+ - The user keeps the **owner key** — they can withdraw funds or revoke access at any time
43
+ - The wallet is an on-chain smart contract (NFT-based), not a custodial service
44
+ - The dashboard is at `agentic-wallets-dashboard.vercel.app`
45
+
46
+ ## Environment Variables
47
+
48
+ | Variable | Description |
49
+ | -------- | ----------- |
50
+ | `NETWORK` | `mainnet` (default) or `testnet` |
51
+ | `AGENTIC_CALLBACK_BASE_URL` | Public URL for the onboarding callback (auto in HTTP mode) |
52
+ | `AGENTIC_CALLBACK_PORT` | Port for the callback server |
53
+
54
+ ## Notes
55
+
56
+ - In CLI/stdio mode there is no callback — always ask the user for the wallet address after showing the dashboard URL
57
+ - Do **not** poll for callback status in CLI mode; just wait for the user to provide the address
58
+ - After wallet creation, fund the wallet with TON before using transfer or swap skills
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: ton-manage-wallets
3
+ description: Manage multiple TON wallets, import agentic wallets and rotate operator keys. Use when the user wants to switch wallets, list wallets, import an existing wallet, rotate an operator key, or manage their wallet registry.
4
+ user-invocable: true
5
+ disable-model-invocation: false
6
+ ---
7
+
8
+ # TON Wallet Management
9
+
10
+ Manage the local wallet registry and perform advanced agentic wallet operations including import and key rotation.
11
+
12
+ ## MCP Tools
13
+
14
+ ### Wallet Registry
15
+
16
+ | Tool | Required | Optional |
17
+ | ---- | -------- | -------- |
18
+ | `list_wallets` | — | — |
19
+ | `get_current_wallet` | — | — |
20
+ | `set_active_wallet` | `walletSelector` | — |
21
+ | `remove_wallet` | `walletSelector` | — |
22
+
23
+ ### Agentic Wallet Management
24
+
25
+ | Tool | Required | Optional |
26
+ | ---- | -------- | -------- |
27
+ | `agentic_validate_wallet` | `address` | `network`, `ownerAddress`, `collectionAddress` |
28
+ | `agentic_list_wallets_by_owner` | `ownerAddress` | `network` |
29
+ | `agentic_import_wallet` | `address` | `name` |
30
+ | `agentic_rotate_operator_key` | `walletSelector` | — |
31
+ | `agentic_complete_rotate_operator_key` | `rotationId` | — |
32
+
33
+ ## Workflows
34
+
35
+ ### Switch Active Wallet
36
+ 1. Call `list_wallets` to see all stored wallets
37
+ 2. Call `set_active_wallet` with a `walletSelector` (id, name, or address)
38
+ 3. Confirm with `get_current_wallet`
39
+
40
+ ### Import Existing Agentic Wallet
41
+ 1. Call `agentic_validate_wallet` to verify the wallet address and contract
42
+ 2. Call `agentic_import_wallet` to add it to the registry
43
+ 3. If the agent needs to sign transactions and no operator key is available, call `agentic_rotate_operator_key` and then `agentic_complete_rotate_operator_key` after the user applies the key change on-chain via the dashboard
44
+
45
+ ### Rotate Operator Key
46
+ 1. Call `agentic_rotate_operator_key` — generates a new key pair and returns a dashboard URL for the user to apply the change on-chain
47
+ 2. Tell the user to open the dashboard link and confirm the key change
48
+ 3. Call `agentic_complete_rotate_operator_key` with the `rotationId` once the on-chain change is confirmed
49
+
50
+ ## Notes
51
+
52
+ - `walletSelector` accepts wallet id, name, or address
53
+ - For one-off queries, pass `walletSelector` directly to wallet-scoped tools instead of changing the active wallet
54
+ - Registry data is stored in `~/.config/ton/config.json` (or `TON_CONFIG_PATH`)
55
+ - Read tools work with imported agentic wallets that don't yet have an `operator_private_key`; write tools require it
56
+ - Management tool responses never expose private keys, mnemonics, or API keys
57
+ - To create a brand new agentic wallet, use the `ton-create-wallet` skill instead
@@ -0,0 +1,39 @@
1
+ ---
2
+ name: ton-nfts
3
+ description: View and transfer NFTs on the TON blockchain. Use when the user wants to see their NFTs, list collectibles, check NFT details, send an NFT, or transfer an NFT to someone.
4
+ user-invocable: true
5
+ disable-model-invocation: false
6
+ ---
7
+
8
+ # TON NFT Operations
9
+
10
+ View and transfer NFTs on the TON blockchain.
11
+
12
+ ## MCP Tools
13
+
14
+ | Tool | Required | Optional |
15
+ | ---- | -------- | -------- |
16
+ | `get_nfts` | — | `limit`, `offset`, `walletSelector` |
17
+ | `get_nfts_by_address` | `address` | `limit`, `offset` |
18
+ | `get_nft` | `nftAddress` | — |
19
+ | `send_nft` | `nftAddress`, `toAddress` | `comment`, `walletSelector` |
20
+
21
+ ## Workflows
22
+
23
+ ### List My NFTs
24
+ 1. Call `get_nfts` to list NFTs in the active wallet
25
+ 2. Use `limit` and `offset` for pagination
26
+
27
+ ### View NFT Details
28
+ 1. Call `get_nft` with the `nftAddress`
29
+
30
+ ### Send an NFT
31
+ 1. Call `get_nfts` to find the NFT address if the user doesn't have it
32
+ 2. Confirm the transfer with the user
33
+ 3. Call `send_nft` with `nftAddress` and `toAddress`
34
+ 4. Poll `get_transaction_status` with the returned `normalizedHash` until status is `completed` or `failed` (see `ton-balance` skill)
35
+
36
+ ## Notes
37
+
38
+ - Always confirm with the user before transferring an NFT
39
+ - If no wallet is configured, use the `ton-create-wallet` skill first
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: ton-send
3
+ description: Send TON or jettons (tokens) to an address or TON DNS domain. Use when the user wants to send TON, transfer tokens, send jettons, pay someone, send funds to a .ton or .t.me domain, or transfer assets on the TON blockchain.
4
+ user-invocable: true
5
+ disable-model-invocation: false
6
+ ---
7
+
8
+ # Send TON & Tokens
9
+
10
+ Transfer TON or jettons to any address. Supports TON DNS resolution for `.ton` and `.t.me` domains.
11
+
12
+ ## MCP Tools
13
+
14
+ | Tool | Required | Optional |
15
+ | ---- | -------- | -------- |
16
+ | `send_ton` | `toAddress`, `amount` | `comment`, `walletSelector` |
17
+ | `send_jetton` | `toAddress`, `jettonAddress`, `amount` | `comment`, `walletSelector` |
18
+ | `resolve_dns` | `domain` | — |
19
+ | `back_resolve_dns` | `address` | — |
20
+
21
+ ## Workflows
22
+
23
+ ### Send TON
24
+ 1. If the user provides a DNS name (e.g., `foundation.ton`, `user.t.me`) instead of a raw address, call `resolve_dns` first
25
+ 2. Confirm the amount and recipient with the user
26
+ 3. Call `send_ton` with address and amount
27
+ 4. Poll `get_transaction_status` with the returned `normalizedHash` until status is `completed` or `failed` (see `ton-balance` skill). User can ask to skip polling.
28
+
29
+ ### Send Jetton (Token)
30
+ 1. If user mentions a token by name, call `get_known_jettons` (see `ton-balance` skill) to find the `jettonAddress`
31
+ 2. Call `get_jetton_balance` to verify sufficient balance
32
+ 3. Confirm with the user
33
+ 4. Call `send_jetton` with the `jettonAddress`, `toAddress`, and `amount`
34
+ 5. Poll `get_transaction_status` until completed or failed
35
+
36
+ ## Notes
37
+
38
+ - Amounts are human-readable (e.g., `"1.5"` = 1.5 TON, `"100"` = 100 tokens)
39
+ - Always confirm with the user before executing a transfer
40
+ - After sending, poll `get_transaction_status` by default. User can specify whether to check status.
41
+ - If no wallet is configured, use the `ton-create-wallet` skill first
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: ton-swap
3
+ description: Swap or trade tokens on the TON blockchain via DEX. Use when the user wants to swap, trade, exchange, convert, buy, or sell tokens like TON, USDT, jUSDC, or any jetton. Covers phrases like "swap TON for USDT", "trade tokens", "buy USDT", "exchange jettons".
4
+ user-invocable: true
5
+ disable-model-invocation: false
6
+ ---
7
+
8
+ # Swap TON Tokens
9
+
10
+ Swap tokens on TON via DEX aggregator. Two-step flow: get a quote, confirm with the user, then execute.
11
+
12
+ ## MCP Tools
13
+
14
+ | Tool | Required | Optional |
15
+ | ---- | -------- | -------- |
16
+ | `get_swap_quote` | `fromToken`, `toToken`, `amount` | `walletSelector` |
17
+ | `send_raw_transaction` | `messages` | `walletSelector` |
18
+ | `get_known_jettons` | — | — |
19
+
20
+ ## Workflow
21
+
22
+ 1. If the user mentions a token by name (e.g., "USDT", "jUSDC"), call `get_known_jettons` to resolve the jetton address
23
+ 2. Call `get_swap_quote` with `fromToken`, `toToken`, and `amount`
24
+ - Use `"TON"` for native TON, or the jetton master contract address for tokens
25
+ - Amount is human-readable (e.g., `"1.5"` = 1.5 TON)
26
+ 3. Show the quote details to the user and ask for confirmation
27
+ 4. Call `send_raw_transaction` with the transaction params returned by the quote
28
+ 5. Poll `get_transaction_status` with the returned `normalizedHash` until status is `completed` or `failed` (see `ton-balance` skill). User can ask to skip polling.
29
+
30
+ ## Notes
31
+
32
+ - Always confirm the swap with the user before executing
33
+ - The quote returns transaction messages ready for `send_raw_transaction`
34
+ - After execution, poll `get_transaction_status` by default. User can specify whether to check status.
35
+ - If no wallet is configured, use the `ton-create-wallet` skill first
package/skills/SKILL.md DELETED
@@ -1,123 +0,0 @@
1
- # TON Blockchain Wallet
2
-
3
- Manage TON blockchain wallet operations including registry-backed wallet selection, balance queries, transfers, swaps, NFTs, DNS resolution, and agentic wallet onboarding.
4
-
5
- ## When to Use
6
-
7
- Use this skill when the user wants to:
8
- - Check wallet info, TON or token balances
9
- - Work with multiple stored wallets or switch the active wallet
10
- - Configure network settings for MCP registry mode
11
- - Send TON, Jettons (tokens), or NFTs
12
- - Swap tokens on DEX
13
- - View transaction history
14
- - Resolve TON DNS-compatible domains
15
- - Import, validate, or finish setup of an agentic wallet
16
-
17
- ## Tools Available
18
-
19
- ### Wallet & Balance
20
- - `get_wallet` - Get wallet address and network info
21
- - `get_balance` - Get TON balance
22
- - `get_balance_by_address` - Get TON balance for any address
23
- - `get_jetton_balance` - Get specific token balance (needs `jettonAddress`)
24
- - `get_jettons` - List all tokens in wallet
25
- - `get_jettons_by_address` - List all tokens for any owner address
26
- - `get_jetton_info` - Get jetton metadata by master contract address
27
- - `get_transactions` - View recent transactions (optional `limit`)
28
- - `get_transaction_status` - Check completion status of a sent transaction by normalized hash
29
- - `get_known_jettons` - Get list of popular tokens with addresses
30
-
31
- ### Wallet Registry Management
32
- - `list_wallets` - List wallets stored in the local config registry
33
- - `get_current_wallet` - Get the active wallet from the local registry
34
- - `set_active_wallet` - Switch active wallet by id, name, or address
35
- - `remove_wallet` - Soft-delete a stored wallet from the registry
36
-
37
- ### Agentic Wallet Management
38
- - `agentic_validate_wallet` - Validate an agentic wallet against network/collection and optional owner
39
- - `agentic_list_wallets_by_owner` - Find agentic wallets owned by a given main wallet
40
- - `agentic_import_wallet` - Import an existing agentic wallet into the registry
41
- - `agentic_rotate_operator_key` - Start operator-key rotation for an imported agentic wallet
42
- - `agentic_complete_rotate_operator_key` - Finalize operator-key rotation after the on-chain change lands
43
- ### Agentic Onboarding
44
- - `agentic_start_root_wallet_setup` - Create pending setup, generate operator keys, and return a dashboard URL
45
- - `agentic_list_pending_root_wallet_setups` - List pending root-agent setup drafts
46
- - `agentic_get_root_wallet_setup` - Read one pending setup by `setupId`
47
- - `agentic_complete_root_wallet_setup` - Finish onboarding from callback state or manual wallet address
48
- - `agentic_cancel_root_wallet_setup` - Cancel a pending setup
49
-
50
- ### Transfers
51
- - `send_ton` - Send TON (`toAddress`, `amount` in TON like "1.5", optional `comment`); returns top-level `normalizedHash`
52
- - `send_jetton` - Send tokens (`toAddress`, `jettonAddress`, `amount`, optional `comment`); returns top-level `normalizedHash`
53
- - `send_nft` - Transfer NFT (`nftAddress`, `toAddress`, optional `comment`)
54
- - `send_raw_transaction` - Advanced: send raw transaction with multiple messages; returns top-level `normalizedHash`
55
-
56
- ### Swaps
57
- - `get_swap_quote` - Get swap quote (`fromToken`, `toToken`, `amount` in human-readable format)
58
- - Use "TON" or jetton address for tokens
59
- - Returns transaction params for `send_raw_transaction`
60
-
61
- ### NFTs
62
- - `get_nfts` - List wallet NFTs (optional `limit`, `offset`)
63
- - `get_nfts_by_address` - List NFTs for any owner address
64
- - `get_nft` - Get NFT details (`nftAddress`)
65
-
66
- ### DNS
67
- - `resolve_dns` - Resolve TON DNS-compatible domain to address (`domain` like "foundation.ton" or "viqex.t.me")
68
- - `back_resolve_dns` - Find domain for address (`address`)
69
-
70
- ## Common Workflows
71
-
72
- ### Check Balance
73
- 1. Call `get_wallet` for address and network
74
- 2. Call `get_balance` for TON
75
- 3. Call `get_jettons` for all tokens
76
-
77
- ### Work With Multiple Wallets
78
- 1. Call `list_wallets` to inspect stored wallets
79
- 2. Call `get_current_wallet` to confirm the active wallet
80
- 3. If needed, call `set_active_wallet`
81
- 4. For one-off calls, pass `walletSelector` directly to wallet-scoped tools instead of changing active wallet
82
-
83
- ### Send TON
84
- 1. If user provides a DNS name instead of a raw address, call `resolve_dns` first
85
- 2. Call `send_ton` with address and amount
86
- 3. By default, poll `get_transaction_status` until status is completed or failed. User can ask to skip.
87
-
88
- ### Send Token
89
- 1. Call `get_jettons` to find token address and verify balance
90
- 2. Call `send_jetton` with token address and amount
91
- 3. By default, poll `get_transaction_status` until status is completed or failed. User can ask to skip.
92
-
93
- ### Swap Tokens
94
- 1. Call `get_known_jettons` if user mentions token by name
95
- 2. Call `get_swap_quote` to get quote and transaction params
96
- 3. Show quote to user and ask for confirmation
97
- 4. Call `send_raw_transaction` with the transaction params
98
- 5. By default, poll `get_transaction_status` until status is completed or failed. User can ask to skip.
99
-
100
- ### Import Existing Agentic Wallet
101
- 1. Call `agentic_validate_wallet` if the user only has an address and you need full validation
102
- 2. Call `agentic_import_wallet` to import it into the registry
103
- 3. If the wallet must sign and no pending draft was recovered, call `agentic_rotate_operator_key` and then `agentic_complete_rotate_operator_key`
104
- 4. Only after that use write tools such as `send_ton`, `send_nft`, or `agentic_deploy_subwallet`
105
-
106
- ### Set Up First Agentic Root Wallet
107
- 1. Call `agentic_start_root_wallet_setup`
108
- 2. Tell the user to open the returned dashboard URL and create the wallet from their main wallet
109
- 3. Poll `agentic_get_root_wallet_setup` or inspect `agentic_list_pending_root_wallet_setups`
110
- 4. If completion is manual, use `agentic_validate_wallet`
111
- 5. Call `agentic_complete_root_wallet_setup` when callback data is available or when the user provides the created wallet address
112
- 6. Confirm the imported wallet with `get_current_wallet` or `list_wallets`
113
-
114
- ## Notes
115
-
116
- - Amounts for `send_ton`, `send_jetton`, and `get_swap_quote` are human-readable (e.g., "1.5" = 1.5 TON)
117
- - In registry mode, wallet-scoped tools can accept optional `walletSelector`; otherwise they use the active wallet
118
- - Registry mode uses the local TON config file from `~/.config/ton/config.json` or `TON_CONFIG_PATH`
119
- - Agentic onboarding callback state is persisted in the local config; in stdio mode use `AGENTIC_CALLBACK_BASE_URL` and/or `AGENTIC_CALLBACK_PORT` when you need a stable callback endpoint across restarts
120
- - Management tool responses are sanitized and do not expose mnemonic, private keys, operator private keys, or Toncenter API keys
121
- - Read tools can work with imported agentic wallets that do not yet have `operator_private_key`; write tools cannot
122
- - Always confirm with user before executing transfers or swaps
123
- - **Default flow:** After sending, poll `get_transaction_status` until completed or failed. User can specify whether to check status.