
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 分