# melra [Health: Active]

**Category:** 🤖 Coding Agents  
**Repository:** https://github.com/XAGI-Lab/melra  
**GitHub Stars:** 12  
**npm Downloads (last month):** 765  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/melra

## Description
Open-source local MCP execution runtime for agents: policy-gated tool calls, scoped approvals, verified outcomes, durable receipts, and recovery after interruptions.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "melra": {
    "command": "npx",
    "args": ["-y","@melra/cli@alpha"],
    "env": {
      "MELRA_WORKSPACE": ""
    }
  }
}
```

**Requires environment variables:** `MELRA_WORKSPACE` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What melra does

melra is a local execution runtime for MCP tool calls made by agents. It sits between an agent application and the tools that application uses, applying policy before a call runs. The runtime can require approval for calls that need it, verify declared evidence after execution, and record a redacted receipt covering the request and its outcome.

Its execution model is designed for tasks where repeating an external mutation could be unsafe. For each task, melra dispatches mutations no more than once. If the result is uncertain, it places the operation into a reconciliation state rather than replaying it automatically. The provider still determines whether an external effect is exactly once. Calls made through other tools do not pass through melra and are outside its control.

## How it works

The agent decides which action to request; melra governs whether and how that action is executed. Each routed call is evaluated against the active policy. Depending on that policy, execution can proceed, require an approval, or be held. Afterward, melra checks the evidence declared for the call and links the result to a redacted receipt.

A workspace provides the boundary for file and command operations. The setup wizard uses the directory from which it is run unless another location is selected. It also creates a local policy and can add melra to an MCP client's existing configuration while preserving the rest of that configuration and creating a backup.

## Setup and configuration

Node.js 22.13 or newer, or Node.js 23.4 or newer, is required for the normal installation. From the workspace where the agent should operate, run:

```bash
npx @melra/cli@alpha setup
```

The wizard displays the selected workspace, asks which detected agent application should use melra, and writes the server configuration into that application's configuration file. A noninteractive Cursor setup is available with `setup --client cursor --write`; `setup --client codex` prints the configuration instead of writing it. The CLI can also be installed globally with npm.

Docker users can run the published image's `doctor` command without installing Node.js. Other installation paths include a prebuilt release, building from source with pnpm, and an experimental single executable. After configuration, restart the agent application and approve the project server if the client asks. `melra launch claude-code` can start Claude Code with melra as its only tool source for changes.

Set `MELRA_WORKSPACE` to choose a workspace explicitly. The setup flow asks before selecting a home directory, a directory containing the workspace, or the filesystem root. It writes the local policy to `~/.melra/policy.json`.

## Tools and capabilities

- Evaluate tool calls against a local policy.
- Request scoped approval before permitted operations run.
- Restrict file and command activity to a chosen workspace boundary.
- Verify declared evidence for executed calls.
- Record redacted receipts from calls to outcomes.
- Avoid replaying uncertain mutations and hold them for reconciliation.

## Limitations and notes

melra is alpha software, so its APIs may change before version 1.0. The project recommends using an isolated workspace, keeping domain and command allowlists narrow, and reviewing every approval. Its guarantees cover calls routed through melra only; actions performed through other tools remain outside its control. At-most-once dispatch by melra does not guarantee exactly-once effects from an external provider. Supported platforms include macOS, Linux, and Windows, with Python 3.11 through 3.14 also listed for the project environment.

_Full upstream README: https://allmcps.com/mcp/melra/readme_

