tolk-mcp-server
Provides tools for compiling Tolk smart contracts for the TON blockchain, including syntax validation, compilation with options (optimization, stack comments), and exploration of contract examples and reference documentation.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@tolk-mcp-servercompile a simple counter contract"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Related MCP server: iz-tolk-mcp
Quick Start
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"tolk": {
"command": "npx",
"args": ["-y", "tolk-mcp-server"]
}
}
}Cursor / Windsurf
Add to your MCP settings:
{
"tolk": {
"command": "npx",
"args": ["-y", "tolk-mcp-server"]
}
}From Source
git clone https://github.com/oxgeneral/tolk-mcp-server.git
cd tolk-mcp-server
npm install
npm run build
npm startUsage Examples
Compile a contract
> Use the compile_tolk tool to compile this contract:
fun onInternalMessage(myBalance: int, msgValue: int, msgFull: cell, msgBody: slice) {
}
get fun hello(): int {
return 42;
}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
> Use check_tolk_syntax to validate my contract before deployingReturns OK + code hash, or a detailed error with line/column info.
Multi-file contracts
Pass all files in the sources parameter:
{
"entrypointFileName": "main.tolk",
"sources": {
"main.tolk": "import \"./utils.tolk\";\nfun onInternalMessage(...) { ... }",
"utils.tolk": "fun helper(): int { return 1; }"
}
}Standard library imports (@stdlib/*) are resolved automatically by the compiler.
Compiler Options
Option | Type | Default | Description |
| 0-2 | 2 | 0 = none, 1 = basic, 2 = full |
| bool | false | Add stack layout comments to Fift output |
| string | "" | Space-separated experimental compiler flags |
Requirements
Node.js >= 18
No external dependencies beyond npm packages
Development
npm install
npm run dev # Run with tsx (hot reload)
npm run build # Compile TypeScript
npm test # Run testsLicense
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceA production-ready Model Context Protocol server implementation that connects AI assistants to the TON blockchain, allowing them to query wallet balances, transaction details, smart contracts, and other blockchain data.Last updatedMIT
- AlicenseAqualityCmaintenanceMCP server for the Tolk smart contract compiler on the TON blockchain. Compile, syntax check, deploy link generation, language docs, stdlib, and contract prompts.Last updated4602MIT

MIDL MCP Serverofficial
FlicenseAqualityDmaintenanceEnables AI assistants to interact with the MIDL blockchain, supporting smart contract deployment, balance queries, asset bridging, Bitcoin Rune management, and more through natural language.Last updated291- Alicense-qualityCmaintenanceEnables LLMs to compile and verify Tolk smart contract code for the TON blockchain.Last updated1MIT
Related MCP Connectors
MCP tools for TON Sites, TON DNS and TON Storage.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/oxgeneral/tolk-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server