Skip to main content

MCP

Connect Claude Code, Cursor, or other MCP clients to AuditAgent so they can run scans for you whenever you need.

MCP server URL: https://api.auditagent.nethermind.io/mcp

  1. Add AuditAgent as a remote MCP server with the URL above. In your config file, it should look like this:
{
"mcpServers": {
"auditagent": {
"type": "http",
"url": "https://api.auditagent.nethermind.io/mcp"
}
}
}
  1. When you try to use it for the first time after adding it to your config, your client should automatically realize that it needs authentication and ask you to authenticate by giving you an option to open your browser.
  2. In your browser, pick how you want to pay for scans:
    • With your AuditAgent account. Log in if you're not already logged in. On the consent page, pick the default workspace and connect. Your client will receive a Bearer token and can call tools across all your workspaces (You can always switch your workspace by asking the agent). The page also shows the address the connection is sent back to. Cancel refuses the connection and tells your client right away. Scans spend your workspace credits.
    • Without an account. Choose Use without an account, on the login page or on the consent page. Each scan is paid by card, and nothing is stored in a workspace.

To change your choice later, ask your agent to log out, then authenticate the auditagent server again from your client's MCP server settings and pick the other option.

Every scan starts with a price. Your agent uploads a ZIP of your code and asks AuditAgent for a quote: the price of each file you want scanned. Nothing runs and nothing is charged until you approve that price. You can drop files to lower it, or decline.

Your agent also tells the scanner what it knows about your project that your docs don't already say, such as what the code is meant to do, your design decisions, trusted roles, and risks you accept. The more the scanner knows about your intent, the better its findings.

Paying by card without an account​

Once you approve the price, your agent gives you a card payment link and a one-time result token. Keep the token. The link lasts 30 minutes. After you pay, your browser shows a page telling you to go back to your agent. Tell the agent you paid, and it starts checking on the scan, which begins once Stripe confirms the payment.

Manual setup (fallback for authentication)​

If your client doesn't support automatic authentication, you can set the token by hand.

Without an account​

Use the public token mcp_anonymous. Everyone can use it, and it only allows scans paid by card, each read with its own result token.

{
"mcpServers": {
"auditagent": {
"type": "http",
"url": "https://api.auditagent.nethermind.io/mcp",
"headers": {
"Authorization": "Bearer mcp_anonymous"
}
}
}
}

The logout tool cannot end this connection. To use your account instead, replace this token with one of your own as described below.

With your account​

  1. While logged in to your AuditAgent account, open MCP Setup.
  2. Generate a token and copy it (shown once).
  3. Configure your client using the following settings:
{
"mcpServers": {
"auditagent": {
"type": "http",
"url": "https://api.auditagent.nethermind.io/mcp",
"headers": {
"Authorization": "Bearer <token>"
}
}
}
}

Tools your client will get access to​

Workspace Tools​

  • auth_status: Reports whether this connection is logged in to an AuditAgent account
  • logout: Ends this connection's login, with or without an account, so you can authenticate again and pick the other option
  • info: Fetches your current workspace's name, subscription type, and spendable credits
  • list_workspaces: Lists all workspaces you have access to
  • switch_workspace: Switches you to a different workspace

info, list_workspaces, and switch_workspace need a logged-in connection.

Scan Tools​

  • prepare_zip_upload: Lets the agent upload a ZIP of the code to scan.
  • scan: With price_ack false (the default), returns a per-file price and does not start a scan. With price_ack true and a file list that is a subset of that quote, a logged-in connection spends credits, starts the scan, and returns its scan_id and a result_token. A connection without an account returns a Checkout link, a one-time result_token, and a scan_id. The scan starts only after Stripe reports the payment. Keep the token. The pay link lasts 30 minutes.
  • scan_results: Reads one scan with the result_token its launch returned. A logged-in connection can omit the token for its own workspace's scans. An anonymous scan's token keeps working after the client switches to an account. While the scan is unfinished, the result is scan_status, message, and progress. A finished scan returns the report and invariants. Before a paid scan exists, a correct token returns scan_status initialized with message Waiting for payment (or Payment received. Starting the scan.), or failed with a message saying the pay link expired, was replaced, or the payment was refunded. A wrong token or an unknown scan_id is not found. Anonymous scans are not emailed.

Your agent can follow a scan in a background script that polls GET /api/v1/scanner/direct/status/{scan_id} every 30 seconds until status is completed or failed. It sends header X-Result-Token with the scan's result token, never the token in the URL. The token can read only that one scan. Logged in, the agent starts polling right after launch, and you also get an email when the scan finishes, with the results in the product. Without an account, it starts once you tell it you paid. status initialized before an anonymous scan starts means it is waiting for the payment, or the payment arrived and the scan is starting, and info_message says which. failed before an anonymous scan starts means the pay link expired, was replaced, or the payment was refunded, and info_message says which. A wrong token is not found.

Finding descriptions in results​

Completed scan_results reports use the same Markdown string for each finding's description as the direct API and JSON report downloads. The string includes available narrative sections and supporting source excerpts, but omits recommendations. Older text descriptions are also returned as strings. See finding details for more information.