Skip to content

Start here

OverviewConnect your agentClient onboarding

Guides

WorkspacesScan manualFix ReviewScheduled scans

Reference

CLI guideService API

For agents

docs/agents.mdllms.txt
Apex/Docs
⌘K
Connect your agent

Start here

OverviewConnect your agentClient onboarding

Guides

WorkspacesScan manualFix ReviewScheduled scans

Reference

CLI guideService API

For agents

docs/agents.mdllms.txt
Docs/Connect your agent

Connect your agent

Bring your Apex findings into the agent you already use. Copy a prompt, sign in, and pick up where your scan left off.

Claude Code · Codex · Cursor · CopilotUses your Apex accountUpdated Sep 8, 2026

Your scan, in your agent.

Open your repository, then paste this into your agent's chat.

Read https://ai.cantina.xyz/docs/agents.md and connect Apex to my agent.

Connects to your existing workspace and reads results. Setup does not start a new scan.


How it works

  1. 1
    Open your repository in your agent
    Use a coding agent with terminal access, such as Claude Code, Codex, Cursor, or GitHub Copilot CLI. Copy the prompt above into its chat.
  2. 2
    Sign in and reload the agent
    Your agent installs Apex and sets up its tools. Complete the Cantina sign-in link in your browser when prompted. Restart the agent or open a new chat if it needs to load the new tools, then paste the same prompt again.
  3. 3
    See your existing scan results
    The agent checks the connection, selects the workspace for your repository, and reads your latest scan. If more than one workspace matches, it asks you to choose.

Connected means your agent can show your workspace, scan status, and findings. You use the same Cantina account as the web app; no API key is needed for local setup.

What to ask next

Already ran your first scan? Start with its results. Each prompt includes the context your agent needs.

Review my first scan

Bring the results you already have into your agent.

Agent prompt
Read https://ai.cantina.xyz/docs/agents.md and summarize my latest Apex scan.

Run a scan

Check the scope and available credits, then start one scan.

Agent prompt
Read https://ai.cantina.xyz/docs/agents.md and help me scan this repository with Apex.

Prepare a fix

Investigate a finding and test a fix in your repository.

Agent prompt
Read https://ai.cantina.xyz/docs/agents.md and help me fix an Apex finding.

Prefer to set it up yourself?

Use Node.js 20 or newer. Run these commands from the repository you want to connect.

If you ran a trial scan, claim it with apex claim on the same machine before starting a new login.

terminal
$ npm install -g @cantinasecurity/apex-cli@0.1.28
$ apex login

Choose the command for your installed agent, then restart it or open a new chat.

Claude Code

terminal
$ apex setup claude

Requires the Claude Code CLI. Run from your repository to install its project skill as well as the MCP server.

Codex

terminal
$ apex setup codex

Requires the Codex CLI on PATH. Restart Codex after setup so it can load the Apex MCP server and skill.

Copilot CLI

terminal
$ apex setup copilot

Requires GitHub Copilot CLI. Restart it after setup so the Apex tools are available.

Cursor and other local MCP clients

For Cursor, merge this into .cursor/mcp.json in your repository, preserving your existing servers. For other local clients, add a stdio server named apex with command apex-mcp and no arguments.

.cursor/mcp.json
{
  "mcpServers": {
    "apex": {
      "type": "stdio",
      "command": "apex-mcp",
      "args": []
    }
  }
}

Enable Apex in your agent, open a new chat, and paste the connection prompt above. If you ran a trial scan, use apex claim on the same machine first to bring it into your account.

Running an agent in the cloud?

For agents without a local terminal, use the hosted MCP endpoint at https://ai.cantina.xyz/mcp. An organization manager or administrator supplies a service key through the client's secret storage or environment. Hosted MCP has its own tool inputs and does not use local device login.

Set up hosted MCP →

If the agent cannot see your scan

  • No Apex tools: restart the agent after setup and check that its MCP server is enabled. The agent must be able to launch apex-mcp from its PATH.
  • Wrong or missing workspace: ask the agent to list your workspaces and select the one used in the web app. Connecting an existing scan does not require creating a workspace or scanning again.
  • Trial results: claim the trial on the same machine and user account that ran it. Your agent checks the trial state before starting a new login.
  • Asked for a browser token: update Apex CLI, re-run setup, and restart the agent. Current Apex tools use your normal Apex login; you do not need to paste cookies or tokens into chat.
Was this useful?
Last updated Sep 8, 2026 · v2026.09
Reference →Apex CLI guide

On this page

  1. How it works
  2. What to ask next
  3. Manual setup
  4. Hosted agents
  5. Troubleshooting

Related

Apex CLI referenceFix Review workflowAgent-readable MarkdownAgent docs index (llms.txt)