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

# Connect Claude to AO over MCP

> Connect Claude Code and Claude Desktop to Automated Operations through the local AO agent with durable account profiles, scoped roles, and audit logging.

AO exposes your infrastructure to AI assistants through the
[Model Context Protocol](https://modelcontextprotocol.io). Every tool
call is scoped to your organization and recorded in the audit log.

Claude launches the local AO agent over stdio. The agent connects upstream to
`https://mcp.automatedoperations.com`, owns the refreshable session, and keeps
separate account and organization profiles. The first use opens a browser to
sign in and pick an **agent role**; switching to an existing profile does not
require another login.

Agent roles are a separate, org-wide pool curated under
**IAM → Roles → Agent roles** — distinct from the user roles assigned to
members. Any member can pick any agent role for a session, and the
agent's effective access is always capped at your own. The catalog
owner controls the menu; you choose how much of it to lend the agent.

## One-command setup

```bash theme={null}
npx @ao-mcp/setup
```

This detects the AI clients installed on your machine (Claude Code,
Claude Desktop, Cursor, VS Code, and more — all pre-selected, deselect
any you don't want), configures each one to launch `@ao-mcp/local` over
stdio, writes a backup, and verifies the connection. Needs Node 20+.

The rest of this page is the manual equivalent for Claude specifically.
For other clients, see the [client matrix](https://automatedoperations.com/mcp).

## Claude Code

```bash theme={null}
npx @ao-mcp/setup --client claude-code
```

Then run `/mcp` inside Claude Code to complete the sign-in on first use.

## Claude Desktop

The setup command writes the same stdio entry to Claude Desktop's MCP config:

```json theme={null}
{
  "mcpServers": {
    "AutomatedOperations": {
      "command": "npx",
      "args": ["-y", "--prefer-online", "@ao-mcp/local@latest"]
    }
  }
}
```

Restart Claude Desktop after changing its configuration. The local AO agent
prompts you to authorize with your AO account and select an agent role.

## What your assistant can do

* List services and hosts, with live status
* Pull recent changes and incident-relevant context
* Run **on-demand diagnostics** against a host — fresh answers, not
  stale dashboards

Every call is permission-checked and lands in your audit trail.
