# MCP Behave

> MCP Behave is an open-source MCP server for security. Runtime security auditor that traces what an MCP server actually does, for vetting. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Linux, macOS, self-hosted, API
- **Repository:** https://github.com/navid72m/mcp-behave
- **MCP Registry name:** io.github.navid72m/mcp-behave
- **Categories:** [security](https://ai-powered.com/categories/security)
- **Listing updated:** 2026-11-19

## About

The README says mcp-behave runs an MCP server under a system call tracer (a macOS dylib, a Linux LD_PRELOAD library, or strace), then calls every tool, resource and prompt the server advertises. It records network connections, sensitive file reads and subprocess launches, and checks tool metadata and outputs for hidden Unicode, ANSI escapes, prompt-injection phrasing and Markdown image exfiltration.

The project positions itself against static scanners that only read tool descriptions. Its pitch is that observed runtime behaviour is what matters, so a server that describes itself as local but opens sockets gets flagged. Findings are reported as observations, and a scorecard, SARIF and JSON output make it usable in CI pipelines.

Beyond live audits, it offers an offline linter for manifest files, a manifest-hash rug-pull check, a fuzzing mode for tool arguments, and a scan of local AI client configurations for plaintext secrets and over-broad mounts. It is aimed at developers and security reviewers who install MCP servers and want to check them before use.

## Features

- **Syscall-level runtime tracing:** Wraps the server process with a platform tracer to record network, file and subprocess activity during tool calls.
- **Metadata injection checks:** Scans tool names, descriptions and prompts for zero-width characters, BiDi overrides, ANSI escapes and injection phrasing.
- **Output exfiltration detection:** Flags external Markdown or HTML image links in tool responses that could leak data when rendered.
- **Rug-pull detection:** Stores manifest hashes between runs and alerts when advertised tools or descriptions change silently.
- **Offline manifest linter:** Checks static tool definitions against a rule catalog without starting the server.
- **CI-ready output:** Provides JSON and SARIF output, a 0-100 scorecard and exit codes keyed to a severity threshold.

## Good for

- Vetting a third-party MCP server before connecting it to an AI client
- Checking whether a server makes network calls it does not declare
- Linting tool schemas in a CI pipeline before release
- Auditing MCP servers already configured in Claude Desktop or Cursor

## Install

### Claude Code (Terminal)

```sh
claude mcp add mcp-behave -- npx -y mcp-behave
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mcp-behave": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-behave"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "mcp-behave": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-behave"
      ]
    }
  }
}
```

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

```json
{
  "servers": {
    "mcp-behave": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "mcp-behave"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "mcp-behave": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-behave"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "mcp-behave": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-behave"
      ]
    }
  }
}
```

## Tools

- `audit_server`: Probes and dynamically audits another MCP server's behavioral footprint.
- `inspect_manifest`: Safely fetches and inspects advertised tools, resources, and prompts, and checks for rug-pulls.
- `scan_client_configs`: Scans local AI client configurations to discover installed MCP servers and audit their security posture.

## FAQ

### How is it installed?

The README lists pip and npm installs, plus zero-install runs via npx or uvx.

### Does it work on Windows?

The README describes native tracers for macOS and Linux, and Docker for macOS and Windows hosts; it does not describe a native Windows tracer.

### Does it run remote servers?

Remote SSE and streamable-HTTP servers get manifest analysis only, because client-side process tracing is not possible there.

### Is MCP Behave free?

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

### How do I add MCP Behave to Claude Code?

Run this command in your terminal: claude mcp add mcp-behave -- npx -y mcp-behave

### What are the best alternatives to MCP Behave?

The closest alternatives to MCP Behave are mcp-audit, MCPSense, mcp-audit, MCP Tool Poisoning Scanner and mcpsteward.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [mcp-audit](https://ai-powered.com/mcp/mcp-audit-2): mcp-audit is an open-source MCP server for security.
- [MCPSense](https://ai-powered.com/mcp/mcpsense): MCPSense is an open-source MCP server for security.
- [mcp-audit](https://ai-powered.com/mcp/mcp-audit-4): mcp-audit is an MCP server for security.
- [MCP Tool Poisoning Scanner](https://ai-powered.com/mcp/mcp-tool-poisoning-scanner): MCP Tool Poisoning Scanner is a paid MCP server for security.
- [mcpsteward](https://ai-powered.com/mcp/mcpsteward): mcpsteward is an open-source MCP server for security.
- [mcp-keyscan](https://ai-powered.com/mcp/mcp-keyscan): mcp-keyscan is an open-source MCP server for security.
- [mcp-agent-template](https://ai-powered.com/mcp/mcp-agent-template): mcp-agent-template is an open-source MCP server for security.
- [MCP stdio ShellGuard](https://ai-powered.com/mcp/mcp-stdio-shellguard): MCP stdio ShellGuard is an open-source MCP server for security.

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