TON Blockchain MCP

TON Blockchain MCP

A Model Context Protocol server that enables natural language interaction with the TON blockchain, allowing users to perform queries for balances, analyze trading patterns, detect hot trends, and conduct forensic investigations on blockchain data.

Category
Visit Server

README

TON BLOCKCHAIN MCP

A Model Context Protocol (MCP) server for natural language interaction with the TON blockchain.

TON Blockchain MCP Cover

Features

  • Natural Language Processing: Understand complex blockchain queries in plain English
  • Trading Analysis: Analyze trading patterns, profitability, and strategies
  • Hot Trends Detection: Find trending tokens, active pools, and high-activity accounts
  • Forensics & Compliance: Conduct blockchain investigations and compliance checks
  • Real-time Data: Access live TON blockchain data through TON API

Quick Start

Prerequisites

  • Python 3.10+
  • TON API key from TONAPI

Installation

  1. Clone the repository:
git clone https://github.com/devonmojito/ton-blockchain-mcp.git
cd ton-blockchain-mcp
  1. Install dependencies:
pip install -r requirements.txt
  1. Set up environment variables:
  • You might want to put the API key in .env as well
export TON_API_KEY=your_api_key_here
  1. Run the server:
python -m src.mcp_server

PyPI Installation

You can also install the TON MCP Server directly from PyPI:

pip install ton-mcp-server

Using Docker

# Build and run with Docker Compose
docker-compose up --build

Example: Using TON MCP Server with Claude Desktop

You can easily use this MCP server with Claude Desktop for natural language blockchain queries. Below is an example of checking the TON balance for a wallet address:

Check TON Balance for Wallet Address

Claude Desktop Configuration Example

To use this MCP server with Claude Desktop, add the following to your Claude Desktop config:

  • You might need to replace the Python env setup with your own.
{
  "mcpServers": {
    "ton-mcp-server": {
      "command": "/Users/devon/ton-mcp/ton-mcp-server/venv/bin/python",
      "args": [
        "-m",
        "tonmcp.mcp_server"
      ],
      "cwd": "/Users/devon/ton-mcp/ton-mcp-server/src",
      "env": {
        "PYTHONPATH": "/Users/devon/ton-mcp/ton-mcp-server/src"
      }
    }
  }
}

Usage

Basic Queries

import asyncio
from mcp_client import McpClient

async def main():
    client = McpClient("http://localhost:8000")
    
    # Analyze an address
    result = await client.call_tool("analyze_address", {
        "address": "EQD1234...",
        "deep_analysis": True
    })
    print(result)

asyncio.run(main())

Natural Language Examples

  • "What's the balance of address EQD1234...?"
  • "Find hot trading pairs in the last hour"
  • "Analyze trading patterns for this wallet"
  • "Show suspicious activity for address ABC"
  • "Trace money flow from this address"

Configuration

Configuration can be provided via:

  • Environment variables
  • config/settings.json file
  • Runtime parameters

Key configuration options:

  • TON_API_KEY: Your TON API key
  • MCP_HOST: Server host (default: localhost)
  • MCP_PORT: Server port (default: 8000)
  • LOG_LEVEL: Logging level (default: INFO)

MCP Tools & System Prompts Documentation

Tools

analyze_address

Analyze a TON address for its balance, jetton holdings, NFTs, and recent activity. Optionally performs deep forensic analysis if deep_analysis is True. Use for questions about account overview, holdings, or activity.

Parameters:

  • address (str): TON address to analyze
  • deep_analysis (bool, optional): Enable deep forensic analysis

get_transaction_details

Get details and analysis for a specific TON blockchain transaction by its hash. Use for questions about a particular transaction, its participants, value, or type.

Parameters:

  • tx_hash (str): Transaction hash

find_hot_trends

Find trending tokens, pools, or accounts on the TON blockchain for a given timeframe and category. Use for questions about what's hot, trending, or popular on TON.

Parameters:

  • timeframe (str, optional): Time period (e.g., 1h, 24h, 7d)
  • category (str, optional): Type of trends (tokens, pools, accounts)

analyze_trading_patterns

Analyze trading patterns for a TON address over a specified timeframe. Use for questions about trading activity, frequency, jetton transfers, or DEX swaps for an account.

Parameters:

  • address (str): TON address
  • timeframe (str, optional): Time period (e.g., 24h)

System Prompts

  • trading_analysis: Generate trading analysis prompts
  • forensics_investigation: Generate forensics prompts
  • trend_analysis: Generate trend analysis prompts

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For support, please open an issue on GitHub or contact the author on Telegram: @devonmojito

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured