> ## Documentation Index
> Fetch the complete documentation index at: https://home-app.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP server

> Drive your homelab from Claude, Codex, Gemini or any MCP client.

Home exposes a JSON-RPC MCP endpoint at `POST /api/mcp`. It speaks the
protocol directly — `initialize`, `tools/list`, `tools/call`, batch
requests and notifications — so any MCP client that can POST JSON can use
it.

## Tools

Nine tools cover the day-to-day surface:

| Tool | What it does |
| - | - |
| `list_projects` | Projects with status and container counts |
| `get_project` | One project: stacks, containers, domains |
| `list_deployments` | Recent deployments with status and triggers |
| `deploy_stack` | Run an action (up/down/pull/restart/redeploy) — confirm-gated |
| `list_backups` / `run_backup` | Backup history and manual runs — confirm-gated |
| `list_domains` | Domains with provider and status |
| `debloat_scan` | Reclaimable-space report (scan only, never deletes) |
| `get_health` | Instance health and Docker connectivity |

Destructive calls require a `confirm: true` argument — a chat client can't
tear anything down by accident.

## Authentication

Two ways in:

* **Session cookie** — browsers already signed in (used by the
  `/modules/mcp` tool-list page)
* **Bearer token** — set `HOME_MCP_TOKEN` in the environment, then send
  `Authorization: Bearer <token>`. Required for external clients.

## Connecting clients

The `/modules/mcp` page has a **connect card** with copy-ready snippets per
client. The general shape:

> [tab] Claude Code
>
> ```bash theme={null}
> claude mcp add home --transport http \
>   http://<host>:3000/api/mcp \
>   --header "Authorization: Bearer <HOME_MCP_TOKEN>"
> ```

> [tab] Claude Desktop
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "home": {
>       "type": "http",
>       "url": "http://<host>:3000/api/mcp",
>       "headers": { "Authorization": "Bearer <HOME_MCP_TOKEN>" }
>     }
>   }
> }
> ```

> [tab] Any JSON-RPC client
>
> ```bash theme={null}
> curl -X POST http://<host>:3000/api/mcp \
>   -H "Authorization: Bearer <HOME_MCP_TOKEN>" \
>   -H "content-type: application/json" \
>   -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'
> ```

> [!TIP]
>
> Use one `HOME_MCP_TOKEN` per client and rotate by restarting Home with a
> new value — sessions are unaffected.


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