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

> ## Agent Instructions
> Orq.ai is the control plane for model and MCP traffic: one key reaches the workspace's enabled models, MCP servers, and resources. The setup depends on where the agent runs.
> Hosted assistant (ChatGPT, claude.ai, a hosted sandbox): install nothing. Tell the human to add https://my.orq.ai/v2/mcp as a remote MCP connector and finish the Orq.ai sign-in. With OAuth, send no Authorization header; otherwise send an API key as a bearer token.
> Local coding agent (Claude Code, Codex, Cursor, OpenCode): run `curl -fsSL https://cli.orq.ai/install.sh | sh`. It installs the CLI and runs `orq setup`, which signs in, writes a project-scoped key to `~/.orq/env`, and wires the detected agents through the AI Gateway. It can also add the Orq MCP server and Orq Skills, the workflows for agents, evaluations, and traces: https://docs.orq.ai/ai-studio/integrations/code-assistants/orq-skills.md. Cursor receives the Orq MCP server and Orq Skills only; its model calls are not routed through the AI Gateway. Verify with `orq status`.
> Headless or CI: read `ORQ_API_KEY` from the environment; a human creates the key at https://docs.orq.ai/ai-studio/organization/api-keys.md.
> Send model traffic to https://my.orq.ai/v3/router with `Authorization: Bearer $ORQ_API_KEY`; the Anthropic SDK uses https://my.orq.ai/v3/anthropic. New integrations go on `/v3/router`: `/v2/router` stays published for backward compatibility, and `orq.prompt` works only on `/v2/router/chat/completions`.
> To enable a model for the workspace, ask a human to enable it in the Model Garden, or call `POST /v2/workspace-models` with a Management Key that has `workspace-model` write; API keys are rejected with `403`. Use the model's exact `provider/model` id. A call fails while the workspace has neither credits nor a provider key.
> On `/chat/completions`, a reasoning model rejects `tools` with a `reasoning_effort` other than `none`; `/responses` keeps reasoning.
> On a failure, branch on `error.code` and follow `error.doc_url`; a budget rejection answers 429.

# Provider setup guides

> Provider-side steps and the exact values to enter when connecting HubSpot, Microsoft Work IQ and other MCP providers.

Some providers need setup on their side before **Orq.ai** can connect, such as registering an application, granting permissions, or creating client credentials. These steps happen in the provider's own console and usually need an administrator of that account.

Each guide below lists the provider-side steps first, then the exact values to enter in **Orq.ai**.

## HubSpot

HubSpot's authorization server does not register clients automatically, so [Per-user OAuth](https://docs.orq.ai/ai-gateway/mcp-portal/mcp-servers.md#per-user-oauth) needs a client created in HubSpot first.

**1. Create an MCP connector in HubSpot**

In the HubSpot account, open **Development > MCP Connectors** and click **Create MCP connector**. The page is also reachable at [app.hubspot.com/l/mcp-auth-apps](https://app.hubspot.com/l/mcp-auth-apps/).

Enter a **Name** and set **Redirect URL** to:

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
https://my.orq.ai/mcp/connect/callback
```

![HubSpot Create MCP Connector dialog with the Name field set to Orqai MCP Gateway, an empty Description, the Redirect URL field set to https://my.orq.ai/mcp/connect/callback, an Icon upload area, and Create and Cancel buttons.](https://mintcdn.com/orqai/Aeu0APN4HXnydQ33/images/mcp-hubspot-create-connector-419.png?fit=max\&auto=format\&n=Aeu0APN4HXnydQ33\&q=85\&s=201ea5391783df08981b9c477780259a)

The Create MCP Connector dialog in HubSpot. Name and Redirect URL are required.

See HubSpot's [MCP server guide](https://developers.hubspot.com/docs/apps/developer-platform/build-apps/integrate-with-the-remote-hubspot-mcp-server) for the other connector options.

**2. Copy the client credentials**

Open the connector's details page and copy the **Client ID** and **Client secret**.

![HubSpot connector details showing a Client ID row described as unique to the app and used for initiating OAuth, and a Client secret row described as used for OAuth validation.](https://mintcdn.com/orqai/Aeu0APN4HXnydQ33/images/mcp-hubspot-client-credentials-419.png?fit=max\&auto=format\&n=Aeu0APN4HXnydQ33\&q=85\&s=39bec1a7123ee7d542dcbcdd04d3f3a1)

The two values to copy from the HubSpot connector into the MCP Server form.

**3. Create the MCP Server**

In **Orq.ai**, click <kbd>+ Server</kbd> in the **MCP Servers** tab, then **Create** on the **MCP URL** card. Select **Per-user OAuth**, expand **Advanced configuration**, and enter:

| Field | Value |
| - | - |
| **URL** | `https://mcp.hubspot.com` |
| **Client ID** | The connector's client ID. |
| **Client secret** | The connector's client secret. |
| **Authorization server issuer** | `https://mcp.hubspot.com` |
| **Resource URL** | `https://mcp.hubspot.com` |
| **Scopes** | Leave blank. HubSpot sets the scopes from the permissions granted during sign-in. |

Enter the three URLs without a trailing slash. **Authorization server issuer** and **Resource URL** must match the values HubSpot publishes character for character.

**4. Connect an account**

Click **Test connection**, then <kbd>Create</kbd>. On the server detail page, click **Connect account** and sign in to HubSpot.

HubSpot requires an admin of the HubSpot account to connect before other users of that account can.

## Microsoft Work IQ

Work IQ is Microsoft's hosted MCP server for Microsoft 365 data. It signs users in through Microsoft Entra, which does not register clients automatically, so [Per-user OAuth](https://docs.orq.ai/ai-gateway/mcp-portal/mcp-servers.md#per-user-oauth) needs an app registration in the Entra tenant first.

Before starting, the Microsoft 365 tenant must be enabled for Work IQ, with usage-based billing covering the users who will connect. Microsoft's [Work IQ client guide](https://learn.microsoft.com/en-us/microsoft-365/copilot/extensibility/work-iq/claude) describes the Entra steps in more detail; it is written for another client, so use the redirect URI below.

**1. Register an application in Microsoft Entra**

In the [Microsoft Entra admin center](https://entra.microsoft.com), open **Entra ID > App registrations** and click **New registration**.

| Field | Value |
| - | - |
| **Supported account types** | **Accounts in this organizational directory only (Single tenant)** |
| **Redirect URI** platform | **Web** |
| **Redirect URI** | `https://my.orq.ai/mcp/connect/callback` |

After registering, copy the **Application (client) ID** and the **Directory (tenant) ID** from the **Overview** page.

**2. Add the Work IQ permission**

On the app registration, open **API permissions > Add a permission > APIs my organization uses**. Search for the Work IQ application ID:

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
fdcc1f02-fc51-4226-8753-f668596af7f7
```

Select **Delegated permissions**, then **WorkIQAgent.Ask**, and click **Add permissions**. An administrator then clicks **Grant admin consent** on the same page.

`WorkIQAgent.Ask` allows reading and writing Microsoft 365 data on behalf of the signed-in user.

**3. Create a client secret**

Open **Certificates & secrets > Client secrets** and click **New client secret**. Copy the secret's **Value**, not its **Secret ID**. The value is shown once.

**4. Create the MCP Server**

In **Orq.ai**, click <kbd>+ Server</kbd> in the **MCP Servers** tab, then **Create** on the **MCP URL** card. Select **Per-user OAuth**, expand **Advanced configuration**, and enter:

| Field | Value |
| - | - |
| **URL** | `https://workiq.svc.cloud.microsoft/mcp` |
| **Client ID** | The **Application (client) ID**. |
| **Client secret** | The client secret **Value**. |
| **Authorization server issuer** | `https://login.microsoftonline.com/<tenant-id>/v2.0`, with the **Directory (tenant) ID** in place of `<tenant-id>`. |
| **Resource URL** | Leave blank. |
| **Scopes** | `offline_access` |

The issuer must name the tenant. The `organizations` and `common` endpoints that Microsoft advertises do not work with a single-tenant application.

**5. Connect an account**

Click **Test connection**, then <kbd>Create</kbd>. On the server detail page, click **Connect account** and sign in with a Microsoft 365 work account.

Tools that use billed Work IQ features return an error until the tenant has a billing policy that covers the signed-in user.


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