# mcp-audit

mcp-audit is an Claude Code MCP server that wraps any MCP server as a proxy: it pins tool descriptions, records every call to a local log and flags injected instructions.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 5 repo stars
- Author: firatmio
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/firatmio/mcp-audit-proxy
- Updated: 2026-10-23
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/mcp-audit

## What it does

The proxy sits between a client and an MCP server and writes down everything that crosses it: tool name, arguments, response. Tool descriptions and schemas get pinned the first time they appear. Change one later and every new session raises an alarm until someone reads the diff with `mcp-audit lock diff` and clears it with `mcp-audit lock approve`.

Detectors for rug-pull, tool-poisoning and result-injection run on top of the recording and print a warning to stderr. Only an allow or deny rule stops a call. The scanner looks for requests to keep quiet, paths like `~/.ssh` or `.env`, sends to an outside URL, and invisible characters.

A local server gets wrapped with `mcp-audit run -- <command>`; a remote one goes through `mcp-audit serve --target https://example.com/mcp --listen :9000`. Events land in `~/.mcp-audit/logs/events.jsonl`, one JSON line each, and nothing is sent anywhere unless a webhook is configured. A source build takes Go 1.24 or newer; the npm package and release binaries sit at 0.1.0, so `mcp-audit lock` and result scanning come only from that build.

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

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add mcp-audit-proxy -- npx -y mcp-audit-proxy
```

### Codex

**Platform CLI**
```bash
codex mcp add mcp-audit -- npx -y mcp-audit-proxy
```

### Cursor

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

### GitHub Copilot

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

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add mcp-audit npx -y mcp-audit-proxy
```

## When to use it
- catch a tool description that changed between sessions
- log which tools an agent called and with what arguments
- stop a call with an allow or deny rule
- find injected instructions in a tool description or its output
- inspect a flagged change with `mcp-audit lock diff` before approving it

## Example prompts
- Read the log at `~/.mcp-audit/logs/events.jsonl` and list the tools called in the last session with their arguments
- Run `mcp-audit lock diff` and tell me whether the `echo` tool description changed
- Start `npx mcp-audit-proxy run -- npx -y @modelcontextprotocol/server-filesystem /tmp` and show what ends up in the log

## Similar
- [mcp-warden](https://affpapa.org/en/nevibecode/mcp/mcp-warden.md) — MCP server · ★ 14 repo stars
- [mcp-bastion](https://affpapa.org/en/nevibecode/mcp/mcp-bastion.md) — MCP server · ★ 7 repo stars
- [api-security-audit](https://affpapa.org/en/nevibecode/agents/api-security-audit.md) — subagent · 3202 installs
- [dependencies-audit](https://affpapa.org/en/nevibecode/skills/dependencies-audit.md) — skill · 1900 installs
- [convex-security-audit](https://affpapa.org/en/nevibecode/skills/convex-security-audit.md) — skill · 1600 installs
- [mcp-security-audit](https://affpapa.org/en/nevibecode/skills/mcp-security-audit.md) — skill · 1100 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
