izzzzzi/izTolkMcp

๐Ÿ—„๏ธ Databases
0 Views
0 Installs

๐Ÿ“‡ ๐Ÿ  - MCP server for the Tolk smart contract compiler on TON blockchain. Compile, syntax-check, and generate deployment deeplinks for TON contracts directly from AI assistants.

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "izzzzzi-iztolkmcp": {
      "command": "npx",
      "args": [
        "-y",
        "izzzzzi-iztolkmcp"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

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

FeatureDescription
๐Ÿ”จ 4 MCP Toolscompile_tolk, check_tolk_syntax, get_compiler_version, generate_deploy_link
๐Ÿ“„ 6 MCP ResourcesLanguage guide, stdlib reference, changelog, FunC migration guide, example contracts
๐Ÿ’ฌ 3 MCP PromptsGuided workflows for writing, reviewing, and debugging smart contracts
โš™๏ธ Full Compiler OptionsOptimization levels (0-2), stack comments, path mappings, multi-file compilation
๐Ÿ“ฆ Multi-file SupportCompile projects with multiple .tolk source files, @stdlib/* and @fiftlib/* imports
๐Ÿ”— Deployment LinksGenerate ton:// deeplinks and Tonkeeper URLs for wallet deployment
๐Ÿš€ Zero ConfigurationRuns 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

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "tolk": {
      "command": "npx",
      "args": ["-y", "iz-tolk-mcp"]
    }
  }
}
Claude Code
claude mcp add tolk -- npx -y iz-tolk-mcp
Cursor

Add to .cursor/mcp.json:

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

Add to ~/.windsurf/mcp.json:

{
  "mcpServers": {
    "tolk": {
      "command": "npx",
      "args": ["-y", "iz-tolk-mcp"]
    }
  }
}
VS Code (Copilot)

Add to .vscode/mcp.json:

{
  "servers": {
    "tolk": {
      "command": "npx",
      "args": ["-y", "iz-tolk-mcp"]
    }
  }
}
Local build (any client)
{
  "mcpServers": {
    "tolk": {
      "command": "node",
      "args": ["/absolute/path/to/izTolkMcp/dist/cli.js"]
    }
  }
}

๐Ÿ› ๏ธ MCP Tools

๐Ÿ” get_compiler_version

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

ParameterTypeRequiredDescription
(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.

ParameterTypeRequiredDescription
entrypointFileNamestringโœ…The main .tolk file to compile (e.g., "main.tolk")
sourcesobjectโœ…Map of filename -> source code. Must include the entrypoint file.
optimizationLevelnumberโ€”Optimization level 0-2 (default: 2)
withStackCommentsbooleanโ€”Include stack layout comments in Fift output
pathMappingsobjectโ€”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.

ParameterTypeRequiredDescription
entrypointFileNamestringโœ…The main .tolk file to check
sourcesobjectโœ…Map of filename -> source code
pathMappingsobjectโ€”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.

ParameterTypeRequiredDescription
codeBoc64stringโœ…Base64-encoded BoC of compiled contract code (from compile_tolk)
initialDataBoc64stringโ€”Base64-encoded BoC for initial data cell (default: empty cell)
workchainnumberโ€”Target workchain ID (default: 0)
amountstringโ€”Deploy amount in nanoTON (default: "50000000" = 0.05 TON)

๐Ÿ“„ MCP Resources

ResourceURIDescription
๐Ÿ“˜ language-guidetolk://docs/language-guideComplete Tolk language syntax reference
๐Ÿ“— stdlib-referencetolk://docs/stdlib-referenceStandard library modules and functions reference
๐Ÿ“‹ changelogtolk://docs/changelogTolk compiler version history from v0.6 to latest
๐Ÿ”„ tolk-vs-functolk://docs/tolk-vs-funcFunC to Tolk migration guide โ€” key differences and comparison
๐Ÿ“ example-countertolk://examples/counterSimple counter smart contract example in Tolk
๐Ÿ’Ž example-jettontolk://examples/jettonJetton (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.

ArgumentTypeRequiredDescription
descriptionstringโœ…Description of what the smart contract should do
contractTypestringโ€”"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.

ArgumentTypeRequiredDescription
codestringโœ…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.

ArgumentTypeRequiredDescription
errorMessagestringโœ…The compilation error message from the Tolk compiler
codestringโœ…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:"

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

Related MCP Servers

modelcontextprotocol/server-postgresVerified

๐Ÿ“‡ ๐Ÿ  - PostgreSQL database integration with schema inspection and query capabilities

๐Ÿ—„๏ธ Databases1 views
Aiven-Open/mcp-aiven

๐Ÿ โ˜๏ธ ๐ŸŽ–๏ธ - Navigate your Aiven projects and interact with the PostgreSQLยฎ, Apache Kafkaยฎ, ClickHouseยฎ and OpenSearchยฎ services

๐Ÿ—„๏ธ Databases0 views
alexanderzuev/supabase-mcp-server

Supabase MCP Server with support for SQL query execution and database exploration tools

๐Ÿ—„๏ธ Databases0 views
aliyun/alibabacloud-tablestore-mcp-server

โ˜• ๐Ÿ โ˜๏ธ - MCP service for Tablestore, features include adding documents, semantic search for documents based on vectors and scalars, RAG-friendly, and serverless.

๐Ÿ—„๏ธ Databases0 views

Engagement

Views
0
Installs
0
Upvotes
0

Views and upvotes are unique per visitor network (hashed IP). Installs count copy actions.

Status

Health: Not checked yet

We have not completed a health check for this listing yet.

No check timestamp yet.

Unclaimed listing (imported or pending owner verification). Claim it โ†’
โ˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.