@tonnode/mcp
Advanced tools
+5
-5
@@ -62,3 +62,3 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; | ||
| }); | ||
| server.tool("get_balance", "TON balance of an address, in both TON and nanoTON.", { address: addressArg }, async ({ address }) => { | ||
| server.tool("get_balance", "Native GRAM balance of an address (GRAM is the renamed Toncoin), in both GRAM and nano units.", { address: addressArg }, async ({ address }) => { | ||
| try { | ||
@@ -72,3 +72,3 @@ const client = await getClient(); | ||
| address: addr.toString(), | ||
| balance_ton: fromNano(nano), | ||
| balance_gram: fromNano(nano), | ||
| balance_nano: nano, | ||
@@ -93,3 +93,3 @@ at_seqno: master.last.seqno, | ||
| status, | ||
| balance_ton: fromNano(res.balance?.coins ?? 0n), | ||
| balance_gram: fromNano(res.balance?.coins ?? 0n), | ||
| last_transaction: res.lastTx | ||
@@ -133,6 +133,6 @@ ? { lt: res.lastTx.lt, hash: res.lastTx.hash.toString(16) } | ||
| unix_time: tx.now, | ||
| in_value_ton: inInfo?.type === "internal" ? fromNano(inInfo.value.coins) : null, | ||
| in_value_gram: inInfo?.type === "internal" ? fromNano(inInfo.value.coins) : null, | ||
| in_from: inInfo?.type === "internal" ? inInfo.src.toString() : null, | ||
| out_messages: tx.outMessagesCount, | ||
| total_fees_ton: fromNano(tx.totalFees.coins), | ||
| total_fees_gram: fromNano(tx.totalFees.coins), | ||
| }; | ||
@@ -139,0 +139,0 @@ } |
+2
-1
| { | ||
| "name": "@tonnode/mcp", | ||
| "version": "0.1.1", | ||
| "version": "0.1.2", | ||
| "description": "MCP server that gives AI agents direct liteserver access to The Open Network (TON): balances, account state, transactions and contract get-methods.", | ||
@@ -30,2 +30,3 @@ "type": "module", | ||
| "toncoin", | ||
| "gram", | ||
| "ai-agents", | ||
@@ -32,0 +33,0 @@ "claude", |
+3
-1
@@ -26,6 +26,8 @@ # @tonnode/mcp | ||
| > **Naming note:** the native coin was renamed from Toncoin to **GRAM** in June 2026; the network itself is still called **TON**. Tool outputs use `*_gram` fields. | ||
| | Tool | What it does | | ||
| |---|---| | ||
| | `get_masterchain_info` | Current masterchain head: seqno, shard, block hashes | | ||
| | `get_balance` | TON balance of an address (TON + nanoTON) | | ||
| | `get_balance` | GRAM balance of an address (GRAM + nano) | | ||
| | `get_account_state` | Status (active/frozen/uninit), balance, last-tx pointer, code/data flags | | ||
@@ -32,0 +34,0 @@ | `get_transactions` | Recent transactions: lt, time, incoming value, fees | |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
22268
1.01%79
2.6%