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

# Use Fibre from your coding agent

> Give Claude Code, Codex, Cursor or any other coding agent the Fibre docs, so it can write Fibre code for you: an MCP server to search them, an index written for language models, a Markdown copy of every page, and a prompt to paste.

Coding agents such as Claude Code, Codex and Cursor are very good at writing code against an API, as long as they
can read its documentation. If your agent can read these docs, you can simply ask it for what you want, for example
"run my tests in a Fibre sandbox" or "give each user of my app their own sandbox", and it will write the code for
you.

> [!NOTE]
>
> This page is about your agent **writing code** that uses Fibre. To let your agent **use sandboxes itself**, to run
> your tests, builds and servers away from your machine, add Fibre's own MCP server instead: see
> [MCP server and skill](https://docs.fibre.dev/build-with-ai/mcp-server.md).

There are three ways to give your agent the docs. You only need one of them:

| Way | What it is | Best for |
| - | - | - |
| **The docs' MCP server** | A small service your agent connects to. It lets the agent search the docs and read any page whenever it needs to | Agents that support MCP: Claude Code, Codex, Cursor, VS Code |
| **`llms.txt`** | A plain-text index of every page, written for language models | Any agent that can fetch a URL |
| **Copy a page** | The Markdown of one page, pasted into the conversation | A quick question about one topic |

## Connect the docs' MCP server

MCP (Model Context Protocol) is a standard way for an AI agent to use outside tools. These docs run an MCP server
at this address:

```text theme={null}
https://docs.fibre.dev/mcp
```

Once your agent is connected to it, the agent gets two tools: one that **searches the docs**, and one that **reads
a full page**. It uses them on its own while it works, so it always writes code against the current API.

To add it, run the command for your agent:

```bash title="Claude Code" norun reason="adds the server to your own agent" theme={null}
claude mcp add --transport http fibre-docs https://docs.fibre.dev/mcp
```

```bash title="Codex" norun reason="adds the server to your own agent" theme={null}
codex mcp add fibre-docs --url https://docs.fibre.dev/mcp
```

If you use **Cursor** or **VS Code**, you do not need a command. Open the menu at the top of any page of these
docs and choose **Connect to Cursor** or **Connect to VS Code**. For any other agent, the same menu has
**Copy MCP install command** and **Copy MCP server URL**, which you can paste into your agent's settings.

You can check that the server answers with a single request. It lists the two tools:

```bash title="curl" run theme={null}
curl -sS -X POST https://docs.fibre.dev/mcp \
  -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}'
```

> [accordion] Output
>
> ```text title="output" expected theme={null}
> search_fibre
> ```

## Point your agent at `llms.txt`

`llms.txt` is a convention for giving language models a map of a documentation site. These docs publish two
versions:

* **[`/llms.txt`](https://docs.fibre.dev/llms.txt)** lists every page with a one-line description. Give this
  to your agent first, so it knows what exists and can fetch the pages it needs.
* **[`/llms-full.txt`](https://docs.fibre.dev/llms-full.txt)** contains all of the docs in one file. It is
  useful when your agent cannot fetch pages one by one.

Every page is also available as plain Markdown. Add `.md` to the end of its address, for example
[`/get-started/quickstart.md`](https://docs.fibre.dev/get-started/quickstart.md).

## Copy a single page

For a quick question about one topic, open the menu at the top of the page you are reading. **Copy page** copies
it as Markdown, ready to paste into any chat. **Open in Claude** and **Open in ChatGPT** start a new conversation
with the page already included.

## A prompt to paste

If you would like a starting point, paste this prompt into your agent and then describe what you want to build
after it. It tells the agent where to read and asks it to clean up after itself:

```text theme={null}
Use Fibre to run code in an isolated sandbox. Read https://docs.fibre.dev/llms.txt and the quickstart first.
Use the TypeScript SDK (@fibre-dev/sdk) or the Python SDK (fibre-sdk); my API key is in FIBRE_API_KEY. Give every sandbox a lifetime and labels,
delete it when the work is done, and show me each command's output.
```

## Run the agent itself inside a sandbox

Everything above is about your agent *writing code that uses* Fibre. You can also do the opposite: run the coding
agent itself **inside** a Fibre sandbox. The agent then works on a copy of your repository in a machine of its own,
where it can install packages and run commands freely without touching your computer.

These pages show how, step by step:

* **[Claude Code](https://docs.fibre.dev/build-with-ai/claude-code.md)**: Anthropic's coding agent, run without a terminal.
* **[Codex](https://docs.fibre.dev/build-with-ai/codex.md)**: OpenAI's coding agent.
* **[OpenCode](https://docs.fibre.dev/build-with-ai/opencode.md)**: an open-source agent that works with many models.
* **[Claude Agent SDK](https://docs.fibre.dev/build-with-ai/claude-agent-sdk.md)**: build your own agent and run it in a sandbox.
* **[Agent frameworks](https://docs.fibre.dev/build-with-ai/agent-frameworks.md)**: give an agent in your own app a tool that runs its commands in a sandbox.

When an agent runs inside a sandbox, give it a [key that only works on that sandbox](https://docs.fibre.dev/get-started/api-keys.md#a-key-for-one-sandbox).
That way, even if the agent misbehaves, it cannot reach your other sandboxes.

## Next

* **[Quickstart](https://docs.fibre.dev/get-started/quickstart.md)**: the calls your agent will make, explained step by step.
* **[Concepts](https://docs.fibre.dev/get-started/concepts.md)**: the words your agent will meet in these docs.


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