# MELRA

A local execution layer that checks agent tool calls against policies and records verified receipts.

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

## What it does

MELRA supervises agent actions by validating every tool call before dispatch. It prompts for manual approval when a requested operation demands confirmation. State-changing mutations execute at most once per task. If an outcome is uncertain, the runtime parks the action for manual review instead of triggering a replay.

Running the tool requires Node.js 22.13+ or 23.4+. The initial `setup` command establishes an explicit workspace boundary for files and shell operations. Keep in mind that protection covers routed calls only. Any command executed outside the MELRA layer bypasses its policy engine completely.

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

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add melra -- npx -y @melra/cli
```

### Codex

**Platform CLI**
```bash
codex mcp add melra -- npx -y @melra/cli
```

### Cursor

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

### GitHub Copilot

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

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add melra npx -y @melra/cli
```

## When to use it
- enforce permission policies before agent tool execution
- prevent duplicate mutations during ambiguous failures
- restrict agent filesystem access to a target project directory
- record sanitized audit receipts of completed agent actions

## Example prompts
- Run database updates via MELRA and ask for approval on destructive actions
- Execute the build command inside the restricted workspace boundary

## Similar
- [bernstein](https://affpapa.org/en/nevibecode/mcp/bernstein.md) — MCP server · ★ 1327
- [dashclaw](https://affpapa.org/en/nevibecode/mcp/dashclaw.md) — MCP server · ★ 313
- [Helio](https://affpapa.org/en/nevibecode/mcp/helio.md) — MCP server · ★ 14
- [dependency-auditor](https://affpapa.org/en/nevibecode/skills/onewave-ai-dependency-auditor.md) — skill · 302 installs
- [agentgate](https://affpapa.org/en/nevibecode/mcp/agentgate.md) — MCP server · ★ 91
- [mcp-bastion](https://affpapa.org/en/nevibecode/mcp/mcp-bastion.md) — MCP server · ★ 7

---
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
