Compiler-as-MCP-server for the Hirð language (typed actors and effect rows on the BEAM): type inference, definition lookup, effect-row explanation, IR fragments, actor protocol and supervision graphs, and token-budget-aware symbol summaries, so agents query the compiler instead of reading source. Errors come back structured, so an agent can self-correct from tool output alone. cargo install --git https://github.com/no-materials/hird hird-mcp
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent — or use 1-click editor setup below.
💡 Paste the JSON block into your client's configuration file under mcpServers, then restart the application.

A hirð is a Norse king's household guard: sworn retainers, each with a named duty, answerable to one lord. Illustration by Erik Werenskiold for Magnús Erlingsson's saga in Snorri's Heimskringla (public domain, via Wikimedia Commons).
A typed language for long-running agent systems on BEAM: effect-row tracking, auditable tool effects, typed actors, and OTP supervision. Python agent frameworks hide side effects in coroutine soup; Hirð makes every tool call, every actor message, and every supervisor boundary visible in the types and queryable by tooling.
What that buys: deterministic replay of real agent traffic. Every
tool call is recorded unconditionally in a canonical wire format, so a
recorded run is a file you can replay — the same calls, in the same
order, each served the result the recorded run got back, with no service
contacted. That is a regression test with no oracle to maintain, a bug
report that reproduces, and a fixed environment to evaluate a change in.
It is also not something you can retrofit onto a framework that hides
its side effects: it needs the effects in the types and a single
dispatch path underneath them. hird demo is that claim in one command:
it records a run of the demo planner, replays that one recording against
three variants of the program, and prints where each parted from it.
And systems that stand. A Hirð program is not a script that exits:
fn main can start a supervision tree and stand, leaving typed actors
serving after its own work is done — driving their own periodic rounds
off a clock capability, crashing and restarting under a declared budget,
every round on the audit stream. hird run demo/agent_fleet is that
claim running: a hirð of three retainers that keeps working through a
deliberate crash.
Status: pre-1.0 and experimental. The v0.1 compiler pipeline works
end to end (the demos below type-check, compile to Erlang, and run on
BEAM), but the language surface is unstable, nothing is published to
crates.io, and breaking changes land without deprecation cycles. The
roadmap lives in the in-repo issue tracker (see .beads/README.md).
Prebuilt binaries for Linux, macOS, and Windows are attached to every
release: extract the
archive for your platform and put hird (the compiler), hird-lsp, and
hird-mcp on your PATH.
From source, with Rust 1.97 or newer:
With Nix, the same three binaries are flake outputs
(nix run github:no-materials/hird#hird-mcp).
Compiling and running programs needs Erlang/OTP on PATH
(apt install erlang, brew install erlang, …); hird check works
without it.
Hirð has no ambient print. Anything a program tells the outside world
goes through a tool — a declared, typed, audited external operation —
so the smallest observable program is a tool call. Save this as
hello.hird:
Three things happened. Declaring tool Say created the effect
Tool<Say> and a callable say. The handle block supplied an
implementation and discharged that effect, so main is honestly ! {}.
And the call was recorded on the audit stream — unconditionally, because
mocked and real tool calls audit identically. ASCII operator spellings
(->) normalise to their Unicode forms (→) at lex time, so either is
legal input.
| Command | What it does |
|---|---|
hird check <file-or-dir> | type- and effect-check; coded diagnostics |
hird build <file-or-dir> | emit readable Erlang, compile it to .beam |
hird run <file-or-dir> | build, then execute fn main on BEAM |
hird demo | record one run of the built-in demo, replay it against variants of the program |
hird emit-ast <file> --json | the typed IR of every definition |
hird emit-effect-graph <file-or-dir> --json | actors, mailboxes, handler rows, supervisors, tools |
docs/writing-hird-human.md is the guided
tour, and phrasebook.md the dense syntax reference.
A hirð is retainers with named duties; demo/agent_fleet/ is the
metaphor made literal. Three supervised actors serve for as long as the
program stands: a Planner ticks itself on a clock and forges each
round's order (pure planning imported from a second module — the source
spans a real use boundary), an Executor carries the order out
through Tool<RunErrand> and reports onward, an Auditor chronicles
every outcome through Tool<Chronicle>. Round 3 crashes the executor
on purpose: FleetSup restarts rest_for_one, so the auditor —
downstream of the crash — restarts with it, the planner keeps its round
counter, and the rounds keep coming. Actor state dies with its process;
the audit stream is the durable record.
Round 3 never beats — the crash consumed its order — and the two re-posted inits are the supervisor's work, visible in the same stream as everything else. The tree itself is queryable; its effect graph is the system's live org chart, every retainer with its duty and its effects:
demo/agent_planner.hird drives one planning round against a supervised
Planner: repository state in through Tool<ReadRepo>, pure analysis,
tickets out through Tool<CreateTicket>, progress through Tool<Log>.
Every tool invocation — mocked or real — lands on the audit stream, one
canonical JSON line per call:
Because the stream is complete — every call, full arguments, tagged result — a recorded run is a replayable environment:
The replay cursor outranks every handle and install block, so no
tool runs and no service is contacted; each call receives its logged
result, failures included. Matching is strict: the call at each position
must be the one the log recorded there, or the run crashes with a
replay_divergence naming the position, the recorded call and the
offered one — and a log the run did not read to the end fails too.
So a checked-in recording is a regression test with no oracle to
maintain: demo/agent_planner.golden.jsonl is one run of the planner,
replayed by the demo suite in CI, and the build fails the moment the
program's decisions drift from it. And because the log serves every
result, one recording is a fixed environment to compare variants of a
program in — every arm meets a byte-identical world, so what differs is
attributable to the programs:
That evaluation is hird demo: no arguments, nothing to install beyond
Erlang, and nothing checked in that it has to be trusted about — it
writes the planner and the two edited variants into _build/hird-demo,
records the episode itself, and replays it against all three.
docs/audit-evidence.md states what the
stream guarantees and what it does not;
docs/tool-effects.md is the normative format
and replay specification.
hird-mcp is a Model Context Protocol server over the same compiler
pipeline, speaking stdio. It gives LLM agents structured compiler
queries instead of source-reading guesswork: check_file (every
diagnostic of a program, warnings included), list_definitions (a
module outline with per-symbol token costs), infer_type,
lookup_definition, explain_effect_row, render_ir_fragment,
explain_actor_protocol, emit_actor_effect_graph,
get_context_for_symbol (token-budget-aware symbol summaries), and
get_context_budget. Errors come back structured — undefined names
list the available ones, parse and type errors carry coded
diagnostics — so agents can self-correct from tool output alone.
No reviews yet — be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/no-materials-hird)<a href="https://allmcps.com/mcp/no-materials-hird"><img src="https://allmcps.com/api/badge/no-materials-hird?style=directory" alt="Hird on AllMCPs" /></a>