# Set up your environment

Before you can use Coauthor, [contact us](https://ckeditor.com/contact/) to enable it for your environment. Then add `DocumentCompare` to your editor bundle, and find the MCP address that your agent connects to.

![The three steps of setup: Coauthor is turned on for your environment, your editor bundle has DocumentCompare, and your agent connects to the MCP address. Then the edits or suggestions arrive in the document.](https://ckeditor.com/docs/cs/latest/assets/img/agent-toolkit/set-up.png)

To try it in a few minutes instead, follow the [Quick start](quick-start.md).

<a id="add-documentcompare-to-your-editor-bundle"></a>

## Add DocumentCompare to your editor bundle

Cloud Services runs your editor bundle in every session. Coauthor checks and applies your agent’s edits with that editor. So your bundle needs these premium features of CKEditor 5:

* `DocumentCompare`, always. Coauthor reads the document and applies the edits with this plugin. Without it, a session cannot open.
* `TrackChanges`, if your agent’s edits should arrive as suggestions.
* `Comments`, if your documents have comments.

Add these plugins to your existing editor configuration. Then build the bundle and upload it under a new version, as [Editor bundle](../../collaboration/editor-bundle.md) describes.

The version that a session runs depends on the type of document:

* **A live document:** the session runs the version that your editors use.
* **An uploaded document:** your backend picks the version when it opens the session.
* **A snapshot:** your backend picks the version too. Pick the version of the editor that took the snapshot.

[Document types](document-types.md) describes the three types.

<a id="find-the-mcp-address"></a>

## Find the MCP address

Your agent connects to the MCP address of your environment:

```
https://<organizationId>.cke-cs.com/toolkit/v1/environments/<environmentId>/mcp
```

* `<organizationId>` is the first part of the host name of your Cloud Services addresses. For the token URL `https://17717-dev.cke-cs.com/token/dev/XXX`, it is `17717-dev`.
* `<environmentId>` is the ID of your environment in the Customer Portal.

Your backend opens, applies, and closes sessions at the same address, without `/mcp` at the end.

<a id="next-steps"></a>

## Next steps

* **[Authentication](authentication.md)** shows how your backend signs the tokens of your agent.
* **[Connect an agent](connect-an-agent.md)** shows how your agent connects and works on a document.

---

Full index of the Cloud Services documentation: [llms.txt](../../../../llms.txt)
