> For the complete documentation index, see [llms.txt](https://docs.docbits.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.docbits.com/advanced-functions-and-tools/docbits-mcp/quick-connect.md). Agents can also search and read this documentation through its [MCP server](https://docs.docbits.com/~gitbook/mcp).

# Quick Connect

Connect your AI assistant to DocBits in three steps: pick your environment, copy one command, sign in once. No API key is needed.

## 1. Pick your environment

Use the endpoint for the **region** (EU or US) and **environment** (Sandbox or Production) your organization lives in.

| Environment | Region | Endpoint                                    |
| ----------- | ------ | ------------------------------------------- |
| Sandbox     | EU     | `https://eu.sandbox.api.docbits.com/v3/mcp` |
| Sandbox     | US     | `https://us.sandbox.api.docbits.com/v3/mcp` |
| Production  | EU     | `https://eu.api.docbits.com/v3/mcp`         |
| Production  | US     | `https://us.api.docbits.com/v3/mcp`         |

{% hint style="warning" %}
The assistant works with the permissions of the account you sign in with, and it can change data. Changes in **Production** affect your live documents. Try new prompts in Sandbox first.
{% endhint %}

## 2. Connect with one click or one command

Use the buttons to add the server to **Cursor** or **VS Code**, or copy the command for your terminal client. Each environment uses its own server name, so you can connect Sandbox and Production side by side without mixing them up.

{% tabs %}
{% tab title="Sandbox EU" %} <a href="https://cursor.com/en/install-mcp?name=docbits-sandbox-eu&#x26;config=eyJ1cmwiOiAiaHR0cHM6Ly9ldS5zYW5kYm94LmFwaS5kb2NiaXRzLmNvbS92My9tY3AifQ%3D%3D" class="button primary">Add to Cursor</a> <a href="https://vscode.dev/redirect/mcp/install?name=docbits-sandbox-eu&#x26;config=%7B%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Feu.sandbox.api.docbits.com%2Fv3%2Fmcp%22%7D" class="button secondary">Add to VS Code</a>

{% code title="Claude Code" %}

```bash
claude mcp add --transport http docbits-sandbox-eu https://eu.sandbox.api.docbits.com/v3/mcp
```

{% endcode %}

{% code title="OpenAI Codex" %}

```bash
codex mcp add docbits-sandbox-eu --url https://eu.sandbox.api.docbits.com/v3/mcp
```

{% endcode %}

{% code title="Gemini CLI" %}

```bash
gemini mcp add --transport http docbits-sandbox-eu https://eu.sandbox.api.docbits.com/v3/mcp
```

{% endcode %}
{% endtab %}

{% tab title="Sandbox US" %} <a href="https://cursor.com/en/install-mcp?name=docbits-sandbox-us&#x26;config=eyJ1cmwiOiAiaHR0cHM6Ly91cy5zYW5kYm94LmFwaS5kb2NiaXRzLmNvbS92My9tY3AifQ%3D%3D" class="button primary">Add to Cursor</a> <a href="https://vscode.dev/redirect/mcp/install?name=docbits-sandbox-us&#x26;config=%7B%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fus.sandbox.api.docbits.com%2Fv3%2Fmcp%22%7D" class="button secondary">Add to VS Code</a>

{% code title="Claude Code" %}

```bash
claude mcp add --transport http docbits-sandbox-us https://us.sandbox.api.docbits.com/v3/mcp
```

{% endcode %}

{% code title="OpenAI Codex" %}

```bash
codex mcp add docbits-sandbox-us --url https://us.sandbox.api.docbits.com/v3/mcp
```

{% endcode %}

{% code title="Gemini CLI" %}

```bash
gemini mcp add --transport http docbits-sandbox-us https://us.sandbox.api.docbits.com/v3/mcp
```

{% endcode %}
{% endtab %}

{% tab title="Production EU" %} <a href="https://cursor.com/en/install-mcp?name=docbits-prod-eu&#x26;config=eyJ1cmwiOiAiaHR0cHM6Ly9ldS5hcGkuZG9jYml0cy5jb20vdjMvbWNwIn0%3D" class="button primary">Add to Cursor</a> <a href="https://vscode.dev/redirect/mcp/install?name=docbits-prod-eu&#x26;config=%7B%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Feu.api.docbits.com%2Fv3%2Fmcp%22%7D" class="button secondary">Add to VS Code</a>

{% code title="Claude Code" %}

```bash
claude mcp add --transport http docbits-prod-eu https://eu.api.docbits.com/v3/mcp
```

{% endcode %}

{% code title="OpenAI Codex" %}

```bash
codex mcp add docbits-prod-eu --url https://eu.api.docbits.com/v3/mcp
```

{% endcode %}

{% code title="Gemini CLI" %}

```bash
gemini mcp add --transport http docbits-prod-eu https://eu.api.docbits.com/v3/mcp
```

{% endcode %}
{% endtab %}

{% tab title="Production US" %} <a href="https://cursor.com/en/install-mcp?name=docbits-prod-us&#x26;config=eyJ1cmwiOiAiaHR0cHM6Ly91cy5hcGkuZG9jYml0cy5jb20vdjMvbWNwIn0%3D" class="button primary">Add to Cursor</a> <a href="https://vscode.dev/redirect/mcp/install?name=docbits-prod-us&#x26;config=%7B%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fus.api.docbits.com%2Fv3%2Fmcp%22%7D" class="button secondary">Add to VS Code</a>

{% code title="Claude Code" %}

```bash
claude mcp add --transport http docbits-prod-us https://us.api.docbits.com/v3/mcp
```

{% endcode %}

{% code title="OpenAI Codex" %}

```bash
codex mcp add docbits-prod-us --url https://us.api.docbits.com/v3/mcp
```

{% endcode %}

{% code title="Gemini CLI" %}

```bash
gemini mcp add --transport http docbits-prod-us https://us.api.docbits.com/v3/mcp
```

{% endcode %}
{% endtab %}
{% endtabs %}

For **Claude Desktop** and **claude.ai**, add a custom connector instead: open the connector settings, choose **Add custom connector**, and paste the endpoint from the table.

## 3. Sign in once

The first connection opens the DocBits login in your browser. If you are already signed in to DocBits, you go straight to the consent screen. Approve it and you are connected.

{% tabs %}
{% tab title="Claude Code" %}
Start Claude Code, run `/mcp`, select the DocBits server and choose **Authenticate**.
{% endtab %}

{% tab title="OpenAI Codex" %}
Replace `docbits-sandbox-eu` with the server name you added:

```bash
codex mcp login docbits-sandbox-eu
```

{% endtab %}

{% tab title="Gemini CLI" %}
Gemini CLI opens the login the first time it uses the server. You can start it again from the `/mcp` menu.
{% endtab %}
{% endtabs %}

You only sign in once. The client renews its access automatically for 30 days of use.

## 4. Check the connection

Start a new conversation and send this prompt:

```
Read only. Call get_api_info and get_current_user. Show the API host and my
organization name. Do not change any setting and do not process documents.
```

The API host in the answer must match the endpoint you chose, for example `eu.sandbox.api.docbits.com` for Sandbox EU. If it does not, remove the server and add it again with the right endpoint.

## Next steps

* [Examples](https://docs.docbits.com/advanced-functions-and-tools/docbits-mcp/examples.md): ready-made prompts for documents, search and analytics
* [Configure DocBits with Claude or Codex](https://docs.docbits.com/advanced-functions-and-tools/docbits-mcp/configuration-with-claude-or-codex.md): change settings safely with preview, confirm and undo
* [Setup & Configuration](https://docs.docbits.com/advanced-functions-and-tools/docbits-mcp/setup-and-configuration.md): API key login for automation and how the OAuth sign-in works

## Troubleshooting

| Symptom                                              | Fix                                                                                                                                                                                                               |
| ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| The login page does not open                         | Run the sign-in step again. On a machine without a browser, use an API key as described in [Setup & Configuration](https://docs.docbits.com/advanced-functions-and-tools/docbits-mcp/setup-and-configuration.md). |
| `401` after connecting                               | The sign-in expired. Authenticate the server again.                                                                                                                                                               |
| The assistant shows data from the wrong organization | You chose the wrong region or environment. Remove the server and add the right endpoint.                                                                                                                          |
| Tools are missing                                    | Your DocBits role does not allow those features. Ask your administrator.                                                                                                                                          |


---

# 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.docbits.com/advanced-functions-and-tools/docbits-mcp/quick-connect.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.
