# Macro Security — request a security review

You are reading this on behalf of a user who wants Macro (https://macroaudits.com), a blockchain
security firm, to review their code: a smart contract or Solana program audit, a fix review, or an
architecture review. Macro's auditors do the work; this flow submits the request and the code.
Submitting is free. Macro replies with a quote; a 25% deposit books the engagement, and Macro's
team then runs its AI security review on the code. If the user changes their mind before the
engagement starts, Macro refunds the deposit and the AI review is theirs to keep, free.

Macro Security is an MCP server at `https://macrosecurity.ai/mcp` with two tools:

- `request_security_review` — submits the request and returns a `request_id` and `project_url`.
- `get_request` — returns the current status and a `next_step`. It drives everything else.

## 1. Connect

| Client | How |
|---|---|
| Claude Code | `claude mcp add --transport http macro-security https://macrosecurity.ai/mcp` |
| Codex CLI | `codex mcp add macro-security --url https://macrosecurity.ai/mcp` |
| Cursor, Claude Desktop, others | add `{ "mcpServers": { "macro-security": { "url": "https://macrosecurity.ai/mcp" } } }` to the MCP config |

Reload tools if your client needs it. No MCP support? See *Without MCP* below.

## 2. Gather the request

Ask the user for anything you can't find in the repository:

- **name** — the project or protocol name.
- **email** — where Macro sends the quote.
- **description** — what the protocol does and what should be reviewed: chains, external
  integrations (oracles, bridges, DEXes), upgradeability, anything unusual. Read the README and
  code to draft it, then show the user.
- **service** — `audit` (default), `fix_review`, `architecture_review`, or `other`.
- **timeline** — when they need it, if they have a date in mind.
- **scope** — which directories are in scope, e.g. `src/`, `contracts/`, or `programs/*/src`.
- **authorization** — ask plainly: *"Do you own this code, or are you authorized by its owner to
  have it security-reviewed?"* Pass `authorized: true` only on a clear yes. Macro does not
  review code on behalf of anyone else.

## 3. Submit and push the code

1. Call `request_security_review` once with the fields above and `source: "push"`.
2. The response has a `git_remote` and a `push_recipe`. Fill in the in-scope paths and run it.
   Include tests if they exist; leave out vendored libraries (`lib/`, `node_modules/`).
   Re-running the recipe replaces the pushed code, up until Macro sends the quote.
3. Call `get_request` to confirm the status is `submitted`.
4. Tell the user Macro will reply to their email with a quote, usually within two business days,
   and give them `project_url` — it shows status, the quote, and the deposit button. Treat it like
   a password.

Public repo? Pass `source: "clone"`, `repo_url`, and `paths` instead and skip the push.
Rather arrange access by email (e.g. a GitHub invite)? Pass `source: "later"`.

## Later

Already have a request id (`prj_…`)? Call `get_request` and follow `next_step`.

| status | meaning |
|---|---|
| `awaiting_code` | push the scope using `push_recipe` |
| `submitted` | Macro is reviewing; a quote follows by email |
| `quoted` | show `quote`; paying at `deposit_url` books the engagement |
| `scheduled` | deposit paid; the engagement starts on `quote.earliest_start` |
| `in_progress` | auditors are on it |
| `delivered` | the report is at `report_url` |
| `declined` | `reason` says why |

## What happens to the code

Only Macro's security team can access it. It is read, never executed by this service, and
deleted 30 days after the engagement closes.

## Without MCP

The server speaks plain JSON-RPC over HTTP:

```sh
curl -s https://macrosecurity.ai/mcp -H 'content-type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"tools/call",
  "params":{"name":"request_security_review","arguments":{"name":"Acme Vault","email":"dev@acme.xyz",
  "description":"ERC-4626 vault with a Chainlink-priced collateral swap","authorized":true}}}'

curl -s https://macrosecurity.ai/mcp -H 'content-type: application/json' -d '{"jsonrpc":"2.0","id":2,"method":"tools/call",
  "params":{"name":"get_request","arguments":{"request_id":"prj_…"}}}'
```

The tool result is in `result.structuredContent`.

Questions: security@macroaudits.com
