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

# Using with AI agents

> Drive the HalfPage API from an AI agent using the OpenAPI spec, llms.txt, and the hosted MCP server.

The HalfPage API is designed to be driven by AI agents as well as humans. This
page lists the machine-readable resources this documentation site exposes and how
to connect an agent to them.

<Note>
  These resources describe the API and this documentation. Any request an agent
  makes to the HalfPage API itself still needs your API key
  (`Authorization: Bearer hp_live_…`) — see [Authentication](/authentication).
  Treat the key as a secret when handing it to an agent.
</Note>

## OpenAPI specification

The entire API surface — all 10 endpoints, their parameters, request/response
schemas, and examples — is described by a single OpenAPI 3.1 document. The
[API reference](/api-reference) is generated directly from it.

* **Committed snapshot:** [`/api-reference/openapi.json`](/api-reference/openapi.json)
* **Live spec (once the API is deployed):** `https://api.halfpagetechnologies.com/backend/openapi.json`

Point any OpenAPI-aware tool (code generators, agent frameworks, Postman, etc.) at
either URL to get a typed client for the workflow.

## llms.txt

Mintlify automatically generates and hosts [`llms.txt`](https://llmstxt.org/)
files for this site — no configuration required. They give an LLM a structured
index of every page so it can navigate the docs efficiently.

| File               | URL                                                   |
| ------------------ | ----------------------------------------------------- |
| Page index         | `https://docs.halfpagetechnologies.com/llms.txt`      |
| Full docs, inlined | `https://docs.halfpagetechnologies.com/llms-full.txt` |

Paste either URL into a chat with an LLM, or add it to your agent's context, to
give it grounding in the HalfPage API.

## MCP server

Mintlify also hosts a [Model Context Protocol](https://modelcontextprotocol.io)
server for this site automatically, at the `/mcp` path. It lets an MCP-capable
agent **search these docs** as a tool:

```
https://docs.halfpagetechnologies.com/mcp
```

The server is public and searches all indexed public pages. Connect to it from
any MCP client:

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

  <Tab title="Cursor / VS Code">
    Add it to your MCP configuration as a remote (HTTP) server:

    ```json theme={null}
    {
      "mcpServers": {
        "halfpage-docs": {
          "url": "https://docs.halfpagetechnologies.com/mcp"
        }
      }
    }
    ```
  </Tab>

  <Tab title="Contextual menu">
    Every page on this site has a menu (top right) with **Copy page**, **View as
    Markdown**, and options to open the page or the MCP server directly in Claude,
    ChatGPT, Cursor, or VS Code.
  </Tab>
</Tabs>

<Tip>
  The exact steps to register a remote MCP server vary by client and version — if
  a snippet above is out of date for your tool, use the canonical URL
  `https://docs.halfpagetechnologies.com/mcp` with your client's "add remote/HTTP
  MCP server" flow.
</Tip>

## Putting it together

A typical agent setup:

1. Load `llms-full.txt` (or connect the MCP server) so the agent understands the
   API and this workflow.
2. Generate a client from the [OpenAPI spec](/api-reference/openapi.json).
3. Give the agent an `hp_live_…` API key and let it run the
   [upload → predict → export](/quickstart) loop.
