mort-mcp
Click on "Deploy 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., "@mort-mcp write a Mort function that sums a list, then type-check it"
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.
mort-mcp
Let an AI agent write a language it has never seen.
Mort is a statically typed systems language that compiles to C. It's the language MORT OS is written in. No model has Mort in its training data, so an agent asked to write it will guess Rust-like syntax and get it wrong.
mort-mcp gives the agent what a human newcomer would use: a fast type checker with precise errors, a way to run programs, the language spec to search, and the exact signatures of the standard library.
> mort_check
FAILED:
error: <source>:4:1: argument 1 of 'strings.starts_with' expects []const u8, got *u8
if strings.starts_with("mortos", "mort") {
> mort_std strings
// First byte offset of `needle` in `text`, or None if it does not occur.
pub fn index_of(text: []const u8, needle: []const u8) -> Option<u64>;
...
> mort_run
[exit 0]
1Install
You need the Mort compiler. The simplest setup is a checkout, which also brings the docs and examples:
git clone https://github.com/0xmortuex/Mort
pip install mort-mcp ziglang # ziglang = zero-install C backend for mort_run
claude mcp add mort --env MORT_HOME=/path/to/Mort -- mort-mcpWithout MORT_HOME, mort-mcp uses a mortc on your PATH
(pip install git+https://github.com/0xmortuex/Mort). Checking, running and std
lookup all work that way. mort_docs and mort_examples need the checkout.
Related MCP server: lean-lsp-mcp
Tools
Tool | What it does |
| Type-check |
| Compile and run, with |
| Show the generated C. |
| Format with the official formatter ( |
| List std modules, or show one module's public API: exact signatures, struct fields and doc comments. |
| Search the language specification and reference docs, e.g. "resource struct cleanup" or "integer overflow". |
| List or read the compiler's example programs. |
| Compiler and language version, and where the compiler was found. |
Every tool calls mortc through its command-line interface, and reads std signatures
and docs from the installed compiler. Answers therefore match the version you're
running, even as the language changes.
Tests
pip install ".[test]" "ruff==0.16.0" "mypy==2.3.0" ziglang
ruff check src tests && mypy --strict src
MORT_HOME=/path/to/Mort pytest testsWithout MORT_HOME, only the unit tests and the MCP handshake test run. CI checks
out the latest Mort and also runs every night, so a change to the compiler's CLI or
docs layout shows up as a failing build.
License
MIT
Available Tools
8 toolsmort_checkA
Type-check Mort code without building it (fast; needs no C compiler).
Pass source (a whole program as text) and/or files (paths to .mx
files compiled together as one program). Returns OK or the compiler's
diagnostics with file:line:column and the offending source line.
Inputs: files, source, warn_unused. Returns: result
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.
Inputs: query (required), limit. Returns: result
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.
Inputs: files, source, freestanding. Returns: result
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.
Inputs: name. Returns: result
mort_formatB
Format Mort source with the official formatter (mortc fmt) and
return the formatted text.
Inputs: source (required). Returns: result
mort_runA
Compile Mort code to a native binary and run it, capturing its output.
Needs a C compiler (cc/gcc/clang, or pip install ziglang). stdin is
fed to the program, args are its command-line arguments, and it is
killed after timeout_s. Reports compile errors the same way mort_check does.
Inputs: args, files, stdin, source, +2 more. Returns: result
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.
Inputs: module. Returns: result
mort_versionA
Report the Mort compiler version, language version and where it was found.
Inputs: no named parameters. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
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.
Maintenance
Related MCP Connectors
AI-native programming language and toolchain for accountable, verifiable agent-driven development.
Deterministic reasoning stack for AI agents: simulate, decide & compute, plus cross-domain tools.
Shared control plane for AI coding agents — tasks, memory, decisions, file locks. 12 tools.
Write, compile and share Typst documents (papers, slides, drawings) from any AI agent.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceExposes type-aware code navigation and fast file search to AI agents via language servers, enabling definitions, references, symbols, and file lookup without reading entire codebases.1,791 npmMIT
- AlicenseAqualityBmaintenanceEnables AI coding agents to perform Lean 4 formal verification, navigate project symbols offline, and inspect C FFI bindings.52Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to syntax-check generated configuration and code — such as JSON, Docker Compose, Python, and Bash — against native local engines via a validate_and_format_code tool, returning structured errors that trigger self-correction loops until the output actually compiles.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to retrieve hyper-targeted, token-efficient context from a codebase by querying a locally built AST knowledge graph, and to persist cross-session agent memory through 17 MCP tools. All indexing and retrieval run entirely offline, so proprietary code never leaves the machine.24 PyPI1MIT