Featured

Deploy OpenClaw in 60 seconds β€” 20% off logoDeploy OpenClaw in 60 seconds β€” 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger β†’
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger β†’
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free β†’
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now β†’
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data β€” no proxies, no parsers, no maintenance.

Start building free β†’
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it β€” secured from day one.

Get it set up for you β†’
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free β†’
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here β†’

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

iz-tolk-mcp MCP server](https://glama.ai/mcp/servers/izzzzzi/iz-tolk-mcp/badges/score.svg)](https://glama.ai/mcp/servers/izzzzzi/iz-tolk-mcp) πŸ“‡ 🏠 - MCP server for the Tolk smart contract compiler on TON blockchain.

README.md

<div align="center">

iz-tolk-mcp

MCP server for the Tolk smart contract compiler β€” compile, check, and deploy TON blockchain smart contracts from any AI assistant

![CI](https://github.com/izzzzzi/izTolkMcp/actions/workflows/ci.yml) ![npm version](https://www.npmjs.com/package/iz-tolk-mcp) ![npm downloads](https://www.npmjs.com/package/iz-tolk-mcp) ![License: MIT](LICENSE) ![TypeScript](https://www.typescriptlang.org/) ![Node.js](https://nodejs.org/)

πŸ‡·πŸ‡Ί Русский | πŸ‡¬πŸ‡§ English

<br />

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.

</div>

---

πŸ“– 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

| Feature | Description | |---------|-------------| | πŸ”¨ 4 MCP Tools | compile_tolk, check_tolk_syntax, get_compiler_version, generate_deploy_link | | πŸ“„ 6 MCP Resources | Language guide, stdlib reference, changelog, FunC migration guide, example contracts | | πŸ’¬ 3 MCP Prompts | Guided workflows for writing, reviewing, and debugging smart contracts | | βš™οΈ Full Compiler Options | Optimization levels (0-2), stack comments, path mappings, multi-file compilation | | πŸ“¦ Multi-file Support | Compile projects with multiple .tolk source files, @stdlib/ and @fiftlib/ imports | | πŸ”— Deployment Links | Generate ton:// deeplinks and Tonkeeper URLs for wallet deployment | | πŸš€ Zero Configuration | Runs via npx with no external dependencies beyond Node.js |

---

πŸš€ Quick Start

npx iz-tolk-mcp

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

npm install -g iz-tolk-mcp

From source

git clone https://github.com/izzzzzi/izTolkMcp.git
cd izTolkMcp
npm install
npm run build

Requirement: Node.js >= 18

---

πŸ”§ MCP Client Configuration

<details> <summary><b>Claude Desktop</b></summary>

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "tolk": {
      "command": "npx",
      "args": ["-y", "iz-tolk-mcp"]
    }
  }
}

</details>

<details> <summary><b>Claude Code</b></summary>

claude mcp add tolk -- npx -y iz-tolk-mcp

</details>

<details> <summary><b>Cursor</b></summary>

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "tolk": {
      "command": "npx",
      "args": ["-y", "iz-tolk-mcp"]
    }
  }
}

</details>

<details> <summary><b>Windsurf</b></summary>

Add to ~/.windsurf/mcp.json:

{
  "mcpServers": {
    "tolk": {
      "command": "npx",
      "args": ["-y", "iz-tolk-mcp"]
    }
  }
}

</details>

<details> <summary><b>VS Code (Copilot)</b></summary>

Add to .vscode/mcp.json:

{
  "servers": {
    "tolk": {
      "command": "npx",
      "args": ["-y", "iz-tolk-mcp"]
    }
  }
}

</details>

<details> <summary><b>Local build (any client)</b></summary>

{
  "mcpServers": {
    "tolk": {
      "command": "node",
      "args": ["/absolute/path/to/izTolkMcp/dist/cli.js"]
    }
  }
}

</details>

---

πŸ› οΈ MCP Tools

πŸ” get_compiler_version

Returns the version of the Tolk compiler bundled in @ton/tolk-js (WASM).

| Parameter | Type | Required | Description | |-----------|------|:--------:|-------------| | (none) | β€” | β€” | No parameters |

πŸ”¨ compile_tolk

Compiles Tolk smart contract source code. Returns Fift output, BoC (Bag of Cells) in base64, code hash, and compiler version.

| Parameter | Type | Required | Description | |-----------|------|:--------:|-------------| | entrypointFileName | string | βœ… | The main .tolk file to compile (e.g., "main.tolk") | | sources | object | βœ… | Map of filename -> source code. Must include the entrypoint file. | | optimizationLevel | number | β€” | Optimization level 0-2 (default: 2) | | withStackComments | boolean | β€” | Include stack layout comments in Fift output | | pathMappings | object | β€” | Maps @alias prefixes to folder paths for import resolution |

βœ… check_tolk_syntax

Checks Tolk source code for syntax and type errors without returning full compilation output. Faster feedback loop for iterative development.

| Parameter | Type | Required | Description | |-----------|------|:--------:|-------------| | entrypointFileName | string | βœ… | The main .tolk file to check | | sources | object | βœ… | Map of filename -> source code | | pathMappings | object | β€” | Maps @alias prefixes to folder paths for import resolution |

πŸ”— 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.

| Parameter | Type | Required | Description | |-----------|------|:--------:|-------------| | codeBoc64 | string | βœ… | Base64-encoded BoC of compiled contract code (from compile_tolk) | | initialDataBoc64 | string | β€” | Base64-encoded BoC for initial data cell (default: empty cell) | | workchain | number | β€” | Target workchain ID (default: 0) | | amount | string | β€” | Deploy amount in nanoTON (default: "50000000" = 0.05 TON) |

---

πŸ“„ MCP Resources

| Resource | URI | Description | |----------|-----|-------------| | πŸ“˜ language-guide | tolk://docs/language-guide | Complete Tolk language syntax reference | | πŸ“— stdlib-reference | tolk://docs/stdlib-reference | Standard library modules and functions reference | | πŸ“‹ changelog | tolk://docs/changelog | Tolk compiler version history from v0.6 to latest | | πŸ”„ tolk-vs-func | tolk://docs/tolk-vs-func | FunC to Tolk migration guide β€” key differences and comparison | | πŸ“ example-counter | tolk://examples/counter | Simple counter smart contract example in Tolk | | πŸ’Ž example-jetton | tolk://examples/jetton | Jetton (fungible token) minter contract example in Tolk |

---

πŸ’¬ 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.

| Argument | Type | Required | Description | |----------|------|:--------:|-------------| | description | string | βœ… | Description of what the smart contract should do | | contractType | string | β€” | "counter" \| "jetton" \| "nft" \| "wallet" \| "custom" (default: "custom") |

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.

| Argument | Type | Required | Description | |----------|------|:--------:|-------------| | code | string | βœ… | The Tolk smart contract source code to review |

debug_compilation_error

Diagnose and fix a Tolk compilation error. Analyzes the error against the language reference and provides corrected code.

| Argument | Type | Required | Description | |----------|------|:--------:|-------------| | errorMessage | string | βœ… | The compilation error message from the Tolk compiler | | code | string | βœ… | The Tolk source code that failed to compile |

---

πŸ’‘ 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:" ``tolk import "@stdlib/tvm-dicts"; fun onInternalMessage(myBalance: int, msgValue: int, msgFull: cell, msgBody: slice) { // handle messages } ``

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

src/
β”œβ”€β”€ index.ts        β€” Server initialization and stdio transport
β”œβ”€β”€ tools.ts        β€” 4 MCP tools (compile, check, version, deploy)
β”œβ”€β”€ resources.ts    β€” 6 MCP resources (docs, examples)
β”œβ”€β”€ prompts.ts      β€” 3 MCP prompts (write, review, debug)
└── content/        β€” Bundled documentation and example contracts
    β”œβ”€β”€ language-guide.md
    β”œβ”€β”€ stdlib-reference.md
    β”œβ”€β”€ changelog.md
    β”œβ”€β”€ tolk-vs-func.md
    β”œβ”€β”€ example-counter.tolk
    └── example-jetton.tolk

Key dependencies:

  • @modelcontextprotocol/sdk β€” MCP server framework
  • @ton/tolk-js β€” Tolk compiler (WASM, runs locally)
  • @ton/core β€” TON primitives for address computation and cell serialization
  • zod β€” Schema validation for tool parameters

---

πŸ§‘β€πŸ’» Development

npm install          # Install dependencies
npm run build        # Compile TypeScript + copy content files
npm run dev          # Run with tsx (hot reload for development)
npm test             # Run test suite (vitest)
npm run lint         # Check for lint errors
npm run lint:fix     # Fix lint errors automatically
npm run format       # Format code with Biome

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

See related servers & alternatives β†’

Related MCP servers

Browse all β†’

Related guides

Hand-picked reading to help you choose and use Cloud & DevOps servers.