# edict

Provides an agent compiler without a parser, letting models generate programs directly as JSON AST and compile them into WebAssembly.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 13
- Author: Sowiedu
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Sowiedu/Edict
- Updated: 2026-10-17
- HTML: https://affpapa.org/en/nevibecode/mcp/edict

## What it does

Edict bypasses standard text syntax entirely. Instead of parsing text files, the compiler expects the language model to supply abstract syntax trees as JSON objects. The language includes static typing and effect tags such as input-output markers or failure flags. When a check fails, the tool sends back structured diagnostics so the agent can adjust its payload.

Contract verification relies on Z3 to evaluate assertions during the build stage. If an invariant breaks, the solver outputs a counterexample explaining the defect. Passing trees are transformed into WebAssembly binaries through an internal encoder. Execution occurs inside a sandboxed environment without default operating system privileges.

Without configured host adapters, the binary cannot touch disk paths or initiate network requests. Memory caps and execution timeouts guard runtime execution.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add edict -- npx -y edict-lang
```

### Codex

**Platform CLI**
```bash
codex mcp add edict -- npx -y edict-lang
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "edict": {
            "command": "npx",
            "args": [
                "-y",
                "edict-lang"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "edict": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "edict-lang"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add edict npx -y edict-lang
```

## When to use it
- generate programs as JSON abstract syntax trees without text parsing
- verify function types and side effects ahead of execution
- validate pre- and post-conditions with SMT-based contract proofs
- compile validated trees into WebAssembly modules inside a sandbox
- receive structured failure feedback for autonomous code repair

## Example prompts
- Inspect the AST specification using `edict_schema` before building the program
- Validate types, effects, and contracts with `edict_check` for this JSON tree
- Compile the verified AST with `edict_compile` and execute it via `edict_run`

## Similar
- [wasm-emscripten](https://affpapa.org/en/nevibecode/skills/wasm-emscripten.md) — skill · 513 installs
- [wasm-agent](https://affpapa.org/en/nevibecode/skills/wasm-agent.md) — skill · 739 installs
- [edict-multi-agent-orchestration](https://affpapa.org/en/nevibecode/skills/edict-multi-agent-orchestration.md) — skill · 1400 installs
- [llvm](https://affpapa.org/en/nevibecode/skills/llvm.md) — skill · 899 installs
- [blazor](https://affpapa.org/en/nevibecode/skills/blazor.md) — skill · 798 installs
- [blazor-expert](https://affpapa.org/en/nevibecode/skills/blazor-expert.md) — skill · 688 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
