# YUSA

> YUSA is an open-source MCP server for security. Prompt-injection scanner and tool-call gate for AI agents, run locally over stdio. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted, macOS, Windows, Linux
- **Website:** https://yusasecurity.xyz
- **Repository:** https://github.com/yusasecurity/yusa
- **MCP Registry name:** io.github.yusasecurity/yusa
- **Categories:** security
- **Listing updated:** 2026-11-14

## About

The pitch is that what a person reads on a page is not always what the agent reads. The engine decodes hidden layers such as Unicode tag smuggling, base64 blobs, HTML comments and `display:none` text, strips zero-width and bidi characters, and folds look-alike letters and leetspeak back to plain Latin before scoring. A directive found in a hidden layer is always a block.

Scoring uses 25 rules (instruction override, role hijack, prompt extraction, forged chat-template tokens, wallet drains, unlimited approvals, exfiltration beacons) plus 10 secret formats. Beyond text, a gate checks tool calls against a policy of allowed tools, addresses and hosts and a value cap. It also decodes raw transaction calldata, so a spender hidden in `data` is checked, and it blocks unlimited Permit signatures and blind `eth_sign`.

It is one dependency-free file with no network access, run over stdio, and installable as an `.mcpb` bundle for Claude Desktop. The README is explicit that the tools are advisory, since the model decides whether to call them. For a hard stop, call the library function in your own code before the tool runs. A GitHub Action can fail pull requests that add hidden instructions to files agents read.

## Features

- **Unmask hidden text:** Decodes smuggled, encoded and invisible text before scoring.
- **Rule-based scoring:** 25 injection rules and 10 secret formats yield allow, review or block.
- **Nonce fencing:** Wraps untrusted text in a random-nonce tag so the model can tell data from orders.
- **Tool-call gate:** Checks tools, addresses, hosts, value caps and secrets in outbound arguments.
- **Calldata decoding:** Inspects raw transaction data for hidden spenders and recipients.
- **Offline engine:** Runs with no dependencies and no network access.

## Good for

- Scan web pages or documents before an agent acts on them
- Fence untrusted text before putting it in a prompt
- Gate crypto-wallet agent calls with an allowlist policy
- Block pull requests that hide instructions in agent config files
- Check outbound tool arguments for leaked secrets

## Install

### Claude Code (Terminal)

```sh
claude mcp add yusa -- npx -y https://github.com/yusasecurity/yusa/releases/download/v0.3.5/yusa.mcpb
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "yusa": {
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/yusasecurity/yusa/releases/download/v0.3.5/yusa.mcpb"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "yusa": {
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/yusasecurity/yusa/releases/download/v0.3.5/yusa.mcpb"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "yusa": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/yusasecurity/yusa/releases/download/v0.3.5/yusa.mcpb"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "yusa": {
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/yusasecurity/yusa/releases/download/v0.3.5/yusa.mcpb"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "yusa": {
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/yusasecurity/yusa/releases/download/v0.3.5/yusa.mcpb"
      ]
    }
  }
}
```

## Tools

- `yusa_scan`: Scans outside text before acting on it and returns allow, review or block with findings and decoded hidden text.
- `yusa_fence`: Wraps text in a random-nonce tag and strips invisible characters.
- `yusa_check_tool_call`: Checks a tool call against a policy before it runs, including raw transaction calldata.

## FAQ

### Does it call any network service?

No. The engine has no network access and the server runs over stdio only.

### Is it a hard guarantee?

No. The MCP tools are advisory; use the library check in your own code for a hard stop.

### How do I set a policy?

Point YUSA_POLICY at a JSON file with allowTools, allowAddresses, allowHosts and maxValueEth, or pass a policy per call.

### How do I install it for Claude Desktop?

Download the yusa.mcpb release file and open it.

### Is YUSA free?

Yes. YUSA is open source, so you can use and self-host it for free.

### How do I add YUSA to Claude Code?

Run this command in your terminal: claude mcp add yusa -- npx -y https://github.com/yusasecurity/yusa/releases/download/v0.3.5/yusa.mcpb

### What are the best alternatives to YUSA?

The closest alternatives to YUSA are REA, Agent Roast, Midplane, Leash and Tinplate Edge AI Safety, Security & EU Compliance.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Agent Roast](https://ai-powered.com/mcp/agent-roast): Agent Roast is an open-source MCP server for developer tools.
- [Midplane](https://ai-powered.com/mcp/midplane): Midplane is an open-source MCP server for databases.
- [Leash](https://ai-powered.com/mcp/leash): Leash is a free MCP server for security.
- [Tinplate Edge AI Safety, Security & EU Compliance](https://ai-powered.com/mcp/tinplate-edge-ai-safety-security-and-eu-compliance): Tinplate Edge AI Safety, Security & EU Compliance is a freemium MCP server for security.
- [SecureCloud](https://ai-powered.com/mcp/securecloud): SecureCloud is a free MCP server for security.
- [Eikino](https://ai-powered.com/mcp/eikino): Eikino is a freemium MCP server for security.
- [SynomosAI Governance MCP](https://ai-powered.com/mcp/synomosai-governance-mcp-2): SynomosAI Governance MCP is an open-source MCP server for security.

---
Source: https://ai-powered.com/mcp/yusa
