@ton/mcp 0.1.15-alpha.1 → 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.
- package/README.md +13 -20
- package/bin/mcp.js +17 -0
- package/dist/cli.js +89075 -88265
- package/dist/utils/cli-args.d.ts +19 -0
- package/dist/utils/cli-args.d.ts.map +1 -0
- package/llms.txt +26 -8
- package/package.json +3 -2
- package/skills/ton-balance/SKILL.md +48 -0
- package/skills/ton-cli/SKILL.md +157 -0
- package/skills/ton-create-wallet/SKILL.md +58 -0
- package/skills/ton-manage-wallets/SKILL.md +57 -0
- package/skills/ton-nfts/SKILL.md +39 -0
- package/skills/ton-send/SKILL.md +41 -0
- package/skills/ton-swap/SKILL.md +35 -0
- package/skills/SKILL.md +0 -123
package/README.md
CHANGED
|
@@ -4,14 +4,14 @@ A Model Context Protocol (MCP) server for TON blockchain wallet operations. Buil
|
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
|
-
- **Balance Queries**: Check TON and Jetton balances, view transaction history
|
|
8
|
-
- **Transfers**: Send TON, Jettons, and NFTs to any address
|
|
9
|
-
- **Swaps**: Get quotes for token swaps via DEX aggregators
|
|
10
|
-
- **NFTs**: List, inspect, and transfer NFTs
|
|
11
|
-
- **DNS**: Resolve TON DNS-compatible domains and reverse-lookup addresses
|
|
12
|
-
- **Known Jettons**: Built-in directory of popular tokens
|
|
13
|
-
- **Agentic Wallets**: Manage agentic wallets. Create, import, or manage your agentic wallets
|
|
14
|
-
- **Multiple Transports**: Stdio (default), multi-session HTTP server, and serverless modes
|
|
7
|
+
- **Balance Queries**: Check TON and Jetton balances, view transaction history.
|
|
8
|
+
- **Transfers**: Send TON, Jettons, and NFTs to any address.
|
|
9
|
+
- **Swaps**: Get quotes for token swaps via DEX aggregators.
|
|
10
|
+
- **NFTs**: List, inspect, and transfer NFTs.
|
|
11
|
+
- **DNS**: Resolve TON DNS-compatible domains and reverse-lookup addresses.
|
|
12
|
+
- **Known Jettons**: Built-in directory of popular tokens.
|
|
13
|
+
- **Agentic Wallets**: Manage agentic wallets. Create, import, or manage your agentic wallets.
|
|
14
|
+
- **Multiple Transports**: Stdio (default), multi-session HTTP server, and serverless modes.
|
|
15
15
|
|
|
16
16
|
## Quick Start
|
|
17
17
|
|
|
@@ -26,9 +26,12 @@ Self-custody wallets for autonomous agents. Your AI agent gets TON wallet capabi
|
|
|
26
26
|
|
|
27
27
|
**Learn more about [Agentic Wallets](https://agentic-wallets-dashboard.vercel.app/).**
|
|
28
28
|
|
|
29
|
-
Agentic Wallets mode is the default mode
|
|
29
|
+
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.
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
|
+
# Install skills (recommended)
|
|
33
|
+
npx skills add ton-connect/kit/packages/mcp
|
|
34
|
+
|
|
32
35
|
# Run as stdio MCP server in agentic mode
|
|
33
36
|
npx @ton/mcp@alpha
|
|
34
37
|
|
|
@@ -112,7 +115,7 @@ HTTP mode keeps a separate MCP session/transport per client session id, so multi
|
|
|
112
115
|
| `PRIVATE_KEY` | | Hex-encoded private key: 32-byte or 64-byte (alternative to mnemonic) |
|
|
113
116
|
| `WALLET_VERSION` | `v5r1` | Wallet version to use in single-wallet mode (`v5r1`, `v4r2`, or `agentic`) |
|
|
114
117
|
| `AGENTIC_WALLET_ADDRESS` | | Agentic wallet address (required for `WALLET_VERSION=agentic`, unless derived from init params) |
|
|
115
|
-
| `AGENTIC_WALLET_NFT_INDEX` | | Agentic wallet NFT index
|
|
118
|
+
| `AGENTIC_WALLET_NFT_INDEX` | | Agentic wallet NFT index (`uint256`, optional) |
|
|
116
119
|
| `AGENTIC_COLLECTION_ADDRESS` | `EQByQ19qvWxW7VibSbGEgZiYMqilHY5y1a_eeSL2VaXhfy07` | Agentic collection address override for single-wallet mode |
|
|
117
120
|
| `TONCENTER_API_KEY` | | API key for Toncenter (optional, for higher rate limits) |
|
|
118
121
|
| `TON_CONFIG_PATH` | `~/.config/ton/config.json` | Config path for registry mode |
|
|
@@ -232,16 +235,6 @@ Send a raw transaction with full control over messages. Supports multiple messag
|
|
|
232
235
|
- `validUntil` (optional): Unix timestamp after which the transaction becomes invalid
|
|
233
236
|
- `fromAddress` (optional): Sender wallet address
|
|
234
237
|
|
|
235
|
-
#### `agentic_deploy_subwallet`
|
|
236
|
-
Deploy a new Agentic sub-wallet from the current wallet. Works only with an agentic root wallet that can sign and only when the current wallet is a user-root wallet (`deployedByUser=true`). Returns `normalizedHash`, deployed sub-wallet address, and computed sub-wallet NFT index. NFT metadata is written in onchain TEP-64 format.
|
|
237
|
-
|
|
238
|
-
**Default flow:** Poll `get_transaction_status` with the returned `normalizedHash` until completion.
|
|
239
|
-
|
|
240
|
-
**Parameters:**
|
|
241
|
-
- `operatorPublicKey` (required): New sub-wallet operator public key (`uint256`, decimal or `0x`-prefixed hex)
|
|
242
|
-
- `metadata` (required): Onchain TEP-64 metadata object. Must include at least `name` (non-empty string).
|
|
243
|
-
- `amountTon` (optional): TON amount to attach for deployment in TON units (default: `"0.05"`)
|
|
244
|
-
|
|
245
238
|
### Swaps
|
|
246
239
|
|
|
247
240
|
#### `get_swap_quote`
|
package/bin/mcp.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { existsSync } from 'node:fs';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
6
|
+
|
|
7
|
+
const binDir = path.dirname(fileURLToPath(import.meta.url));
|
|
8
|
+
const cliEntrypoint = path.resolve(binDir, '../dist/cli.js');
|
|
9
|
+
|
|
10
|
+
if (!existsSync(cliEntrypoint)) {
|
|
11
|
+
process.stderr.write(
|
|
12
|
+
'The @ton/mcp CLI has not been built yet. Run `pnpm --filter @ton/mcp build` from the workspace root and retry.\n',
|
|
13
|
+
);
|
|
14
|
+
process.exit(1);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
await import(pathToFileURL(cliEntrypoint).href);
|