Elyra
Elyra The coding agent eTerm The terminal that knows where each command ends Huskarl AI colleagues on your own Mac Starf An activity monitor for Apple silicon that never invents a number etrans An SSH and SFTP client for macOS Elyra VM Virtual machines for macOS, Linux and Windows on your Mac Litr A small, native web browser for macOS Notr A notebook for macOS e The native code editor Elyra Grove Native local development environment Askr The real server for Laravel & PHP Elyra Framework Rust + Svelte 5 framework for desktop apps Elyra Conductor Local project conductor Refr Local-first PDF workspace for macOS Elyra Workspace A desktop workspace for coding agents eDock A container runtime for the Mac Elyra SQL Server MySQL-compatible SQL server in Rust Elyra Félagi Agents as teammates on one board Elyra SQL Client Native desktop SQL workbench Elyra SQL Anywhere Replication-ready SQL engine Elyra Sjá SEO & GEO workspace for macOS Elyra DataGrid Server-driven data grid for Laravel
Reference
Ratatosk CLI
Roadmap
RFC 0001: make:resource
RFC 0002: live queries
RFC 0003: MCP server
RFC 0004: MCP resource templates
RFC 0005: a Laravel backend
RFC 0006: Laravel broadcasting
RFC 0007: offline and sync
RFC 0008: Laravel notifications
RFC 0009: Files
RFC 0010: Laravel abilities
RFC 0011: an assistant in the app
RFC 0012: @elyra/ui
RFC 0013: the assistant sees the window
RFC 0014: Elyra Inspector
RFC 0015: presence
RFC 0016: capabilities per window
RFC 0017: record invalidation
RFC 0018: the assistant's answer, streamed
RFC 0019: a window from the tray
RFC 0020: an app that stays in the tray
RFC 0021: a server chosen at sign-in
RFC 0022: signed in to more than one server
RFC 0023: private channels a window listens to
RFC 0024: updates from the backend
RFC 0025: commands and configuration
RFC 0026: the running app, for coding agents
RFC 0027: the assistant's code mode
RFC 0028: the tray's icon, and the app's
RFC 0029: installers
RFC 0030: the app's identity on Windows
RFC 0031: a token per workspace
RFC 0032: the microphone
RFC 0033: diagnostics the user can send
RFC 0034: one screen in several states at once
RFC 0035: point at it, and hand it to the agent
RFC 0036: rata check, the app checked as a whole
RFC 0037: Theme Studio
RFC 0038: edit it in its own app
RFC 0039: a write shown at once in every window
RFC 0040: the two halves agree
RFC 0041: Quick Look
RFC 0042: follow a colleague
RFC 0043: every write seen
RFC 0044: composite keys
RFC 0045: bigint all the way
RFC 0046: pivot columns
RFC 0047: relations on any key
RFC 0048: more providers
RFC 0049: OpenAI web search
RFC 0050: integer-keyed arguments
RFC 0051: citations
RFC 0052: open documents
RFC 0053: exit hooks
RFC 0054: the gui feature
Release notes
Changelog
Elyra

AI agents (MCP)

An Elyra app can be an MCP server: an AI agent in Claude, Cursor or VS Code calls the commands you choose, as tools. They are the same commands the frontend calls, through the same middleware and validation. Nothing is exposed until you say so. The design is RFC 0003.

In five lines

App::new()
    .commands(resources::commands())
    .mcp(Mcp::new()
        .allow_abilities(["customers.view", "customers.create"])
        .allow_ability("customers.delete")
        .confirm("customers.delete"))
rata mcp inspect      # what the agent will see
rata mcp install      # the config that connects Claude to this app

The client launches myapp --mcp. If the app is open, the agent works in it: the windows update as it adds a customer. If it isn't, the app runs headless, without a window.

What's a tool

A command is a tool when the ability its #[command(can = "…")] declares is granted with Mcp::allow_ability / allow_abilities. An exact name or a namespace (customers.*) works. A command without an ability is never a tool. This grant is separate from the frontend's App::allow_abilities.

Each tool is a projection of its command:

MCP From
name the command's name (customers_store)
description its /// doc comment
inputSchema a JSON Schema of its arguments, built from the specta types, after serde's renames, tagging and flattening
outputSchema the same, for its result
annotations.readOnlyHint true for a #[command(live)]
annotations.destructiveHint true when its ability is in Mcp::confirm

Arguments arrive by name: { "input": { "name": "Ada" } } for customers_store(ctx, input: CustomerInput). An Option argument, or an Option field, may be left out.

When a call fails, the model gets an error it can act on (isError), not a protocol error. That covers a validation bag (with the messages per field), a command's Err, a panic, an unknown argument, and a type that doesn't decode.

Write the doc comments for the model: what the command does, and when to use it. Only the first line is shown when the user is asked to confirm.

Confirmation

Mcp::confirm("customers.delete") makes the server ask the user before such a call runs. The question appears in the MCP client: who is asking, which tool, the first line of its description, and the arguments.

  • A 2026-07-28 client gets a multi round-trip: input_required with an elicitation/create, then a retry carrying the user's answer.
  • A legacy client that declared elicitation gets a server-initiated elicitation/create.
  • A client that can't ask gets an error, and the tool doesn't run. So does a decline, a dismissal, or no answer within 10 minutes.

The server enforces this; it isn't a hint the client may ignore. The round trip's requestState is signed, bound to the tool, the arguments and the client, and expires after 5 minutes. It also runs the call only once.

Resources

A granted #[command(live)] that can run with no arguments given is also a resource, app://<command>. That means every argument is an Option, or a struct whose fields all are. resources/read runs it.

A client can subscribe (subscriptions/listen, or resources/subscribe before 2026-07-28). It's then told whenever the live registry would push a new result to a window: coalesced, only when the result changed, and only for what the command read. See live queries. The agent watches "today's orders" the way a window does.

Resource templates

A granted live command that takes arguments is a resource template (RFC 0004). It's a URI with variables, which the agent fills in:

app://customers_show/{id}
app://customers_index{?direction,page,per_page,search,sort}
  • Which commands: each argument must be a scalar (a string, number, boolean or unit-variant enum, optionally an Option), or a struct of scalars, one level deep. A command that needs confirmation has no template. Neither does one with a list, a nested object or serde_json::Value argument. rata mcp inspect says why.
  • Variables: required ones are path segments, in argument order. Optional ones are the query, with a struct's fields in name order.
  • Values: they're percent-decoded (+ is a plus) and converted by the variable's type. app://customers_show/12 reads customer 12; app://customers_index?search=ada&page=2 reads that page of that search.
  • Subscribing: subscriptions/listen to app://customers_index?search=ada is told only when that search's result changes.
  • Errors: a value that doesn't convert, a parameter the template doesn't name, or a repeated one is -32602 "Invalid arguments", with what's wrong per variable in data.errors. So is the command's own validation failing.
  • Completion: completion/complete offers an enum variable's values, and true / false for a boolean. For others, the app can give a source: Mcp::complete("customers_show", "id", Completion::new("customers_index", "id")) (see completions).

Templates add no reach. The agent can already call the command as a tool with any arguments; a template lets it watch the result.

Prompts

A prompt is a task the app offers by name: the client lists it (prompts/list), and the user picks one to start from (prompts/get). The same Prompt can be the assistant's suggestion too.

use elyra::Prompt;

let summary = Prompt::new("customer_summary", "Summarize a customer",
        "Summarize {customer}: open invoices, last contact, notes.")
    .description("A customer at a glance")
    .argument("customer", "The customer's name or number")
    .needs("customers.view");

App::new().mcp(Mcp::new().allow_ability("customers.*").prompt(&summary))
  • Listed where it's granted. A prompt is listed only when the grant covers every ability it needs; one with none is always listed.
  • Arguments are {name} in its text: argument(..) is required, optional_argument(..) is empty when left out. Each value is text, at most 2000 characters. A required one missing is -32602 "Invalid arguments".
  • Checked at start. A {name} that isn't an argument, an argument that isn't in the text, or two prompts with one name stop the server from starting.
  • Completion: an argument is free text, with no values to offer, unless it has a source: .complete("customer", Completion::new("customers_index", "name")).

A prompt adds no reach: it's words for the agent, which still calls the tools its grant allows.

Completions

A client asks completion/complete for a template variable's or a prompt argument's values as the user types them. With a source, the app answers from its own data: customer names as the user types "gr".

use elyra::{Completion, Prompt};

let summary = Prompt::new("customer_summary", "Summarize a customer", "Summarize {customer}.")
    .argument("customer", "The customer's name")
    .complete("customer", Completion::new("customers_index", "name"));

App::new().mcp(Mcp::new()
    .allow_ability("customers.view")
    .prompt(&summary)
    .complete("customers_show", "id", Completion::new("customers_index", "id")))
  • A source is a live command, and each row's field is a value (the rows of a page's data, or the list it returns), each once, at most 100. What's typed goes in its query.search, 20 to a page, as make:resource's _index takes it; .search("term") (or "filter.name") puts it elsewhere.
  • It runs as the agent's calls do: through its grant, the inspector's mask and the rate limit, each completion counted. So it suggests only what the agent could read with the tool itself. A refused or failing source gives no values rather than an error.
  • Checked at start. For a prompt the grant offers, and for each template given one, the source must be a tool the grant offers, live (it only reads), and not one Mcp::confirm asks about; the template must be one the grant offers, with that variable. Otherwise the server doesn't start.
  • In the assistant, the same prompt's argument is suggested in the panel as the user types it (see suggestions).

Seeing what it does

  • Logs: every call and read is logged under elyra::mcp, with its outcome and duration. The arguments aren't logged, since they may be personal data.

  • An event, for an audit log:

    App::new().listen(|e: elyra::mcp::AgentCalled, ctx: Ctx| async move {
        // e.tool, e.client, e.ok, e.millis
        Ok(())
    })
    
  • A channel, for the UI: elyra:mcp carries a started and a finished for every call:

    import { onAgent, toast } from "@elyra/runtime";
    onAgent((a) => {
      if (a.phase === "started") toast(`${a.client} is running ${a.tool}…`);
    });
    
  • Who's calling, in middleware: CommandRequest::origin is Origin::Agent { client } for an MCP call, and Origin::Frontend otherwise. Refuse an agent there, or audit it (middleware).

Rate limits

Every tool takes at most 60 calls a minute by default, counted per tool across all connections. That's plenty for an agent at work, and a stop for one caught in a loop. Change it per ability, namespace, or for everything:

Mcp::new()
    .allow_abilities(["customers.*"])
    .rate_limit("*", 120, Duration::from_secs(60))
    .rate_limit("customers.create", 10, Duration::from_secs(60))

The last limit that matches wins. A throttled call is an error the model sees, and it's refused before the user is asked to confirm it. Reads count; re-runs for a subscription don't.

Connecting a client

rata mcp install                  # Claude Code and Claude Desktop
rata mcp install --client cursor
rata mcp install --client vscode
rata mcp install --client workspace   # Elyra Workspace: the project's .mcp.json
rata mcp install --release        # the optimized build

rata mcp install builds the app and prints the config for that binary. It edits nothing; you paste the config where the client reads it. The exception is --client workspace: Elyra Workspace gives the servers in the project's own .mcp.json to every agent (Claude Code, Codex, Gemini CLI, …) once you allow the file, so rata adds the app there, next to the servers already in it. The command is this machine's path to the binary. The database URL goes in only for SQLite, since a server URL may hold a password and .mcp.json is often committed.

This is the app's own commands as tools. For an agent working on the app's code, rata ai:install and rata mcp dev give it the framework's guides, the app's commands, models, schema and log, and the running debug build's windows to look at and click in: see coding agents. For a shipped app, point command at the installed binary instead (/Applications/CRM.app/Contents/MacOS/crm), with "args": ["--mcp"].

When the app has no App::database(..), a headless run reads DATABASE_URL. rata mcp install puts the one from elyra.toml in the config's env.

The running app, or headless

myapp --mcp is a small shim:

  • When the app is open, the shim connects to it over a private local endpoint, and the agent works inside the app. It shares the app's database connection, live queries and events, so the windows update, and one agent sees another's changes.
  • When it isn't, the shim serves MCP itself, without a window. Everything works, but nothing shows it, and two headless agents don't hear about each other's writes.

The endpoint exists only when the app calls .mcp(..). It's a 0600 Unix socket, or loopback on Windows, and a connection is served only after a challenge-response on a per-install token (see security).

Testing

TestApp::mcp() is an in-process client, so a test checks what an agent sees:

let app = TestApp::new(App::new().commands(resources::commands()).mcp(mcp()));
let agent = app.mcp();
assert!(agent.list_tools().await.iter().any(|t| t["name"] == "customers_store"));

let added = agent.call("customers_store", json!({ "input": { "name": "Ada" } })).await;
assert!(!added.is_error, "{}", added.text);

// Confirmation, answered as the user would.
let gone = app.mcp().confirming("accept").call("customers_destroy", json!({ "id": 1 })).await;
assert!(gone.confirmation.unwrap().contains("customers_destroy"));

// Resources, templates and subscriptions.
let page = agent.read("app://customers_index").await.unwrap();
let ada = agent.read("app://customers_index?search=ada").await.unwrap();
let (_id, watching) = agent.listen(&["app://customers_show/12"]).await;

Protocol support

  • 2026-07-28, the stateless revision. It covers per-request _meta, server/discover, tools/list and prompts/list with ttlMs and cacheScope, multi round-trip confirmation, and subscriptions/listen.
  • 2025-11-25, 2025-06-18 and 2025-03-26, for clients that open with initialize. Elicitation came in 2025-06-18.

The transport is stdio only. There's no network listener.

CI drives the example app with the official MCP Inspector CLI: scripts/mcp-inspector.sh.

Related