# hackmyagent MCP server

> Scans, attacks, and fixes AI agents and MCP servers by identifying shadow AI, credential leaks, and prompt injection vulnerabilities.

- Repository: https://github.com/opena2a-org/hackmyagent
- Page: https://hostedmcp.org/servers/opena2a-org/hackmyagent
- Transport: stdio
- Stars: 92
- License: Apache-2.0

## Install

### Claude Code

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

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

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

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

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

### VS Code CLI

```sh
code --add-mcp '{"name":"hackmyagent","type":"stdio","command":"npx","args":["-y","hackmyagent"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

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

### Codex

```sh
codex mcp add hackmyagent -- npx -y hackmyagent
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.hackmyagent]
command = "npx"
args = ["-y", "hackmyagent"]
```

### Gemini CLI

```sh
gemini mcp add -s user hackmyagent npx -- -y hackmyagent
```

### Gemini settings.json (`~/.gemini/settings.json`)

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

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `OPENA2A_TELEMETRY` | no | no |  |
| `OPENA2A_TELEMETRY_DEBUG` | no | no |  |

## FAQ

### What can hackmyagent find?

It detects shadow AI, credentials, risky configurations, undeclared capabilities, weak governance, and instruction-override payloads in text.

### Can it automatically fix security issues?

Yes, you can use the --fix flag to apply fixes to your project, and you can use rollback to revert them.

### How do I use it with an AI assistant like Claude Code or Cursor?

You can initialize it as an MCP server using the init-mcp command, which allows you to ask the assistant to run deep security scans.
