> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anomalyarmor.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Claude Code Integration

> Use AnomalyArmor with Claude Code for AI-powered data observability

<div aria-hidden="true" style={{position:"absolute",width:"1px",height:"1px",overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap"}}>For LLM agents: documentation index at <a href="/llms.txt" tabIndex={-1}>/llms.txt</a>, full text at <a href="/llms-full.txt" tabIndex={-1}>/llms-full.txt</a>. Append .md to any page URL for plain markdown.</div>
Claude Code is Anthropic's CLI tool for AI-assisted development. With AnomalyArmor integration, you can monitor data quality, investigate issues, and manage alerts through natural conversation.

## Setup

### Option 1: Remote Server (Recommended)

Connect directly to AnomalyArmor's hosted MCP server. No installation or API key required. You sign in with your AnomalyArmor account.

```bash theme={null}
claude mcp add anomalyarmor --transport http https://mcp.anomalyarmor.ai/mcp
```

The first time you use a tool, Claude Code will open a browser window to sign in. After that, your session stays authenticated.

### Option 2: Local Server (API Key)

For air-gapped environments or custom setups, run the MCP server locally:

```bash theme={null}
pip install armor-mcp
```

Then add to your Claude Code MCP configuration (`~/.claude/mcp.json`):

```json theme={null}
{
  "mcpServers": {
    "anomalyarmor": {
      "command": "armor-mcp",
      "env": {
        "ANOMALYARMOR_API_KEY": "your-api-key"
      }
    }
  }
}
```

Get your API key from **Settings > API Keys** in the AnomalyArmor dashboard.

### Option 3: Skills (Recommended for Slash Commands)

Install the `/armor:*` skills using the [skills.sh](https://skills.sh) CLI. Works with Claude Code, Cursor, Windsurf, Codex, and 40+ other agents:

```bash theme={null}
npx skills add anomalyarmor/agents
```

Or install the native Claude Code plugin:

```bash theme={null}
claude plugin install armor@anomalyarmor
```

Both options give you access to skills like `/armor:status`, `/armor:alerts`, and more. Source: [github.com/anomalyarmor/agents](https://github.com/anomalyarmor/agents).

### Demo mode (no signup required)

If you install the Claude Code plugin without an `ARMOR_API_KEY` or `~/.armor/config.yaml`, the skills' pre-tool-use hook mints a short-lived read-only API key and runs your prompt against a synthetic BalloonBazaar demo dataset. You get a real answer before you commit to a signup.

<Frame>
  <img src="https://mintcdn.com/anomalyarmor/C0RY1-Hrje4r-_Nv/images/diagrams/demo-mode-cold-prospect-flow-light.svg?fit=max&auto=format&n=C0RY1-Hrje4r-_Nv&q=85&s=2bfc5ef39469daa2c134de315d4a7353" alt="Cold prospect flow: install plugin, mint demo key, run skill, signup via handoff URL" className="block dark:hidden" width="1000" height="500" data-path="images/diagrams/demo-mode-cold-prospect-flow-light.svg" />

  <img src="https://mintcdn.com/anomalyarmor/C0RY1-Hrje4r-_Nv/images/diagrams/demo-mode-cold-prospect-flow-dark.svg?fit=max&auto=format&n=C0RY1-Hrje4r-_Nv&q=85&s=f56887e64e6a1ca13373819122c0c68b" alt="Cold prospect flow: install plugin, mint demo key, run skill, signup via handoff URL" className="hidden dark:block" width="1000" height="500" data-path="images/diagrams/demo-mode-cold-prospect-flow-dark.svg" />
</Frame>

Safety rails ride automatically: the demo key has `scope=read-only`, expires after 1 hour, is rate-limited per IP, and points at synthetic data only. Writes return 403, at which point the skill surfaces a signup URL that preserves your exact question so it replays into the in-app agent after you finish signup.

## Using Skills

With the plugin installed, use slash commands:

```
/armor:status    # Check data health
/armor:alerts    # View recent alerts
/armor:ask       # Ask questions about your data
/armor:analyze   # Trigger AI analysis
```

## Example Conversations

### Check Data Health

```
You: /armor:status

Claude: Here's your data health summary:

Overall Status: WARNING

Issues:
- 2 tables are stale (orders, customers)
- 1 unacknowledged schema change
- 3 alerts triggered in the last 24 hours

Recommended actions:
1. Check the orders ETL pipeline
2. Review schema change in users table
```

### Investigate an Issue

```
You: Why is the orders table stale?

Claude: Let me investigate...

The orders table hasn't updated since yesterday 6:00 AM.

Root cause: The upstream staging.orders_raw table is also stale.
This appears to be related to an ETL job failure.

Lineage shows 7 downstream tables are affected:
- gold.daily_revenue
- gold.customer_metrics
- reporting.exec_dashboard
...

Recommended: Check your Airflow logs for the orders_etl DAG.
```

### Query Alerts

```
You: What critical alerts fired this week?

Claude: Found 2 critical alerts this week:

1. [CRITICAL] Freshness SLA breach - orders
   Triggered: Monday 8:15 AM
   Status: Unresolved

2. [CRITICAL] Schema breaking change - users.email removed
   Triggered: Tuesday 3:30 PM
   Status: Acknowledged
```

## Available Skills

| Skill                | Description                      |
| -------------------- | -------------------------------- |
| `/armor:status`      | Health summary across all assets |
| `/armor:alerts`      | Query and manage alerts          |
| `/armor:connect`     | Connect a new data source        |
| `/armor:monitor`     | Set up freshness monitoring      |
| `/armor:ask`         | Natural language Q\&A            |
| `/armor:analyze`     | Trigger AI analysis              |
| `/armor:quality`     | Data quality checks              |
| `/armor:lineage`     | Explore data dependencies        |
| `/armor:investigate` | Root cause analysis              |

<Tip>
  You can also ask questions naturally without using slash commands. Claude will use the appropriate tools automatically.
</Tip>

## Configuration

### Remote Server (OAuth)

No configuration file needed. Authentication is handled automatically through your browser. To re-authenticate or check connection status:

```
/mcp
```

Select the `anomalyarmor` server to reconnect or view status.

### Local Server / Plugin (API Key)

Set your API key in `~/.armor/config.yaml`:

```yaml theme={null}
api_key: aa_live_your_key_here
```

Or use an environment variable:

```bash theme={null}
export ARMOR_API_KEY="aa_live_your_key_here"
```

### Verify Connection

Check that MCP tools are available:

```bash theme={null}
claude mcp list
```

You should see `anomalyarmor` listed with a connected status.

## Troubleshooting

### Remote Auth: Browser Not Opening

**Solution**:

1. Run `/mcp` in Claude Code and select reconnect
2. If behind a proxy, you may need to use the local server option instead

### Remote Auth: Empty Responses

If tools connect but return no data:

**Solution**:

1. Clear auth and re-authenticate: remove the server with `claude mcp remove anomalyarmor`, then re-add it
2. Verify you have data sources connected in the AnomalyArmor dashboard

### Skills Not Loading

**Solution**:

1. Verify plugin installed: `claude plugin list`
2. Restart Claude Code
3. Check for updates: `claude plugin update armor@anomalyarmor`

### API Key Auth Error

**Solution**:

1. Verify API key is set correctly in your MCP config or env var
2. Check key permissions in AnomalyArmor dashboard
3. Regenerate key if needed

## Next Steps

## Common Questions

### How do I add the AnomalyArmor MCP server to Claude Code?

Run `claude mcp add anomalyarmor https://mcp.anomalyarmor.ai/mcp --transport http --header "Authorization: Bearer $ARMOR_API_KEY"`. Or add it to `~/.claude.json` manually under `mcpServers`. Both methods are equivalent. Restart Claude Code to pick up the change.

### Do I need a Claude API key to use AnomalyArmor in Claude Code?

You need a Claude Code install (which authenticates to Anthropic separately) and an AnomalyArmor API key. Get the AnomalyArmor key from **Settings → API Keys**. Claude Code itself handles Anthropic auth via its own login flow.

### Can I try AnomalyArmor in Claude Code without creating an account?

Yes - use the demo flow. Claude Code will auto-mint a short-lived demo key (1-hour expiry, read-only) the first time you invoke an AnomalyArmor skill. To get your own data, sign up at [app.anomalyarmor.ai/sign-up](https://app.anomalyarmor.ai/sign-up) and swap in a real API key.

### Why do some AnomalyArmor actions in Claude Code ask for confirmation while others don't?

Read-only tools (check freshness, list alerts, describe asset) execute immediately. Mutating tools (create metric, dismiss alert, update tag) require confirmation via Claude Code's tool-use approval flow so you never accidentally change state. You can trust-list specific tools in Claude Code's settings.

<CardGroup cols={2}>
  <Card title="Skills Reference" icon="book" href="/ai-agents/overview">
    Complete skills documentation
  </Card>

  <Card title="MCP Server" icon="plug" href="/integrations/mcp-server">
    Advanced MCP configuration
  </Card>

  <Card title="Python SDK" icon="python" href="/sdk/overview">
    Programmatic access
  </Card>

  <Card title="API Reference" icon="code" href="/api/overview">
    REST API documentation
  </Card>
</CardGroup>
