
Tolk MCP Server
io.github.oxgeneral由 GitHub 账号 oxgeneral 发布v1.0.0更新于 Oct 24, 2026
MCP server for the Tolk smart contract compiler. Compile, validate, and explore TON contracts.
概览
让助手编译、检查语法并探索 TON 区块链的 Tolk 智能合约。
- 可以做什么
- 把 Tolk 智能合约编译器封装为 MCP 工具:get_compiler_version 返回编译器版本,compile_tolk 将 Tolk 源码编译为 Fift 汇编、base64 编码的 BoC 和代码哈希,check_tolk_syntax 做快速语法校验并给出行列错误信息。它还提供 Tolk 语言参考以及 hello-world、wallet、jetton 示例等资源,以及用于编写和审查合约的引导提示。编译选项包括优化级别、栈注释和实验性标志。
- 适用场景
- 适合用 Tolk 开发 TON 智能合约、希望助手在对话中直接编译或校验代码的场景。可用于合约编写、部署前的快速语法检查,以及审查或优化现有合约。
- 运行要求
- 通过 stdio 在本地运行,需要 Node.js 18 或更高版本;README 建议用 npx 启动,或从源码执行 npm install 与 npm run build 构建。未声明任何账号、API 密钥或环境变量。
安装
在 SourceWeft 中
- 打开 控制台中的 Tolk MCP Server,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
tolk-mcp-server
MCP server for the Tolk smart contract compiler. Compile, validate, and explore TON smart contracts from any MCP-compatible AI assistant (Claude Desktop, Cursor, Windsurf, etc.).
Features
Tools:
get_compiler_version— Returns the Tolk compiler versioncompile_tolk— Compiles Tolk source code to Fift + BoC with full compiler options (optimization level, stack comments, experimental flags)check_tolk_syntax— Quick syntax validation without full output
Resources:
tolk://reference— Tolk language quick reference (syntax, types, differences from FunC)tolk://examples/hello-world— Counter contract exampletolk://examples/wallet— Wallet contract exampletolk://examples/jetton— Jetton (token) contract skeleton
Prompts:
write_smart_contract— Guided prompt for writing a new TON smart contractreview_smart_contract— Guided prompt for security review and optimization analysis
Quick Start
Claude Desktop
Add to claude_desktop_config.json:
Cursor / Windsurf
Add to your MCP settings:
From Source
Usage Examples
Compile a contract
The tool returns:
- Fift assembly code
- BoC (Bag of Cells) in base64 — ready for deployment
- Code hash — unique identifier of the compiled code
- Warnings (if any)
Check syntax quickly
Returns OK + code hash, or a detailed error with line/column info.
Multi-file contracts
Pass all files in the sources parameter:
Standard library imports (@stdlib/*) are resolved automatically by the compiler.
Compiler Options
Requirements
- Node.js >= 18
- No external dependencies beyond npm packages
Development
License
MIT
来源:README.md,提交 b489bcf
工具
0版本历史
1- v1.0.0最新Sep 16, 2026
评分
已满足适用检查项的 40%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。