> For the complete documentation index, see [llms.txt](https://docs.orchard.airoverflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.orchard.airoverflow.com/mcp/configure.md).

# Configure your client

The server reads the same environment as the SDK and CLI:

| var                          | meaning                       |
| ---------------------------- | ----------------------------- |
| `ORCHARD_API_URL`            | control-plane URL             |
| `ORCHARD_API_KEY`            | API key                       |
| `ORCHARD_ORG` / `ORCHARD_WS` | optional org / workspace slug |

Point your client at the `orchard-mcp` command over stdio, passing those as environment. A [scoped API key](https://github.com/TheFlash2k/orchard/tree/main/docs/sdk/guides/scoped-api-keys.md) limited to the sandboxes and capabilities the agent should touch is the safe choice here.

## Claude Desktop

`claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "orchard": {
      "command": "orchard-mcp",
      "env": {
        "ORCHARD_API_URL": "https://orchard.example.com",
        "ORCHARD_API_KEY": "orc_…"
      }
    }
  }
}
```

## Claude Code

Project-local `.mcp.json` (same shape), or:

```bash
claude mcp add orchard --env ORCHARD_API_URL=https://orchard.example.com \
                       --env ORCHARD_API_KEY=orc_… -- orchard-mcp
```

## Cursor

`~/.cursor/mcp.json` (or a project `.cursor/mcp.json`) takes the same `mcpServers` block as above.

After editing, restart the client (or reload its MCP servers). You should see the Orchard tools listed; if not, run `orchard-mcp` in a terminal with the same env to check it starts.

Next: [the tools](/mcp/tools.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.orchard.airoverflow.com/mcp/configure.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
