Sign In

@tonnode/mcp

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tonnode/mcp

MCP server that gives AI agents direct liteserver access to The Open Network (TON): balances, account state, transactions and contract get-methods.

Source
npmnpm
Version
0.1.2
Version published
Weekly downloads
89
-34.56%
Maintainers
1
Weekly downloads
 
Created
Source

@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, mempool stream and indexed API.

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.

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 *_gram fields.

ToolWhat it does
get_masterchain_infoCurrent masterchain head: seqno, shard, block hashes
get_balanceGRAM balance of an address (GRAM + nano)
get_account_stateStatus (active/frozen/uninit), balance, last-tx pointer, code/data flags
get_transactionsRecent transactions: lt, time, incoming value, fees
run_get_methodRead-only get-methods on contracts (seqno, get_wallet_address, …)

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 --http

Clients then connect without installing anything:

{
  "mcpServers": {
    "ton": {
      "url": "https://your-host/mcp",
      "headers": { "Authorization": "Bearer tn_live_abc" }
    }
  }
}

Requests are authenticated with Bearer keys from TONNODE_KEYS (comma-separated) and rate-limited per key (RATE_LIMIT_RPM, default 300). With TONNODE_KEYS unset the server runs open — fine behind your own firewall, not for the public internet. GET /healthz for monitoring.

Configuration

Env varMeaning
TON_LITESERVERSUse your own liteservers instead of the public config: [{"ip":"1.2.3.4","port":40004,"key":"<base64 ed25519>"}]
TON_CONFIG_URLAlternative global-config URL
TON_NETWORK=testnetUse the testnet config (or pass --testnet)
TONNODE_KEYSHTTP mode: comma-separated Bearer API keys
PORTHTTP mode: listen port (default 8808)
RATE_LIMIT_RPMHTTP mode: requests per minute per key (default 300)

A note on public liteservers

The default public-config liteservers are shared, rate-limited and keep no deep historyget_transactions beyond recent blocks will answer lt not in db. Agents also tend to query in bursts, which public gateways throttle.

For guaranteed throughput, archive depth and a node-level mempool stream, point TON_LITESERVERS at a private endpoint — tonnode.io provisions one in under a minute, payable in TON.

License

MIT © TONNode

Keywords

ton

FAQs

Package last updated on 14 Jul 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts