tonnode/mcp
The tonnode/mcp server gives AI agents direct liteserver access to The Open Network (TON) blockchain via the native ADNL protocol (no HTTP gateways), enabling querying of on-chain data and execution of read-only contract methods.
get_masterchain_info: Retrieve the current masterchain head (workchain, shard, seqno, block hashes) to check network liveness and latest block height.get_balance: Look up the native GRAM (Toncoin) balance of any TON address in both GRAM and nano units. Supports friendly (EQ…/UQ…) and raw (0:…) address formats.get_account_state: Fetch full account state including status (active/frozen/uninit), balance, last transaction pointer, and code/data deployment flags.get_transactions: Retrieve up to 30 recent transactions for an address (newest first), including logical time, Unix timestamp, incoming value, outgoing message count, and total fees.run_get_method: Execute read-only smart contract get-methods (e.g.,seqno,get_wallet_address) with optional integer arguments to inspect on-chain contract state.
Additional features include flexible deployment (embedded via npx, self-hosted, or hosted HTTP), configurable network access (mainnet by default, testnet or custom liteservers supported), and — when running as an HTTP server — API key authentication, rate limiting, session management, and health monitoring.
Provides direct liteserver access to The Open Network (TON) for querying blockchain state, balances, transactions, and running get-methods on smart contracts.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@tonnode/mcp get balance of EQCD39VS5jcptHL8vMjEXrzGaRcCVYto7HUn4bpAOg8xqB2N"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@tonnode/mcp
MCP server that gives AI agents direct liteserver access to The Open Network (TON) — no HTTP gateways in the middle. Balances, account state, transaction history and contract get-methods over TON's native ADNL protocol.
Built by TONNode — private TON liteservers, archive nodes, a mempool stream and a REST API (early access, on request).
Quick start
Add to Claude Desktop, Claude Code, ChatGPT, Cursor, Codex or any MCP client:
{
"mcpServers": {
"ton": {
"command": "npx",
"args": ["-y", "@tonnode/mcp"]
}
}
}That's the whole integration. The server connects to TON mainnet via the public global config by default. Ready-made configs for every client — plus programmatic Node.js usage — live in examples/.
Related MCP server: Telegram MCP Server
Tools
Naming note: the native coin was renamed from Toncoin to GRAM in June 2026; the network itself is still called TON. Tool outputs use
*_gramfields.
Tool | What it does | Typical question |
| GRAM balance of an address | "How much GRAM does EQ… hold?" |
| Jetton/token balance (USDT and any TEP-74 token) | "How much USDT is on this wallet?" |
| Token metadata: name, symbol, decimals, supply | "What are this jetton's decimals?" |
| Recent transactions: values, senders, fees | "Did my payment arrive?" |
| Status, deployment flags, last-tx pointer | "Is this contract deployed?" |
| Read-only get-methods on contracts | "Call |
| Convert/validate EQ…/UQ…/raw forms, offline | "Are these two addresses the same?" |
| Masterchain head: seqno, shard, hashes | "Is the network (or my endpoint) alive?" |
| Firm DEX swap quote (GRAM ⇄ any jetton) via Omniston | "How much USDT for 100 GRAM right now?" |
| Unsigned, TonConnect-ready swap transaction | "Prepare that swap for my wallet to sign" |
| Quote TON → Ethereum/Arbitrum/Base/BNB/Polygon/Avalanche | "How much USDT on Ethereum for my TON USDT?" |
| Unsigned HTLC escrow transaction + its secret | "Start that cross-chain swap" |
| Live phases of a cross-chain trade on both chains | "Did the resolver lock my USDT on Ethereum?" |
| Reveal the secret — atomically settles both sides | "Complete the swap" |
| Unsigned cancellation that reclaims escrowed funds | "The trade stalled — get my money back" |
| Mint a fresh TON wallet (mnemonic + keys + address) | "Create a wallet for my agent to use" |
Wallet generation
generate_wallet mints a brand-new wallet — a 24-word mnemonic, its ed25519 keypair and the address for the chosen contract version (v4 default, plus v3r2, v5r1 and highload_v3 for mass payouts). The v3r2/v4/v5r1 addresses come from @ton/ton's canonical contracts; highload_v3 is derived from the official contract code and cross-checked against a maintained reference implementation.
⚠️ This returns secret key material. In hosted mode the keys are generated on the server and returned over TLS — treat every generated wallet as hot: fine for programmatic/ephemeral use, but move any meaningful balance to cold storage, and keep the response out of logs and shared transcripts. The server never stores or logs the mnemonic or private key (only the public address). Operators can set
TONNODE_DISABLE_WALLET_GEN=1to remove the tool entirely.
Swaps — agents that can actually trade
get_swap_quote and build_swap_tx are powered by Omniston, STON.fi's RFQ protocol aggregating STON.fi and DeDust liquidity. No API key needed.
The flow is strictly non-custodial — the server never sees a private key, never signs and never broadcasts:
get_swap_quotelocks a firm quote (amounts in raw indivisible units; the answer includes the slippage floor, price impact, gas budget and DEX route).build_swap_txturns the quote into unsigned messages in exactly the shapetonConnectUi.sendTransaction()expects — signing and sending stay with the wallet owner.
Quotes expire in about a minute, so build promptly. Omniston emulates the transfer while building: if the wallet doesn't hold the input amount, the build fails up front instead of burning gas on-chain.
Cross-chain
The *_crosschain_* tools take the same idea across blockchains: pay in GRAM or any TON jetton, receive USDT/USDC/native coins on Ethereum, Arbitrum, Base, BNB, Polygon or Avalanche — settled through Omniston's atomic HTLC escrow, typically in well under a minute. TON is always the source chain (the signer is a TON wallet).
The agent drives the full atomic-swap lifecycle: quote → build (the tool generates the HTLC secret and hands it to the caller — the server keeps nothing) → sign & send → track both chains → disclose the secret to settle, or build a refund if the trade stalls. At no point can the server, the resolver or anyone else redirect the funds: the secret only completes the trade as quoted, and an unfilled escrow is always reclaimable by the owner wallet.
Hosted / self-hosted HTTP mode
The package also ships a Streamable-HTTP entry for remote deployments (this is what powers mcp.tonnode.io):
TONNODE_KEYS=tn_live_abc,tn_live_def PORT=8808 npx -y @tonnode/mcp --httpWant a ready-made hosted endpoint instead of running your own? Keys for mcp.tonnode.io are issued at tonnode.io/mcp. Clients connect without installing anything:
{
"mcpServers": {
"ton": {
"url": "https://your-host/mcp",
"headers": { "Authorization": "Bearer tn_live_abc" }
}
}
}Requests are authenticated with Bearer keys and rate-limited per key (RATE_LIMIT_RPM, default 300). Besides Authorization: Bearer <key>, the server accepts a bare Authorization: <key> and X-API-Key: <key> — for gateways (e.g. Smithery) that reserve the Authorization header for themselves. Keys come from either TONNODE_KEYS (comma-separated, fixed) or TONNODE_KEYS_FILE — a JSON array of {"key", "label"?, "rpm"?, "expires"?} that is hot-reloaded on change and on SIGHUP: add or revoke customer keys with no restart, per-key rate limits, and self-expiring keys for subscription plans. A revoked key's live sessions are closed immediately. GLOBAL_RATE_LIMIT_RPM adds a total ceiling across all keys to protect the backend liteserver. Sessions are private to the key that opened them, idle sessions are swept after SESSION_TTL_MIN (default 30 minutes), and concurrent sessions are capped per key and globally. Without keys the server refuses to start; set TONNODE_ALLOW_OPEN=1 to explicitly run keyless behind your own firewall. GET /healthz for monitoring, deploy/tonnode-keys.sh for key management.
The server binds 127.0.0.1 by default — put a TLS reverse proxy (Caddy, nginx) in front and set HOST=0.0.0.0 only if the proxy runs on another machine. Ready-made systemd + Caddy configs live in deploy/.
Configuration
Env var | Meaning |
| Use your own liteservers instead of the public config: |
| Alternative global-config URL |
| Use the testnet config (or pass |
| HTTP mode: comma-separated Bearer API keys (simple, fixed) |
| HTTP mode: JSON key file with labels, per-key |
| HTTP mode: bind address (default |
| HTTP mode: listen port (default 8808) |
| HTTP mode: default requests per minute per key (default 300) |
| HTTP mode: total ceiling across all keys (default off) |
| HTTP mode: idle minutes before a session is swept (default 30) |
| HTTP mode: concurrent session caps (default 500 / 50) |
| Swap tools: alternative Omniston WebSocket endpoint (default |
| Swap tools: optional integrator revenue share in bps of the output — always visible to the caller as |
| Set to |
A note on public liteservers
The default public-config liteservers are shared, rate-limited and keep no deep history — get_transactions beyond recent blocks will answer lt not in db. Agents also tend to query in bursts, which public gateways throttle.
For your own rate limit and archive history, point TON_LITESERVERS at a private liteserver — a keypair and a global.config.json from the console, paid from a balance funded in GRAM or USDT. How the config file, ADNL keys and archive routing work is covered in the TON Liteserver guide.
Mempool stream
Pending messages are not exposed through this MCP server — none of the tools above read the mempool. TONNode offers the mempool as a separate WebSocket feed at wss://mempool.tonnode.io/v1/stream: one JSON object per external message as TONNode's node receives it from the public overlay, before it lands in a block, with filters by destination wallet, op code or DEX pool and a short replay after a reconnect. Plans are priced by the number of simultaneous connections on one key. Coverage is partial — the node sees only what reaches it over the overlay, and no completeness or speed figures are promised — and messages sent through TONNode's liteservers usually do not appear in it (the node does not publish its own broadcasts; a copy relayed back by other nodes showed up for 2 of 20 sends in a test on 8 October 2026). Protocol, keys and plans: tonnode.io/en/docs/mempool.
License
MIT © TONNode
Available Tools
5 toolsget_account_stateAInspect
Full account state: status (active/frozen/uninit), balance, last transaction pointer and whether code/data are deployed.
Inputs: address (required).
get_balanceAInspect
Native GRAM balance of an address (GRAM is the renamed Toncoin), in both GRAM and nano units.
Inputs: address (required).
get_masterchain_infoAInspect
Current TON masterchain head: workchain, shard, seqno and block hashes. Use to check network liveness and the latest block height.
Inputs: no named parameters.
get_transactionsAInspect
Recent transactions of an address (newest first): logical time, unix time, incoming value, outgoing message count and total fees.
Inputs: address (required), limit.
run_get_methodAInspect
Execute a read-only get-method on a smart contract (e.g. seqno, get_wallet_address). Integer arguments only in this version.
Inputs: method (required), address (required), args.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool targets a distinct aspect of the TON blockchain: account state, balance, masterchain info, transactions, and contract method execution. No two tools overlap in purpose.
Most tools follow a 'get_<noun>' pattern, but 'run_get_method' breaks the pattern with 'run' as the verb. Still, the naming is clear and readable.
With 5 tools, the set is well-scoped for a query-focused TON node server. Each tool serves a necessary function without redundancy.
The tools cover essential query operations for the TON blockchain, but missing features like detailed block information or contract code retrieval are minor gaps.
Maintenance
Related MCP Connectors
Provide AI agents and automation tools with contextual access to blockchain data including balance…
Lighter funding/volume snapshot and multi-chain wallet balance checks for AI agents.
Bitcoin RPC for AI agents. 7 read tools; x402 USDC on Base mainnet. Discovery is free.
Solana wallet & token checks for agents, pay per call in USDC via x402 (Solana or Base).
51
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA production-ready Model Context Protocol server implementation that connects AI assistants to the TON blockchain, allowing them to query wallet balances, transaction details, smart contracts, and other blockchain data.MIT
- FlicenseAqualityDmaintenanceEnables AI agents to interact with Telegram via MTProto, supporting high-performance communication and seamless integration.1-
- FlicenseAqualityDmaintenanceTON Data MCP Server — real-time blockchain data for AI agents. Provides wallet balances, token prices, STON.fi liquidity pools, market overview, transactions, and network state. 6 MCP tools, free tier, Docker-ready.6-

Tegro Wallet MCPofficial
AlicenseAqualityCmaintenanceProvides read-only, real-time access to TON blockchain data including wallet balances, token holdings, transactions, prices, NFTs, DNS resolution, and address validation, without requiring private keys.846 npmMIT