TON MCP
MCP Server for The Open Network
Interact with the TON blockchain via AI assistants. Built on Tonutils and FastMCP.
Alpha version — the project is under active development. APIs, tool names, and behavior may change in future releases. It is strongly recommended to test all operations on testnet before using on mainnet.
Features
- Providers — Lite Servers (ADNL), Toncenter & TonAPI (HTTP)
- Networks — mainnet, testnet, L2 (Tetra); auto tool filtering
- Signing — mnemonic, private key, or TonConnect
- Wallets — v3r1, v3r2, v4r1, v4r2, v5r1, highload_v3r1, preprocessed_v2
- Transfers — TON, jettons, NFTs, encrypted, gasless, batch
- Jettons — deploy, mint, burn, transfer admin, update metadata, lock
- NFT — standard, soulbound, editable; batch mint; SBT revoke/destroy
- DNS — resolve .ton/.t.me domains, set/delete wallet records
- Queries — wallet, contract, jetton, NFT, collection, DNS info
Examples
Just ask your AI assistant:
"What's my wallet balance?"
"What wallet does ness.ton point to?"
"How many USDT do I have?"
"Send 1 TON to ness.ton with comment 'Thanks for ton-mcp!'"
"Send 0.1 TON with an encrypted message 'Hello from ton-mcp!'"
"Airdrop 0.1 TON to 50 wallets in one transaction"
Multistep scenarios — the AI will ask for details along the way:
Token launch → "Deploy a new token called MyToken"
→ asks for metadata URL, admin address
→ "Mint 1,000,000 tokens to my wallet"
→ "Airdrop 10,000 tokens to these addresses"
→ "Drop admin to lock supply forever"
NFT collection → "Create an NFT collection with 5% royalty"
→ asks for metadata URLs, royalty address
→ "Batch mint 10 items to different owners"
→ "Send 3 NFTs to these addresses"
Quick Start
Install uv (if not already installed):
curl -LsSf https://astral.sh/uv/install.sh | sh
Copy .env.example to .env and configure parameters.
Add to your MCP client config (.mcp.json, mcp.json, or client settings):
{
"mcpServers": {
"ton": {
"command": "uvx",
"args": [
"--refresh",
"ton-mcp"
],
"env": {
"ENV_FILE": "/path/to/.env"
}
}
}
}
Running from source
git clone https://github.com/nessshon/ton-mcp.git
cd ton-mcp
uv sync
{
"mcpServers": {
"ton": {
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/ton-mcp",
"ton-mcp"
],
"env": {
"ENV_FILE": "/path/to/.env"
}
}
}
}
Configuration
Networks
NETWORK (default: testnet)
- mainnet / testnet — all providers and tools.
- tetra — tonapi only, tonviewer only. No DNS, no gasless.
Providers
CLIENT_PROVIDER
- lite — direct connection to Lite Servers. No API key needed. Custom config via
CLIENT_LITE_CONFIG. - toncenter — HTTP API. API key optional (improves rate limits).
- tonapi — required for gasless transfers. API key required.
Signing
WALLET_SECRET
- SECRET_KEY — mnemonic or private key (hex/base64). Auto-signing, encrypted messages, gasless.
- TONCONNECT — leave empty. User approves each tx in wallet app (Tonkeeper, MyTonWallet, Tonhub, Telegram Wallet).
Parameters
| Parameter | Default | Description |
|---|---|---|
NETWORK |
testnet |
mainnet, testnet, tetra |
EXPLORER |
tonviewer |
tonviewer, tonscan |
WALLET_VERSION |
v5r1 |
v5r1, v4r2, v4r1, v3r2, v3r1, highload_v3r1, preprocessed_v2 |
WALLET_SECRET |
— | Mnemonic (space-separated) or private key (hex/base64) |
CLIENT_PROVIDER |
— | lite, toncenter, tonapi |
CLIENT_API_KEY |
— | API key (required for tonapi, optional for toncenter) |
CLIENT_LITE_CONFIG |
— | Lite client config path or URL |
CLIENT_RPS_LIMIT |
10 |
Requests per second limit |
CLIENT_RPS_PERIOD |
1.0 |
Rate limit window in seconds |
TONCONNECT_MANIFEST_URL |
manifest.json | TonConnect manifest URL |
TONCONNECT_STORAGE_PATH |
./tonconnect-storage.json |
TonConnect session storage path |
TONCONNECT_APP_DOMAINS |
["github.com"] |
Domains for TonProof verification |
TONCONNECT_SECRET |
ton-mcp-secret |
Secret for TonProof HMAC signing |
MCP_SERVER_HOST |
127.0.0.1 |
Server host (HTTP transport only) |
MCP_SERVER_PORT |
0 |
Server port; 0 = auto-select (HTTP transport only) |
See Also
TON MCP is built on tonutils and is part of a TON Python ecosystem by the same author, which also includes pytonapi and toncenter (in development). Future updates may bring Indexer API and DEX support as these libraries evolve.
Contributing
This project is open to contributions, ideas, and suggestions. Feel free to open an issue or submit a pull request.
License
This repository is distributed under the MIT License.
Metadata
Release files for ton-mcp 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ton_mcp-0.0.1.tar.gz | 49.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ton_mcp-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 105.9 kB
Release files / ton_mcp-0.0.1.tar.gz
| Download URL | ton_mcp-0.0.1.tar.gz |
|---|---|
| Size | 49.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
991f3390c76eeecf25f7d69bfa666a89abcf1f7825b9738162746d6f43241cf0
|
|
BLAKE2b-256 checksum How to use checksums |
9f3fc2c775c19b3984d7a1b994ef33e9f969f9caa35c67762f272e03d791221c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / ton_mcp-0.0.1-py3-none-any.whl
| Download URL | ton_mcp-0.0.1-py3-none-any.whl |
|---|---|
| Size | 56.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8c21889ed37cb68bf2f746af3cfd156809ebab0106319d6d3e92280aef1a8f29
|
|
BLAKE2b-256 checksum How to use checksums |
4cbf15f952c971c5e7da1062748c9bf9fd1bec8e039b45b643ffcdda5647f7f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for ton-mcp 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.