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

# AI & Agents

> Connect AI assistants and agents to CNAP through MCP servers, contextual features, and llms.txt

CNAP is built for agentic operations. Instead of clicking through dashboards, your AI agents manage clusters, deploy products, and automate infrastructure through the same API that powers the platform — via the [Model Context Protocol (MCP)](https://modelcontextprotocol.io). Two MCP servers provide full access to documentation and the platform API, turning any MCP-compatible tool into a CNAP control plane.

## Quick Setup

Connect your AI tool in under a minute. Pick your editor:

<Tabs>
  <Tab title="Claude Code">
    ```bash theme={null}
    claude mcp add --transport http cnap-docs https://docs.cnap.tech/mcp
    claude mcp add --transport http cnap https://cnap.tech/mcp
    ```

    Verify:

    ```bash theme={null}
    claude mcp list
    ```
  </Tab>

  <Tab title="Cursor">
    Press `Cmd+Shift+P` → "Open MCP settings" → Add:

    ```json mcp.json theme={null}
    {
      "mcpServers": {
        "cnap-docs": {
          "url": "https://docs.cnap.tech/mcp"
        },
        "cnap": {
          "url": "https://cnap.tech/mcp"
        }
      }
    }
    ```
  </Tab>

  <Tab title="VS Code">
    Create `.vscode/mcp.json`:

    ```json .vscode/mcp.json theme={null}
    {
      "servers": {
        "cnap-docs": {
          "type": "http",
          "url": "https://docs.cnap.tech/mcp"
        },
        "cnap": {
          "type": "http",
          "url": "https://cnap.tech/mcp"
        }
      }
    }
    ```
  </Tab>

  <Tab title="Claude Desktop">
    Config file location:

    * macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
    * Windows: `%APPDATA%\Claude\claude_desktop_config.json`
    * Linux: `~/.config/claude/claude_desktop_config.json`

    ```json claude_desktop_config.json theme={null}
    {
      "mcpServers": {
        "cnap-docs": {
          "command": "npx",
          "args": ["mcp-remote", "https://docs.cnap.tech/mcp"]
        },
        "cnap": {
          "command": "npx",
          "args": ["mcp-remote", "https://cnap.tech/mcp"]
        }
      }
    }
    ```

    On first connection to the platform server, your browser will open for OAuth authorization.
  </Tab>

  <Tab title="Other">
    Add the MCP server URLs to your tool's configuration:

    ```json theme={null}
    {
      "mcpServers": {
        "cnap-docs": {
          "url": "https://docs.cnap.tech/mcp"
        },
        "cnap": {
          "url": "https://cnap.tech/mcp"
        }
      }
    }
    ```

    <Note>
      Configuration format may vary. Refer to your tool's documentation.
    </Note>
  </Tab>
</Tabs>

| Server      | URL                          | Auth      | Use case                               |
| ----------- | ---------------------------- | --------- | -------------------------------------- |
| `cnap-docs` | `https://docs.cnap.tech/mcp` | None      | Search and query docs                  |
| `cnap`      | `https://cnap.tech/mcp`      | OAuth 2.1 | Manage clusters, products, deployments |

<Tip>
  You can set up just one server if you only need docs search or only need API access.
</Tip>

## What You Can Do

Once connected, your AI agents can:

* **Deploy and manage** — create products, spin up clusters, check deployment health, and scale infrastructure through natural language
* **Chain operations** — the platform MCP uses [Code Mode](/ai/platform-mcp#why-code-mode) so agents compose multiple API calls in a single step, like listing workspaces then checking each cluster's status
* **Query documentation** — get instant answers about CNAP features, APIs, and configuration
* **Stay current** — MCP servers return real-time data from the platform, not stale training knowledge

```text Try it theme={null}
List all clusters in my workspace and show me which ones have pending deployments.
```

## Two MCP Servers

<CardGroup cols={2}>
  <Card title="Documentation MCP" icon="book" href="/ai/docs-mcp">
    Search and query CNAP docs in real-time. No auth required — works out of the box.
  </Card>

  <Card title="Platform MCP" icon="server" href="/ai/platform-mcp">
    Manage clusters, products, and deployments via the CNAP API. Uses OAuth 2.1 and sandboxed Code Mode.
  </Card>
</CardGroup>

## Beyond MCP

CNAP's AI integration goes beyond MCP servers:

* **Contextual menu** — every doc page offers copy-as-markdown, open-in-AI, and one-click editor setup
* **llms.txt** — industry-standard files (`llms.txt` and `llms-full.txt`) for AI indexing
* **Markdown access** — append `.md` to any doc URL for AI-friendly output (e.g. `docs.cnap.tech/ai/index.md`)
