Tolk Server
FreeNot checkedCompile, validate, and explore TON smart contracts using the Tolk compiler from any MCP-compatible AI assistant.
About
Compile, validate, and explore TON smart contracts using the Tolk compiler from any MCP-compatible AI assistant.
README
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:
{
"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 start
Usage 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 deploying
Returns 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 |
|---|---|---|---|
optimizationLevel |
0-2 | 2 | 0 = none, 1 = basic, 2 = full |
withStackComments |
bool | false | Add stack layout comments to Fift output |
experimentalOptions |
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 tests
License
MIT
Installing Tolk Server
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/oxgeneral/tolk-mcp-serverFAQ
Is Tolk Server MCP free?
Yes, Tolk Server MCP is free — one-click install via Unyly at no cost.
Does Tolk Server need an API key?
No, Tolk Server runs without API keys or environment variables.
Is Tolk Server hosted or self-hosted?
A hosted option is available: Unyly runs the server in the cloud, no local setup required.
How do I install Tolk Server in Claude Desktop, Claude Code or Cursor?
Open Tolk Server on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
by modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
by xuzexin-hzMCP-Agent
A simple, composable framework to build agents using Model Context Protocol by [LastMile AI](https://www.lastmileai.dev)
by lastmile-aiSpring AI MCP Client
Provides auto-configuration for MCP client functionality in Spring Boot applications.
mcp.natoma.ai
A Hosted MCP Platform to discover, install, manage and deploy MCP servers by [Natoma Labs](https://www.natoma.ai)
MCPHub
Website to list high quality MCP servers and reviews by real users. Also provide online chatbot for popular LLM models with MCP server support.
MCP Servers Rating and User Reviews
Website to rate MCP servers, write authentic user reviews, and [search engine for agent & mcp](http://www.deepnlp.org/search/agent)
mkinf
An Open Source registry of hosted MCP Servers to accelerate AI agent workflows.
Compare Tolk Server with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All ai MCPs
