---
title: "Connectors"
description: "Named MCP servers with OAuth login, a secret or a Run identity, shared across agents."
---

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

# Connectors

A connector is a remote MCP server that an org admin configures once. The admin logs in with OAuth, names a run secret, or selects a Run identity (OIDC). Then the admin grants the connector to the org, a repo or an agent. An agent uses it by name in `agent.yml`.

```yaml agent.yml
connectors: [linear]
```

The agent gets the tools of the server as `mcp_{connector}_{tool}`, for example `mcp_linear_list_issues`. The token never reaches the agent, the model or the agent code. The egress layer adds it only to the requests of that connector, and redacts it from the answer. Two connectors on one host never share a token.

## Create a connector

Open **Integrations** in the console, then **MCP connectors**. In business mode, this page is **Connected tools**. Select **Add connector**. Writes, logins and grants need the admin role. A member sees the page as read only.

### Connector library

**Add connector** opens the connector library. The library holds 60 presets in 9 categories, for example Notion. You can search by name, description or category, and filter by category.

- Select a preset to fill the new-connector form with its server URL, auth type and setup text.
- Select **Add custom connector** to open an empty form.
- When the preset name is already in use, the form adds a suffix, for example `notion-2`.

A preset is a setup aid, not a verified connection. You must still log in and add grants. For Google Workspace or Microsoft 365 mail and calendars, use `workspace_act_as` (the agent acts as a person on email and calendar), not a connector.

### Fields

| Field         | Rule                                                                                                                      |
| ------------- | ------------------------------------------------------------------------------------------------------------------------- |
| Name          | Lower case letters, digits and `-`. Unique in the org. Agents use this name.                                              |
| Server URL    | The Streamable HTTP endpoint of the MCP server, for example `https://mcp.linear.app/mcp`. HTTPS only, no private targets. |
| Auth          | `OAuth login`, `Header from a secret`, `Run identity (OIDC)` or `None`.                                                   |
| Allowed tools | Optional. The tools that agents can use. Empty allows every tool. Read [Choose the tools](#choose-the-tools).             |

The console shows the favicon of the root domain of the URL, for example `linear.app` for `mcp.linear.app`. The platform reads it once, at create or URL change, and stores it. Without a favicon, the console shows the initials of the name.

A change to the URL or the auth revokes the stored tokens at the server, when the server allows it, and deletes them.

## OAuth login

Select **Connect**. The console follows the [MCP authorization flow](https://modelcontextprotocol.io/specification/2025-06-18/basic/authorization):

1. Discovery. The platform reads the protected resource metadata of the server, then the metadata of its authorization server.
2. Client. The platform registers a client with dynamic client registration. If the server does not allow it, enter a client id. For a confidential client, enter the name of an org run secret that holds the client secret.
3. Login. Your browser goes to the login page of the server. The request uses PKCE (S256), a single-use state that expires after 10 minutes, and the `resource` parameter.
4. Callback. The server sends you back to `https://cloudraker.run/_connectors/oauth/callback`. The platform exchanges the code and stores the tokens. Then the console shows the result.

When the server supports the `openid` and `email` scopes, the console shows the account, for example "Connected as jane@acme.com".

The access token is refreshed before it expires. One refresh runs at a time per connector, so a rotating refresh token is used once. When the server refuses the refresh token, the connector becomes `expired`. Select **Reconnect** to log in again. **Disconnect** revokes the token when the server allows it, and deletes it.

| Status          | Meaning                                                                                   |
| --------------- | ----------------------------------------------------------------------------------------- |
| `connected`     | The login is valid. The console shows the account and the expiry.                         |
| `expired`       | The server refused the refresh. An admin must log in again.                               |
| `error`         | The last refresh failed, for example the server did not answer. The next use tries again. |
| `not_connected` | No login yet, or after a disconnect. For a secret connector: the secret is not set.       |

A Run identity (OIDC) connector has no login. Its status is always `connected`.

## Header from a secret

For a server with a static API key, name a run secret. The default header is `Authorization: Bearer {secret}`. You can set another header name and template. The secret resolves with the scope of the run, as in [Secrets and network](https://docs.cloudraker.com/run/guides/secrets-and-network).

## Run identity (OIDC)

For a server that trusts your Run issuer, select **Run identity (OIDC)**. On each request, the egress layer sends a short signed token that names the agent or the person of the turn. The connector needs no login and stores no token. The "Connected as" line says "Signs a Run identity token".

| Field    | Rule                                                                                                     |
| -------- | -------------------------------------------------------------------------------------------------------- |
| Audience | Optional. The `aud` claim of the token. Default `https://{host}` of the server URL. 1 to 512 characters. |
| Header   | Optional, API only. Default `Authorization`, with `Bearer {token}`. Another header gets the bare token.  |

The agent picks the identity in `connectors:`. The default is `agent`.

```yaml agent.yml
connectors:
  - name: crm
    identity: user # the token names the person of the turn
```

The admin sets the URL and the audience together. So a connector can send a user token with a custom audience. A `protection: public` agent cannot use `identity: user` (lint `user_identity_source`). With `identity: user`, the egress layer cannot list the tools when the turn has no person. The tools of that connector are not available in the turn, and the run goes on. Read [OIDC identity](https://docs.cloudraker.com/run/guides/oidc-identity) for the claims and the verification steps.

## HTTP API connectors

A connector can also be an HTTP API (kind `http`) in place of an MCP server. Its URL is the HTTPS base URL of the API. It has no tools. The egress layer adds the credential to each request of the agent to that exact host: a plain fetch, an `_apis` operation or a `_code` request. An HTTP API has no OAuth metadata, so an OAuth login needs the authorize URL, the token URL and a client id.

Two optional fields limit and describe the access:

| Field             | Rule                                                                                                                                                                                                                                                                                          |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `methods`         | The HTTP methods that the egress layer lets through to the host, from `GET`, `HEAD`, `POST`, `PUT`, `PATCH` and `DELETE`. Other methods fail with `egress_denied`. Absent allows every method. An empty list is refused.                                                                      |
| `callback_params` | OAuth only. Query parameters of the login callback to keep with the credential, at most 4, not an OAuth name such as `code` or `state`. Each one is necessary: a login without it, or with a value other than 1 to 256 letters, digits, `.`, `_` or `-`, fails with `callback_param_missing`. |

The agent sees the kept values in its system prompt, in a `## Connections` block, for example `books (https://quickbooks.api.intuit.com): realmId=123`. With `identity: user`, the agent sees the values of the person of the turn. A value is never a secret: use it for an account or a company id.

A failed login does not change a working connection. The connection stays `connected`, and the console shows the error.

### QuickBooks Online

The library has a QuickBooks Online preset. It is an HTTP API connector with read-only access:

```json
{
  "name": "books",
  "kind": "http",
  "url": "https://quickbooks.api.intuit.com",
  "auth": {
    "type": "oauth",
    "client_id": "<Intuit client id>",
    "client_secret": "QUICKBOOKS_CLIENT_SECRET",
    "scopes": ["com.intuit.quickbooks.accounting"],
    "authorize_url": "https://appcenter.intuit.com/connect/oauth2",
    "token_url": "https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer",
    "revoke_url": "https://developer.api.intuit.com/v2/oauth2/tokens/revoke",
    "callback_params": ["realmId"]
  },
  "methods": ["GET"]
}
```

1. Create an app on the Intuit Developer portal with the Accounting scope.
2. Register `https://cloudraker.run/_connectors/oauth/callback` as a redirect URI of the app.
3. Store the client secret as an org run secret, and enter its name in the form.
4. Select **Connect**, sign in to Intuit and choose the company.

The agent reads the company id (`realmId`) from its system prompt and calls the API, for example `GET https://quickbooks.api.intuit.com/v3/company/{realmId}/query?query=select * from Invoice`. The Accounting scope allows writes, but `methods: ["GET"]` refuses them at the egress layer. For a sandbox company, use `https://sandbox-quickbooks.api.intuit.com` as the URL. One credential holds one company. Add a second connector for another company of the organization.

## Grants

A connector has no access until you grant it. Select **Edit grants** and check the org, repos or agents, with the same tree as secrets. A grant on the org covers every agent. A grant on a repo covers its agents.

## Choose the tools

The model receives the definition of each tool on every model step. A server with many tools can use most of the tokens of a run. Fewer tools cost less and help the model choose the correct tool.

Two levels limit the tools. The narrower level wins.

1. **Connector (org).** Open the connector and use the tool list under **Tools agents can use**. The console reads the list from the server with the connector login. Check the tools, or use **Select all** and **Clear** with the search field. When every tool is checked, the console saves no list, so a tool that the server adds later is also allowed. Before the first login, type tool names in **Allowed tools** under **Advanced settings**.
2. **Agent (`agent.yml`).** An entry in `connectors:` can name a subset:

```yaml agent.yml
connectors:
  - github # every tool that the connector allows
  - name: linear
    tools: [list_issues, get_issue] # only these tools
```

Rules:

- A tool name is the name on the server, without the `mcp_linear_` prefix.
- `*` matches any characters, for example `get_*`.
- An agent can only narrow the connector list. It cannot add a tool that the connector excludes.
- A name that matches no server tool fails the run with `connector_unavailable`. The message names the tool. The run does not drop it silently.
- A name that matches only tools that the connector excludes also fails the run with `connector_unavailable`.
- `execute_code` gets the same tools. Code cannot call a tool that the filter removes.

The agent page in the console shows the tools in effect for each connector.

An `mcp.json` server takes the same optional `tools` list:

```json mcp.json
{ "mcpServers": { "apollo": { "url": "https://mcp.apollo.io/mcp", "tools": ["search_people"] } } }
```

## Run behavior

An `mcp.json` server can set `runIdentity` to `agent` or `user`.
Run selects these servers from the verified identity of each turn, before MCP discovery.
API-token and schedule turns select `agent`. Turns with a verified signed-in person select `user`.
Servers without `runIdentity` remain available to both identities.
This selector does not change authentication or grant access to another identity.

```json mcp.json
{
  "mcpServers": {
    "horizon": { "url": "https://mcp.example.com/mcp", "runIdentity": "agent" },
    "horizon_user": { "url": "https://mcp-user.example.com/mcp", "runIdentity": "user" }
  }
}
```

At the start of each turn, the run checks every name in `connectors:`. The run fails with `connector_unavailable` before the first model step when a connector:

- does not exist,
- is not granted to the agent, or
- has no valid login (`not_connected` or `expired`), or
- does not have a tool that the agent names (see [Choose the tools](#choose-the-tools)).

A refresh that fails during a run also fails the run with `connector_unavailable`. The console agent page shows a warning when a connector of the agent needs attention.

`connectors:` is a list, so a deeper `agent.yml` replaces the parent list. `mcp.json` continues to work. A connector replaces an `mcp.json` server of the same name.

## REST and OpenAPI

An HTTP API connector can also hold an OpenAPI 3 JSON document. Choose **Connect a tool**,
then **REST and OpenAPI**. Enter the HTTPS base URL of the API and the name of an organization
secret that holds the token. Import the document and select from 1 to 100 operations. The
console saves them as `api` on the connector:

```json
{
  "name": "items",
  "kind": "http",
  "url": "https://api.example.com/v1",
  "auth": {
    "type": "secret",
    "secret": "ITEMS_TOKEN",
    "header": "authorization",
    "template": "Bearer {secret}"
  },
  "api": { "specification": "{...}", "operations": ["GET /items/{id}", "POST /items"] }
}
```

The agent calls the selected operations with `call_api`, the same tool as for `_apis` files.
The egress layer adds the token and records the real host, path and status of each call. It
refuses every other method and path to the host, also for `fetch()` from `_code` and on each
redirect hop. A write operation goes through the approval rules of the agent.

The document is checked once, when you save the connector. The limits are:

- At most 256 KiB, OpenAPI 3.0 or 3.1, JSON only.
- Local references only, not recursive.
- Path and query parameters of a primitive type, with the default style.
- JSON request bodies with a schema.
- No `pattern` or `patternProperties` in request schemas.
- No per-operation servers or callbacks.
- Operation ids of at most 64 letters, digits, `_` or `-`, each one used once by the agent.

A run fails at the start when an operation name of a connector is also in an `_apis` file of
the agent or in another connector.

## Storage connectors

A storage connector (kind `storage`) gives agents one bucket folder of an S3-compatible
service: AWS S3, Cloudflare R2, Google Cloud Storage with HMAC keys, MinIO or RustFS. Choose
**Connect a tool**, then **S3-compatible storage**. It offers the organization account only.
Run does the S3 calls itself. The egress layer does not take part, and the agent gets no
credential.

| Field                  | Rule                                                                                                                  |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `storage.endpoint`     | The public HTTPS endpoint. Run uses path-style addresses, so the provider must allow them.                            |
| `storage.region`       | The signing region. Use `auto` for R2.                                                                                |
| `storage.bucket`       | The bucket name.                                                                                                      |
| `storage.prefix`       | A folder prefix that ends in `/`. Every call stays inside it.                                                         |
| `storage.allow_writes` | Turns on `create_object`. Default off.                                                                                |
| `auth`                 | `s3_access_keys` with the NAMES of run secrets: `access_key_id`, `secret_access_key` and an optional `session_token`. |

In the console, each key field is one box. Type to search the secrets of your organization and
select one. To add a key, select **Create a new secret**, enter a name and paste the value. Run saves
it as an organization secret with that name and replaces an existing secret of that name. The default
name looks like `STORAGE_ACCESS_KEY_ID`. Leave the session token empty when you do not use one. The connector
stores only the names, in the `auth` block:

```json
{
  "auth": {
    "type": "s3_access_keys",
    "access_key_id": "STORAGE_KEY_ID",
    "secret_access_key": "STORAGE_SECRET",
    "session_token": "STORAGE_TOKEN"
  }
}
```

Run reads the secrets at each call and never shows their values. Use keys that reach only this
bucket and prefix. To rotate keys, select **Create a new secret** in the connector and enter the same name, or change the secrets in Secrets. The connector needs no edit.
A call stops with an error that names the secret when it has no value. A new endpoint, bucket,
prefix or write setting keeps the grants. Run does not renew temporary keys.

| Tool              | What it does                                                                         |
| ----------------- | ------------------------------------------------------------------------------------ |
| `list_objects`    | Lists objects in the prefix. Continue with `next_token`.                             |
| `read_object`     | Downloads one object as a Run file.                                                  |
| `signed_read_url` | Makes a temporary GET URL. Anyone who holds it can read the object until it expires. |
| `create_object`   | Creates an object from a Run file. It needs `allow_writes`.                          |

Limits:

- A read or a write is at most 1 MiB.
- A signed URL expires after 15 minutes at most.
- `create_object` is create-only. An existing object is never replaced. There is no delete tool.
- An object key must stay inside the prefix. Run refuses `..` and other ways out.

Use **Tools agents can use** to allow fewer tools, then grant access to agents as for other
connectors.

A bad, revoked or expired key (for example `InvalidAccessKeyId` or `ExpiredToken`) stops the run
until you update the keys. `AccessDenied` is a tool error and the run goes on: S3 and Google Cloud
Storage also send it for a missing object when the key cannot list the bucket. Other storage
errors are tool errors that the agent can act on.

Source: https://docs.cloudraker.com/run/guides/connectors/index.mdx
