AI Assistants & MCP

rnx mcp serves the toolchain over the Model Context Protocol on stdio, so an AI agent can check, run, format, and explain Rasmalai code without shelling out. Ten tools: check, run (interpreter, 30s cap), fmt, explain, version, rasmalai_lookup_symbol (@std/* signature search), inspect_package_capabilities (package security audit), eval_code (persistent JIT session), get_diagnostics (structured JSON diagnostics), and hot_reload (needs an attached rnx dev --mcp watcher). Stdout carries protocol frames only; everything works on self-contained snippets.

Pick your harness below. Every entry follows the same trio — rnx on PATH, a server entry with command/args, and one command to verify — then a manual section covers anything else.

Agents typically start by typechecking a snippet like this one through the check tool before touching your files:

.rnx
let total = [10, 20, 30].reduce(0, (acc, n) => acc + n);
assert(total == 60, "sum");

Claude Code & Desktop

Claude Code registers from the terminal:

sh
claude mcp add rnx -- rnx mcp

Verify with /mcp inside a session; the rnx server lists ten tools.

Claude Desktop takes the same server in its JSON config — macOS ~/Library/Application Support/Claude/claude_desktop_config.json (Windows %APPDATA%\Claude\, Linux ~/.config/Claude):

json
{
  "mcpServers": {
    "rnx": { "command": "rnx", "args": ["mcp"] }
  }
}

Restart Desktop after editing.

Codex

Codex CLI reads ~/.codex/config.toml:

toml
[mcp_servers.rnx]
command = "rnx"
args = ["mcp"]

Cursor

Project file .cursor/mcp.json (global: Cursor Settings -> MCP -> Add):

json
{
  "mcpServers": {
    "rnx": { "command": "rnx", "args": ["mcp"] }
  }
}

Pi

Global ~/.pi/agent/mcp.json, or .mcp.json in a trusted project:

json
{
  "mcpServers": {
    "rnx": { "command": "rnx", "args": ["mcp"] }
  }
}

Reload with /mcp reload.

omp omp

Project .omp/mcp.json, or user ~/.omp/mcp.json (/mcp add walks you through it, /mcp test rnx checks the connection):

json
{
  "mcpServers": {
    "rnx": { "type": "stdio", "command": "rnx", "args": ["mcp"] }
  }
}

opencode

opencode.json in the project (or ~/.config/opencode/opencode.json globally):

json
{
  "mcp": {
    "rnx": { "type": "local", "command": ["rnx", "mcp"] }
  }
}

Hermes agent

~/.hermes/config.yaml under the top-level mcp_servers key (that key name is load-bearing — mcp: servers: will not load):

yaml
mcp_servers:
  rnx:
    command: "rnx"
    args: ["mcp"]

Test with hermes mcp test rnx, then /reload-mcp in a live session.

Cline

Open Cline: Open MCP Settings from the VS Code command palette (cline_mcp_settings.json), then add:

json
{
  "mcpServers": {
    "rnx": { "command": "rnx", "args": ["mcp"] }
  }
}

Goose

~/.config/goose/config.yaml (or goose configure -> Extensions -> Add extension):

yaml
extensions:
  - name: "rnx"
    enabled: true
    transport:
      type: "stdio"
      command: "rnx"
      args: ["mcp"]

Manual setup for the rest

Any harness that spawns a stdio MCP server needs exactly three things: the rnx binary on PATH, command set to rnx with args set to ["mcp"], and a clean stdout (the server reserves it for protocol frames; logs go to stderr). Verify by hand before blaming the harness:

sh
printf '%s\n' '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"t","version":"0"}}}' '{"jsonrpc":"2.0","method":"notifications/initialized"}' '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' | rnx mcp

Expect serverInfo.name of rnx-mcp and ten tools. If a harness rejects the server, check that it passes through env/cwd untouched and that no wrapper writes banners to stdout.

Treat rnx mcp as local-trust software: run executes the code it is given with your user privileges, capped at 30 seconds per call. The full tool table and protocol notes live in the CLI reference.