# Emilia Protocol

This MCP server checks approval before consequential agent actions and binds signed receipts to the exact operation details.

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

## What it does

Emilia Protocol adds an approval gate before protected agent actions. The server requests and tracks approval, then verifies a signed receipt tied to the operation’s exact details. Changed payment parameters, replayed calls, and forged evidence are rejected.

It runs through `npx -y @emilia-protocol/mcp-server` and connects to MCP clients over stdio. The Claude Code command passes `EP_API_KEY`; configuration can also include `EP_INCLUDE_PROTOCOL_TOOLS` and `EP_INCLUDE_REGISTRY_TOOLS`. Production use requires enrolled credentials and durable shared state, with the gate placed on every route to the protected provider credential. That constraint matters when the deployment has alternate access paths.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `EP_API_KEY`, `EP_INCLUDE_PROTOCOL_TOOLS`, `EP_INCLUDE_REGISTRY_TOOLS` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env EP_API_KEY=<EP_API_KEY> --env EP_INCLUDE_PROTOCOL_TOOLS=<EP_INCLUDE_PROTOCOL_TOOLS> --env EP_INCLUDE_REGISTRY_TOOLS=<EP_INCLUDE_REGISTRY_TOOLS> --transport stdio emilia-protocol -- npx -y @emilia-protocol/mcp-server
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add emilia-protocol --env EP_API_KEY=<EP_API_KEY> --env EP_INCLUDE_PROTOCOL_TOOLS=<EP_INCLUDE_PROTOCOL_TOOLS> --env EP_INCLUDE_REGISTRY_TOOLS=<EP_INCLUDE_REGISTRY_TOOLS> -- npx -y @emilia-protocol/mcp-server
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "emilia-protocol": {
            "command": "npx",
            "args": [
                "-y",
                "@emilia-protocol/mcp-server"
            ],
            "env": {
                "EP_API_KEY": "<EP_API_KEY>",
                "EP_INCLUDE_PROTOCOL_TOOLS": "<EP_INCLUDE_PROTOCOL_TOOLS>",
                "EP_INCLUDE_REGISTRY_TOOLS": "<EP_INCLUDE_REGISTRY_TOOLS>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "emilia-protocol": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@emilia-protocol/mcp-server"
            ],
            "env": {
                "EP_API_KEY": "<EP_API_KEY>",
                "EP_INCLUDE_PROTOCOL_TOOLS": "<EP_INCLUDE_PROTOCOL_TOOLS>",
                "EP_INCLUDE_REGISTRY_TOOLS": "<EP_INCLUDE_REGISTRY_TOOLS>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e EP_API_KEY=<EP_API_KEY> -e EP_INCLUDE_PROTOCOL_TOOLS=<EP_INCLUDE_PROTOCOL_TOOLS> -e EP_INCLUDE_REGISTRY_TOOLS=<EP_INCLUDE_REGISTRY_TOOLS> emilia-protocol npx -y @emilia-protocol/mcp-server
```
Replace <…> with your own values

## When to use it
- check authority before a protected tool call
- bind approval to payment details
- reject changed operation parameters
- block receipt replay
- verify signed action evidence

## Example prompts
- Before sending a payment, verify that approval matches its amount, currency, vendor, and destination.
- Request a signed approval before invoking the protected tool.
- Reject the call when its parameters changed or the approval was already consumed.

## Similar
- [network-protocol-attacks](https://affpapa.org/en/nevibecode/skills/network-protocol-attacks.md) — skill · 3600 installs
- [protocol-reverse-engineering](https://affpapa.org/en/nevibecode/skills/protocol-reverse-engineering.md) — skill · 12701 installs
- [defi-protocol-templates](https://affpapa.org/en/nevibecode/skills/defi-protocol-templates.md) — skill · 10400 installs
- [crypto-protocol-diagram](https://affpapa.org/en/nevibecode/skills/crypto-protocol-diagram.md) — skill · 3900 installs
- [okx-agent-payments-protocol](https://affpapa.org/en/nevibecode/skills/okx-agent-payments-protocol.md) — skill · 13700 installs
- [bailian-protocol](https://affpapa.org/en/nevibecode/skills/bailian-protocol.md) — skill · 9200 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
