Interop

AI Agents and MCP

One fetchable file that teaches an assistant to write correct Topaz, and an MCP server for assistants that can also verify what they wrote.

Outcome: point a fetch-capable or tool-enabled assistant at this language.

Prerequisite: none for the first section. The MCP server needs the toolchain installed as described in First Program.

Start with one fetch

For an assistant that can retrieve a URL but has no tools configured, the widest common surface is a single self-contained file.

https://topaz.ooo/agents.md

It carries the shape of a file, the forms, the host/profile boundary, and the section that matters most for a model that already knows other languages: an explicit list of non-forms. It warns against Vec<T>, async, try, class syntax, and treating null as universal absence, while preserving the supported T | null data-boundary form. Naming those distinctions prevents confident guesses from becoming invalid source.

Several machine surfaces sit beside it. https://topaz.ooo/llms.txt is the compact index, while https://topaz.ooo/llms-full.txt contains the complete English manual as plain Markdown. Every English page is also available at https://topaz.ooo/docs/<slug>.md, with its title, source route, and covered specification sections preserved in frontmatter. https://topaz.ooo/version.json states which version answers.

If you are configuring an assistant for someone else, giving it that one URL is the whole setup.

The problem the tools solve

Fetching gets an assistant to correct forms. It does not tell it whether the program it just wrote actually compiles.

An assistant writing an unfamiliar language does one of two things. It reads documentation and guesses, or it writes, gets told exactly what is wrong, and fixes it. The second loop produces working code even when documentation is thin. The first produces confident text that does not compile. A reference alone leaves an assistant in the first loop. A checker moves it to the second.

Four published tools

ToolWhat it answers
topaz_specWhat is the exact form for this part of the language?
topaz_examplesShow me verified code for this concept.
topaz_checkIs what I just wrote correct, and if not, exactly where?
topaz_runWhat does this program return inside the no-capability run boundary?

topaz_check returns the compiler's own diagnostics, codes, and source positions without rewriting them. topaz_run first performs that check and then starts a fresh worker. Both tools report the exact installed toolchain and compiler selection that answered, so an assistant can correct its output from evidence rather than a paraphrase.

Execution boundary

Each topaz_run call starts the hidden worker in the same installed Topaz executable with a fresh no-capability host. It has no filesystem, network, discovery, callback, component, or fallback route. The server admits two active runs, queues none, applies a five-second wall limit and a one MiB response limit, and kills and reaps cancelled or limited workers. Submitted source is sent through stdin and is neither logged nor retained.

This authoring boundary is available on every supported native Topaz target. It is not ordinary unrestricted topaz run, but it is also not an operating system sandbox or a hard CPU or RSS bound. Do not submit adversarial code.

Machine-readable descriptor

Clients and crawlers can read the server description directly.

https://topaz.ooo/mcp.json

It lists the four tools, their inputs, the built-in command, resource boundary, and installed self-check values in structured form.

Current status

Topaz 5.18.1 includes the MCP server and worker in the native topaz executable. Installing Topaz installs the MCP server. There is no separate archive, checksum, server path, worker path, or admission path.

Install and connect

Install Topaz, then configure this local stdio command.

JSON
{
  "command": "topaz",
  "args": ["mcp", "serve"]
}

After connecting, the client must discover exactly topaz_spec, topaz_examples, topaz_check, and topaz_run. The verification block in mcp.json provides a known reference section, example concept, clean source check, and pure run with value 42. These let a client confirm the installed server instead of trusting configuration alone.

Ready to continue when

You can use exact reference material, repair a program from compiler diagnostics, and run pure source through the installed no-capability worker.

For what a program can and cannot reach, see Interop Boundaries. For the forms an assistant will be looking up, see Syntax at a Glance.