---
title: "Connect your agent"
description: "Connect the agent you already use with one address and no key: the steps for each agent, what you approve, what it can do, how long it lasts and how to disconnect it."
url: https://doorman.fyi/docs/connect
markdown: https://doorman.fyi/docs/connect.md
area: "Guides"
section: "Get started"
---

# Connect your agent

Connect the agent you already use with one address and no key: the steps for each agent, what you approve, what it can do, how long it lasts and how to disconnect it.

Source: https://doorman.fyi/docs/connect

## One address, no key

An agent that speaks the Model Context Protocol (MCP) connects to Doorman Inbox through one address: `https://api.doorman.fyi/mcp`. There is nothing to install and no API key to create, copy or store. The agent signs in through your browser, and you approve it there.

1. Give the agent the address. Depending on the agent you paste it into a screen, run one of its commands or save a small settings file. The sections below have the exact steps for each.
2. The agent opens the approval screen in your browser. Sign in to Doorman if you are not signed in.
3. Read who is asking and what for, then choose `Allow access`.
4. Back in the agent, its tools for your inboxes appear. Ask it to read a message or to send a reply.

> Note: No account yet? [Create one](https://doorman.fyi/sign-up) first. You can also create it when the browser asks you to sign in: an approval request waits 15 minutes.

The agent works with the inboxes your account has. With the default permissions it cannot create one, so create your first inbox in the console.

The address is the same for every account and gives nothing away by itself: a request that carries no sign-in is refused and told where to sign in. [The connect page](https://doorman.fyi/connect) has the same steps with a copy button on each.

## Claude

A chat app. You paste the address into one of its screens.

1. In Claude, open Customize, then Connectors, and choose Add custom connector.
2. Paste this address as the connector's URL and add it.

   ```text
   https://api.doorman.fyi/mcp
   ```

3. Choose Connect on the new connector.
4. A browser window opens. Sign in to Doorman, read what the agent is asking for and choose Allow access.

## ChatGPT

A chat app. You paste the address into one of its screens.

1. In ChatGPT on the web, open Plugins, select the plus button and choose Add custom MCP server.
2. Give it a name, paste this address as the Server URL and choose OAuth for authentication.

   ```text
   https://api.doorman.fyi/mcp
   ```

3. Read the warning, select I understand and want to continue, then choose Create as a plugin.
4. A browser window opens. Sign in to Doorman, read what the agent is asking for and choose Allow access.

## Grok

A chat app. You paste the address into one of its screens.

1. In Grok, open Connectors, choose New Connector, then Custom.
2. Paste this address as the MCP server URL and add the connector.

   ```text
   https://api.doorman.fyi/mcp
   ```

3. A browser window opens. Sign in to Doorman, read what the agent is asking for and choose Allow access.

## Claude Code

An agent that runs in a terminal. Its own commands add the connection and sign in.

1. Add the connection from a terminal.

   ```sh
   claude mcp add --transport http --scope user doorman https://api.doorman.fyi/mcp
   ```

2. Sign in.

   ```sh
   claude mcp login doorman
   ```

3. A browser window opens. Sign in to Doorman, read what the agent is asking for and choose Allow access.

## Codex

An agent that runs in a terminal. Its own commands add the connection and sign in.

1. Add the connection from a terminal.

   ```sh
   codex mcp add doorman --url https://api.doorman.fyi/mcp
   ```

2. Sign in.

   ```sh
   codex mcp login doorman
   ```

3. A browser window opens. Sign in to Doorman, read what the agent is asking for and choose Allow access.

It also reads the same connection from its settings file. With this entry in the file, only the sign-in is left.

~/.codex/config.toml:
```toml
[mcp_servers.doorman]
url = "https://api.doorman.fyi/mcp"
```

## OpenClaw

An assistant you run yourself. Its own commands add the connection and sign in.

1. Add the connection from a terminal.

   ```sh
   openclaw mcp add doorman --url https://api.doorman.fyi/mcp --transport streamable-http --auth oauth
   ```

2. Sign in.

   ```sh
   openclaw mcp login doorman
   ```

3. A browser window opens. Sign in to Doorman, read what the agent is asking for and choose Allow access.

## Cursor

A code editor. It reads the connection from a settings file.

1. Save this as ~/.cursor/mcp.json. If the file already lists servers, add the doorman entry inside mcpServers instead.

   ```json
   {
     "mcpServers": {
       "doorman": {
         "url": "https://api.doorman.fyi/mcp"
       }
     }
   }
   ```

2. In Cursor, open Customize, find doorman under MCPs and choose to sign in.
3. A browser window opens. Sign in to Doorman, read what the agent is asking for and choose Allow access.

## Another MCP client

Any other client that speaks the Model Context Protocol over Streamable HTTP and signs in with OAuth.

1. Add a remote MCP server that uses Streamable HTTP, with this address.

   ```text
   https://api.doorman.fyi/mcp
   ```

2. If the client asks how to sign in, choose OAuth. No API key is needed.
3. A browser window opens. Sign in to Doorman, read what the agent is asking for and choose Allow access.

## What you approve

The approval screen is a page of the Doorman console. It belongs to your signed-in browser session, and nothing is approved until you choose. No agent, assistant or tool can choose for you.

- Who is asking: The client's name and what is known about it. A client that published an identity document is shown with the domain that serves the document, which Doorman checked; the name is what that domain says about itself. A client that registered itself is marked as such: nothing about it was checked, its name included.
- Where the answer goes: The address the client is told the outcome on: an HTTPS address, or an address on your own machine for an agent that runs there. An address on your own machine identifies nobody, because any program on it can listen there.
- Your account: The account the agent will act for: your own, or an organization's when you are working in one. With several accounts you can change it on the screen before you choose, and what you allow is the account shown then. Connecting an agent to an [organization](https://doorman.fyi/docs/organizations.md#agents) takes the `agents:connect` permission, which its admins have.
- What it may do: The permissions it asks for, each with what it allows. They are listed [below](https://doorman.fyi/docs/connect.md#permissions).
- Your choice: `Allow access` connects the agent. `Deny` tells it that you refused. Leaving the page does neither, and the request ends by itself after 15 minutes.

Approve an agent you started connecting yourself, a moment ago. A request you did not start is one to deny.

## What a connected agent can do

An agent that asks for nothing in particular gets the default agent permissions. They are what it needs to read, file and answer mail, and they are what the address tells every agent to ask for.

| Permission | What it allows |
| --- | --- |
| `account:read` | Read account identity, plan, usage and aggregate activity. |
| `inboxes:read` | Read inbox addresses, metadata and activity summaries. |
| `mail:read` | Read messages, threads, attachments and mail-bearing events, and the services and verification codes found in mail. |
| `mail:write` | Change thread read state, metadata and labels, trash threads, record the services an address signs up for, and start a sign-in the owner allows. |
| `mail:send` | Send mail and replies from the account's inboxes. |

Everything else has to be asked for by name, and the approval screen shows it when it is: `inboxes:write`, `mail:draft`, `events:read`, `webhooks:manage`, `rules:manage`. An agent with the default permissions cannot create or delete inboxes, manage webhooks or rules, or read the event log.

The agents above follow what the address advertises, so the approval screen lists exactly these for them. A client you configure yourself asks for more by naming the permissions in the `scope` of its sign-in request: [Permissions and account boundaries](https://doorman.fyi/docs/oauth.md#scopes). The Doorman command line does it with `doorman login --scope`.

No connection can mint API keys, manage an inbox's own webhook or manage custom domains, whatever it was granted. Permissions apply to every inbox of the account. To hold an agent to a single inbox, give it an inbox key instead: [Account scope and inbox scope](https://doorman.fyi/docs/authentication.md#scopes).

The agent is offered one tool for each operation its permissions allow, and mail reaches it marked as untrusted content. Long mail is shortened to fit one answer, and the answer says what was left out and how to read it: [MCP server](https://doorman.fyi/docs/mcp.md#surfaces).

## How long a connection lasts

- The agent renews its access by itself, about every 15 minutes. You are not asked again.
- A connection ends 30 days after the agent last renewed it, or 365 days after you approved it, whichever comes first.
- A connection in use is not interrupted before that year is over. One that is no longer used ends by itself.
- When a connection has ended, the agent asks you to sign in again. Approve as before.

[Apps](https://doorman.fyi/console/connect) in the console shows for each connection when it was last used, to the minute, and when it ends.

## Seeing and ending connections

[Apps](https://doorman.fyi/console/connect) in the console lists what is connected to your account. `Disconnect` ends one at once: its next call is refused and its event streams close. Mail it already sent cannot be recalled.

Removing the connection inside the agent only makes the agent forget it. The connection stays on your account until it ends by itself, so disconnect it in the console as well.

Clients you registered yourself as a developer are listed under [OAuth clients](https://doorman.fyi/console/apps), one of the developer tools: [Apps and OAuth](https://doorman.fyi/docs/oauth.md).

## From the Doorman command line

> Note: The command line is not on a package registry yet. Until its first release it is built from the repository: [The CLI](https://doorman.fyi/docs/cli.md#install-auth).

`doorman connect` lists the agents above and marks the ones it finds on this machine. `doorman connect <id>` shows that agent's steps and, once you confirm, carries them out: it runs the agent's own commands, or adds the one entry to its settings file after keeping a backup. For an agent that is set up on a screen it prints the steps and the address.

- `--print` only prints the steps.
- `--yes` skips the confirmation.
- `--name` sets what the connection is called. Without it the name is `doorman`, as in the steps above.

An agent that can only launch a local program uses `doorman mcp`, once `doorman login` has signed the command line in through the browser: [Connect over local stdio](https://doorman.fyi/docs/mcp.md#connect-stdio).

## When it does not connect

- The agent says the client is unknown or not registered: The agent registered itself here when you first connected, and a registration that goes unused lapses after 30 days. Most agents register again by themselves. If yours shows the error instead, remove the connection in the agent and add it again with its steps above.
- The agent says the connection ended, or asks you to sign in again: The connection reached [its limit](https://doorman.fyi/docs/connect.md#lifetime), or it was disconnected in the console. Sign in again from the agent and approve.
- The approval screen says `Request unavailable`: The request waited longer than 15 minutes, was already answered, or was opened in another browser session. Start again from the agent.
- You cannot approve the agent for an organization: Connecting an agent to an organization takes `agents:connect`, which a member's role does not carry. Ask one of the organization's admins to connect it, or change the account on the approval screen to your own.
- The agent reports that its identity could not be read: An agent that names itself by a published identity document has that document read when you connect. When it cannot be read, connecting is refused instead of trusting an older copy. Try again in a few minutes. A connection you already have is not affected.
- The agent asks for an API key or a token: It needs neither. Where the agent asks how to sign in, choose OAuth, which is the sign-in through the browser.
- The address shows an error when you open it in a browser: That is expected. The address is for an agent, not for a browser, and the error says so. Add it in your agent with its steps above.
- No browser window opens: Some agents print an address instead. For an agent that runs on your machine, open it in a browser on that machine: the agent waits for the answer there.
- A tool is missing: An agent is offered a tool only when every permission the tool needs was approved. The default permissions leave out creating inboxes, webhooks, rules and the event log.
