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

# MCP AI Agent

> Connect Claude, Cursor, and MCP agents to generate and import courses instantly.

Connect external AI agents (Claude Code, Cursor, Antigravity, and other Model Context Protocol agents) to xkat. With a single prompt, your AI agent can discover available lab environments, author a complete hands-on guide following domain rules, and import it directly into your account as a private draft.

## Quick Workflow

<Steps>
  <Step title="Connect via Personal Access Token">
    Issue an access token in [Settings → AI Tokens](https://xkat.space/en/settings/ai-tokens), then register the remote MCP endpoint (`https://mcp.xkat.space/mcp`) in your AI agent configuration.
  </Step>

  <Step title="Prompt Your AI Agent">
    Ask in plain language: *"Create a Debian 12 installation practice guide for QEMU."*
  </Step>

  <Step title="Discovery & Guide Generation">
    The agent uses `list_lab_profiles` and `get_guide_spec` to inspect supported environments (`debian_qemu`) and authoring constraints (single-command actions, Mermaid diagrams, clean learner immersion).
  </Step>

  <Step title="Instant Import & Player Link">
    The agent invokes `import_draft_guide` to save the course as a private draft in your account and returns a direct player URL (`https://xkat.space/en/player/<id>`).
  </Step>
</Steps>

## Client Configuration

Add the xkat remote MCP server to your agent's config file:

<Tabs>
  <Tab title="Claude Code (.mcp.json)">
    ```json theme={null}
    {
      "mcpServers": {
        "xkat": {
          "type": "http",
          "url": "https://mcp.xkat.space/mcp",
          "headers": {
            "Authorization": "Bearer <YOUR_TOKEN>"
          }
        }
      }
    }
    ```
  </Tab>

  <Tab title="Cursor (.cursor/mcp.json)">
    ```json theme={null}
    {
      "mcpServers": {
        "xkat": {
          "url": "https://mcp.xkat.space/mcp",
          "headers": {
            "Authorization": "Bearer <YOUR_TOKEN>"
          }
        }
      }
    }
    ```
  </Tab>

  <Tab title="Antigravity (mcp_config.json)">
    ```json theme={null}
    {
      "mcpServers": {
        "xkat": {
          "serverUrl": "https://mcp.xkat.space/mcp",
          "headers": {
            "Authorization": "Bearer <YOUR_TOKEN>"
          }
        }
      }
    }
    ```
  </Tab>
</Tabs>

## Available MCP Tools

| Tool | Purpose |
| :- | :- |
| `import_draft_guide` | Validates and directly saves a course (XML/YAML/JSON) as a private draft to your account, returning the player link. |
| `get_guide_spec` | Returns authoring rules and specs for domains like `os-install`, `linux-cli`, or `database-sql`. |
| `list_plugins` | Returns available viewer plugins (`desktop-viewer`, `linux-wasix`, `sql-viewer`, etc.). |
| `list_lab_profiles` | Returns supported lab execution environments (`debian_qemu`, `ubuntu_qemu`, etc.). |
| `validate_course` | Validates course structure and XML schemas without writing to the database. |
| `build_course` | Validates course input and returns synthesized XML without persisting. |

## Exposed Resources

| Resource URI | Description |
| :- | :- |
| `catalog://plugins` | Catalog of viewer plugins and runtime capabilities. |
| `catalog://lab-profiles` | Catalog of lab execution profiles and virtual environments. |
| `spec://os-install` | Authoring guidelines and badge constraints for OS installation guides. |
| `schema://course` | JSON Schema for course structure validation. |
| `template://sample-course` | Reference course in YAML for agent few-shot learning. |

## Import Quotas & Limits

Importing via `import_draft_guide` consumes your tier's monthly import quota:

* **Free** — MCP import not supported (validation & build available).
* **Basic** — 5 imports per month.
* **Pro** — 10 imports per month.
* **Creator** — Unlimited imports.

<Tip>
  Draft guides imported via MCP are saved with `isPublished: false`, so they remain strictly private to your account until you review and publish them in Studio.
</Tip>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.