
iz-tolk-mcp — Tolk Compiler for TON
io.github.izzzzzi由 GitHub 帳號 izzzzzi 發布v1.2.1更新於 Oct 24, 2026
Tolk smart contract compiler for TON — compile, check, and deploy from AI assistants
概覽
本機 MCP 伺服器,把 TON 區塊鏈的 Tolk 智慧合約編譯器接進 AI 助理,用來編譯、檢查並準備部署合約。
- 可以做什麼
- 編譯 Tolk 智慧合約原始碼(含多檔案專案),回傳 Fift 輸出、BoC、程式碼雜湊與編譯器版本
- 檢查 Tolk 程式的語法與型別錯誤,不回傳完整編譯輸出
- 讀取內建的編譯器版本
- 為已編譯合約產生 TON 部署 deeplink 與 Tonkeeper 連結,並計算合約地址
- 讀取內建的 Tolk 文件與範例合約,並使用撰寫、審查、除錯合約的引導式提示
- 適用情境
- 適合以 Tolk 開發 TON 智慧合約時,讓助理在對話中直接編譯、檢查並反覆修改程式碼,或為已編譯合約產生錢包部署連結。
- 執行需求
- 透過 npx(或全域 npm 安裝)以 stdio 在本機執行,需要 Node.js 18 或更新版本。未宣告帳號、API 金鑰或環境變數;編譯器以 WASM 形式內建並在本機執行。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 iz-tolk-mcp — Tolk Compiler for TON,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
iz-tolk-mcp
MCP server for the Tolk smart contract compiler — compile, check, and deploy TON blockchain smart contracts from any AI assistant
[CI] [npm version] [npm downloads] [License: MIT] [TypeScript] [Node.js]
🇷🇺 Русский | 🇬🇧 English
MCP server that brings the Tolk smart contract compiler directly into AI assistants like Claude — write, compile, check, and deploy TON contracts without leaving the conversation.
📖 Overview
iz-tolk-mcp is a Model Context Protocol (MCP) server that integrates the Tolk smart contract compiler into AI assistants, enabling a seamless write-compile-deploy workflow for TON blockchain development.
- Tolk is the next-generation smart contract language for the TON blockchain, designed as a modern successor to FunC with familiar syntax (C/TypeScript-like), type safety, and cleaner semantics.
- MCP (Model Context Protocol) is an open standard that lets AI assistants use external tools, access data sources, and follow guided workflows — turning them into capable development environments.
✨ Features
🚀 Quick Start
The server communicates over stdio and is designed to be launched by an MCP client.
📦 Installation
Using npx (no install needed)
MCP clients launch the server automatically — just add it to your configuration (see below).
Global install
From source
Requirement: Node.js >= 18
🔧 MCP Client Configuration
Claude Desktop
Add to claude_desktop_config.json:
Claude Code
Cursor
Add to .cursor/mcp.json:
Windsurf
Add to ~/.windsurf/mcp.json:
VS Code (Copilot)
Add to .vscode/mcp.json:
Local build (any client)
🛠️ MCP Tools
🔍 get_compiler_version
Returns the version of the Tolk compiler bundled in @ton/tolk-js (WASM).
🔨 compile_tolk
Compiles Tolk smart contract source code. Returns Fift output, BoC (Bag of Cells) in base64, code hash, and compiler version.
✅ check_tolk_syntax
Checks Tolk source code for syntax and type errors without returning full compilation output. Faster feedback loop for iterative development.
🔗 generate_deploy_link
Generates TON deployment deeplinks for a compiled contract. Computes the deterministic contract address and returns ton:// and Tonkeeper links ready for wallet deployment.
📄 MCP Resources
💬 MCP Prompts
write_smart_contract
Guided workflow for writing a new Tolk smart contract on TON. Injects the language reference and a relevant example contract into the conversation context.
review_smart_contract
Security-focused review of a Tolk smart contract. Checks for access control, message handling, integer overflow, gas management, storage integrity, and TON-specific vulnerabilities.
debug_compilation_error
Diagnose and fix a Tolk compilation error. Analyzes the error against the language reference and provides corrected code.
💡 Usage Examples
Once configured, interact with the Tolk MCP server through natural language in your AI assistant:
Compile a contract:
"Compile this Tolk smart contract:"
Write a new contract from scratch:
"Write a simple counter contract for TON that stores a number and lets anyone increment it. Include a getter to read the current value."
Review an existing contract:
"Review this contract for security issues" (paste code)
Debug a compilation error:
"I'm getting this error when compiling:
unexpected token 'fun'— here's my code:" (paste code)
Generate a deploy link:
"Generate a deployment link for the contract we just compiled."
📁 Project Structure
Key dependencies:
@modelcontextprotocol/sdk— MCP server framework@ton/tolk-js— Tolk compiler (WASM, runs locally)@ton/core— TON primitives for address computation and cell serializationzod— Schema validation for tool parameters
🧑💻 Development
Pre-commit hooks enforce code quality automatically:
- Biome — fast linter and formatter for TypeScript
- Husky — Git hooks manager
- lint-staged — runs checks only on staged files
來源:README.md,提交 e5b016e
工具
0版本歷史
1- v1.2.1最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分