mort-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MORT_HOME | No | Path to a Mort compiler checkout. Without MORT_HOME, mort-mcp uses a `mortc` on your PATH; in that case checking, running and std lookup all work, but `mort_docs` and `mort_examples` need the checkout. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Write, type-check and run programs in Mort, a statically typed systems language that compiles to C (github.com/0xmortuex/Mort). You have not seen Mort in training - look things up before guessing: mort_docs for language rules (search the spec), mort_std for a std module's exact signatures. Loop: write code -> mort_check (fast, no C compiler) -> fix diagnostics -> mort_run. Programs start at fn main() -> int; statements end with ;; std modules are imported with import std.strings; and called as strings.trim(...). String literals are *u8, not slices: pass one to a []const u8 parameter as slice("text" as *const u8, 4). mort_examples has known-good programs.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| mort_versionA | Report the Mort compiler version, language version and where it was found. |
| mort_checkA | Type-check Mort code without building it (fast; needs no C compiler). Pass |
| mort_runA | Compile Mort code to a native binary and run it, capturing its output. Needs a C compiler (cc/gcc/clang, or |
| mort_emit_cA | Show the C that Mort generates for a program (useful to see what a construct compiles to, or to debug codegen). freestanding=True emits bare-metal C (no libc, no main) as used for the MORT OS kernel. |
| mort_formatB | Format Mort source with the official formatter ( |
| mort_stdA | Look up the standard library. With no module: list every std module. With a module (e.g. "strings" or "std.vec"): its public functions, structs and enums with exact signatures and doc comments, read from the installed compiler's source. |
| mort_docsA | Search the Mort language specification and reference docs. Returns the best-matching sections, e.g. query="resource struct cleanup", "integer overflow", "slices", "error propagation ?". Requires MORT_HOME (a Mort checkout) since pip installs don't ship the docs. |
| mort_examplesA | List the compiler's bundled example programs, or show one by name. Examples are known-good Mort - a fast way to learn idioms. Needs MORT_HOME. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 8 tools
Each tool has a clearly distinct purpose: compiling+running (mort_run) vs type-checking only (mort_check), codegen inspection (mort_emit_c), formatting, std API lookup, doc search, examples, and version. The only mild adjacency is mort_std vs mort_docs, but descriptions sharply separate API-signature lookup from prose spec search.
All tools share a consistent mort_ prefix with short, predictable suffixes. A few suffixes are bare nouns (std, docs, examples, version) while others are verbs (run, check, format, emit_c), but the pattern stays readable and recognizable.
Eight tools is well-scoped for a language toolchain MCP, with no redundant or filler tools. Each earns its place in a typical compile/inspect/learn workflow.
Covers the core lifecycle: check, run, emit C, format, plus discovery via std/docs/examples and version. Minor gaps exist (e.g. no project scaffolding, test runner, or LSP-style completion), but agents can work around these.