Get the FREE Ultimate OpenClaw Setup Guide →

ton-blockchain

A Model Context Protocol (MCP) server written in Python for natural language interaction with the TON blockchain 💎

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio devonmojito-ton-blockchain-mcp python -m tonmcp.mcp_server \
  --env TON_API_KEY="Your TON API key from TONAPI (read from .env during runtime)"

How to use

The TON BLOCKCHAIN MCP server enables natural language interaction with the TON blockchain. It exposes a set of tools that let you analyze addresses, fetch transaction details, detect trends, and evaluate trading activity, all through plain-language queries. You can integrate the server with client applications or conversational UIs (for example Claude Desktop) to ask questions like “What is the balance of this address?”, “Show hot trading pairs in the last 24 hours,” or “Trace money flow for a given wallet.” The server provides structured tool invocations behind the scenes, so you can rely on consistent prompts to perform forensic checks, price lookups, and activity analysis against TON data via the TON API.

How to install

Prerequisites:\n- Python 3.10+\n- Access to TON API (TONAPI) and an API key\n\nInstallation steps:\n1) Clone the repository:\n\ngit clone https://github.com/devonmojito/ton-blockchain-mcp.git\ncd ton-blockchain-mcp\n\n2) Create a Python virtual environment (optional but recommended):\n\npython -m venv venv\nsource venv/bin/activate # on macOS/Linux\nvenv\nScripts\activate # on Windows\n\n3) Install dependencies:\n\npip install -r requirements.txt\n\n4) Configure environment: create a .env file at the project root and set TON_API_KEY with your TONAPI key:\n\nTON_API_KEY=YOUR_TON_API_KEY\n\n5) Run the MCP server:\n\npython -m tonmcp.mcp_server\n\n6) Optional Claude Desktop integration: configure your client to point to the running MCP server using the provided command invocation and, if needed, set PYTHONPATH and working directory as in the example configuration.\n

Additional notes

Notes and tips:\n- This MCP server relies on a TON API key; keep it secure and do not hard-code it in source files. Use a .env file or environment management system in production.\n- If you encounter import or path issues, ensure PYTHONPATH includes the project src directory (as shown in integration examples).\n- The tools (analyze_address, get_transaction_details, find_hot_trends, analyze_trading_patterns, get_ton_price, get_jetton_price) cover address analytics, transaction analysis, trend discovery, and pricing. Use them through your MCP prompt layer to generate structured responses.\n- The server is marked beta; validate critical results against on-chain data when making decisions.\n- You can run the MCP server behind a reverse proxy or within a containerized environment for easier deployment and scaling.

Related MCP Servers

Sponsor this space

Reach thousands of developers