Using ThicketScript with AI agents
AI coding agents write better ThicketScript when they can check their work against the real compiler. ThicketScript gives them two ways in:
thicket mcp, a Model Context Protocol server built into thethicketprogram. It answers diagnostics, module APIs and symbol lookups for the exact version you have installed./llms.txtand/llms-full.txt, plain-text copies of these docs for agents that read the web.
Downloads are coming soon
Once you have thicket, everything on this page works with no extra install. There is no hosted server and no account.
Start the server
thicket mcp talks MCP over stdio: JSON-RPC 2.0, one JSON object per line. Stdout carries only protocol messages; warnings go to stderr. Your agent starts it for you, so you rarely run it by hand.
Start it in your project directory. On startup it loads the project's own types from thicket.json in the current directory, and workspace symbol search scans the .tks files under it. It skips .git, build, node_modules and .tks-cache, stops after 5,000 files, and never writes a cache into your source tree.
Connect your agent
Any MCP client that can launch a stdio server needs only this:
json
{ "command": "thicket", "args": ["mcp"] }Claude Code
Run this in your project directory:
sh
claude mcp add thicket -- thicket mcpCursor and other editors
Editors that read an mcpServers block (Cursor's .cursor/mcp.json, for example) take:
json
{
"mcpServers": {
"thicket": {
"command": "thicket",
"args": ["mcp"]
}
}
}If thicket is not on your PATH, use its full path as command.
Tools
Paths can be absolute or relative to the directory the server started in. Line and column numbers are 1-based, in both arguments and results, which print locations as path:line:column.
get_diagnostics(optionalpath): Runsthicket checkon the file, or on the project whenpathis left out, and returns its output and exit status.list_modules(no arguments): The built-in and host declaration modules, the same list asthicket types list.get_module_api(module): A module's full declaration file with its doc comments, the same asthicket types print <module>.get_symbol(path,line,column): Hover text for the symbol at that position, plus where it is defined.get_references(path,line,column): Every reference to the symbol at that position, including its declaration.get_document_symbols(path): The outline of one file: its classes, structs, functions, methods and so on, with positions.find_symbols(query): Symbols across the project whose names matchquery.
The answers come from the same language server that powers the IDE plugin, so an agent sees the same hovers, definitions and errors you do.
A good loop for agents
- Call
list_modules, thenget_module_apifor the modules the task touches, before writing code against them. - Write the code.
- Call
get_diagnosticsand fix what it reports. Repeat until it is clean. - Use
get_symbolandget_referencesbefore renaming or changing a signature.
You can give your agent that loop in its instructions file (for example CLAUDE.md or AGENTS.md) along with a link to this page.
llms.txt
https://thicketscript.com/llms.txt follows the llms.txt format: a short summary of ThicketScript and a link to every docs page. https://thicketscript.com/llms-full.txt is the full text of the docs in one file, for agents that want it all in context at once.
The API reference is generated from the same declaration files get_module_api prints. For the version you have installed, prefer the MCP server; it is never out of date.