---
title: "API reference"
description: "The protocol reference - authentication, every MCP tool, the REST API and the change feed."
canonical_url: "https://trytree.house/docs/agents/reference"
last_updated: "2026-09-29"
---

# API reference

The protocol reference - authentication, every MCP tool, the REST API and the change feed.

Treehouse exposes one workspace through three programmatic surfaces: the **MCP server** for agents, the **REST API** for scripts and integrations, and the **change feed** for anything that needs to react to edits. They go through the same file service as the web app and the [sync CLI](https://trytree.house/docs/desktop/cli-reference), so versions, conflicted copies and attribution behave identically whichever you use. The rules that matter most are in [versions and conflicts](https://trytree.house/docs/agents/handbook/versions-and-conflicts).

To connect Claude Code, Codex or another assistant you don't need this section: start with [connect an agent](https://trytree.house/docs/agents/connect). These pages are the detail behind it.

| Surface | Hosted URL |
| --- | --- |
| REST API | `https://api.trytree.house/api` |
| MCP server | `https://api.trytree.house/api/mcp` |
| Web app | `https://app.trytree.house` |
| CLI downloads | `https://dl.trytree.house` |

Every request authenticates with an API key in the `x-api-key` header. `Authorization: Bearer` is not accepted. See [authentication](https://trytree.house/docs/agents/reference/authentication) for how to get a key and what it can reach.

## In this section

- [Authentication](https://trytree.house/docs/agents/reference/authentication): How API keys work, what each kind of key can reach, the device authorisation flow the CLI and desktop app use, and how keys are revoked.
- [MCP server](https://trytree.house/docs/agents/reference/mcp-server): Every tool the Treehouse MCP server exposes, with parameters, outputs, limits and the instructions it gives connected agents.
- [REST API](https://trytree.house/docs/agents/reference/rest-api): Endpoints for reading, writing, moving, searching, sharing and commenting on workspace files over HTTP, with headers, status codes and examples.
- [Change feed](https://trytree.house/docs/agents/reference/change-feed): Read every change to a workspace in order with a cursor, so a script or agent can react to new and edited files.
