# Connect an agent with clear permissions.

Source: https://heyeveryone.ai/docs/agents

> Give it access to selected workspaces and keep review and publishing decisions visible.

## Choose a client guide

Use the client-specific connection instructions shared with the agent pages. Check any account, plan or authentication caveat before connecting.

## Or work from a terminal

Scripts and agents with a shell can use the heyeveryone CLI: every tool as a command, with the same token and permissions (see /docs/cli). Webhooks tell your tools when content, reviews, schedules, results or channels change (see /docs/webhooks).

## Understand what it can do

An agent can draft content, request review, schedule and publish posts and read results. It cannot approve, create review links, manage tokens or change billing. A person confirms before anything goes live, unless you let a specific agent publish on its own (Autopilot).

## Ask for links and cost quotes

What an agent gets back for content and posts includes a content-page URL. Ask for that link after a draft. Use preview_ai_cost before requesting an action that runs heyeveryone’s own AI.

## End access when it is no longer needed

Disconnect the agent in Settings > Agents. Its tokens stop working at once.

## Claude

Custom connectors run from Anthropic's cloud, so they only work with a server
that is reachable on the internet (not `localhost`). Plans: Free (one custom
connector), Pro, Max, Team and Enterprise.

**Pro, Max or Free:**

1. Open **Customize > Connectors** (claude.ai/customize/connectors). Older
   guides and some Desktop builds call it **Settings > Connectors**.
2. Choose **Add custom connector** (+).
3. Paste `https://heyeveryone.ai/mcp`.
4. Leave **Advanced settings** alone. Claude picks the right client
   registration for heyeveryone on its own ("Use Claude's published
   identity").
5. Click **Add**, then **Connect**. heyeveryone opens: sign in, tick the
   workspaces Claude may use, and click **Connect**.
6. In a chat, turn the connector on from the tools menu. Try the **Plan my
   week** or **What needs me** prompt.

**Team or Enterprise:**

1. An Owner adds the connector once for the organization: **Organization
   settings > Connectors > Add > Custom > Web**, then paste the URL.
2. Each member then clicks **Connect** under **Customize > Connectors**.
   Everyone signs in with their own heyeveryone account.

Good to know:

- The OAuth callback Claude uses is `https://claude.ai/api/mcp/auth_callback`.
- A personal access token only works through the **Request headers** beta,
  which few organizations have: header `Authorization`, value
  `Bearer hey_pat_...`. It can't be combined with OAuth. To change it, remove
  and re-add the connector.
- Claude Desktop uses the same connectors for remote servers. Anthropic's docs
  describe no way to put a remote URL in `claude_desktop_config.json`.
  - The community bridge [`mcp-remote`](https://github.com/geelen/mcp-remote)
    works but isn't needed:
    `"command": "npx", "args": ["mcp-remote", "https://heyeveryone.ai/mcp"]`.

Sources:
[support.claude.com: custom connectors](https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp),
[claude.com: remote MCP connectors](https://claude.com/docs/connectors/custom/remote-mcp),
[claude.com: connector authentication](https://claude.com/docs/connectors/building/authentication),
[modelcontextprotocol.io: connect to remote servers](https://modelcontextprotocol.io/docs/develop/connect-remote-servers).

## ChatGPT

Custom MCP servers are available on Plus, Pro, Business, Enterprise and
Education, on the web. OpenAI's help center suggests that write actions (which
heyeveryone's drafting tools are) need Business, Enterprise or Edu; we could
not confirm this.

1. **Settings > Security and login > Developer mode**: turn it on.
2. Open **Plugins** (the new name for Connectors since July 2026) and click
   **+**.
3. Name `heyeveryone`, connection **Public endpoint**, URL
   `https://heyeveryone.ai/mcp`, authentication **OAuth**. Leave any client
   fields empty.
4. Connect, sign in to heyeveryone, pick the workspaces, and click
   **Connect**. The plugin appears under **Drafts**.
5. In a chat, choose it from the composer's **+** menu > **Developer mode**.

ChatGPT supports OAuth or no auth, so a personal access token can't be used
here.

Source: [OpenAI: developer mode](https://developers.openai.com/api/docs/guides/developer-mode),
[connect from ChatGPT](https://developers.openai.com/plugins/deploy/connect-chatgpt),
[plugin authentication](https://developers.openai.com/plugins/build/auth).

## Claude Code

Sign in with your browser (OAuth):

```sh
claude mcp add --transport http heyeveryone https://heyeveryone.ai/mcp
```

Then run `/mcp` inside Claude Code, pick heyeveryone and authenticate.

- Without a local browser (for example over SSH), run
  `claude mcp login heyeveryone --no-browser`.
- The consent page warns that the redirect goes to your own computer
  (`http://localhost:<port>/callback`). That's expected.

With a personal access token (CI, headless):

```sh
export HEYEVERYONE_TOKEN=hey_pat_...
claude mcp add --transport http heyeveryone https://heyeveryone.ai/mcp \
  --header "Authorization: Bearer $HEYEVERYONE_TOKEN"
```

To share it with a project, use `--scope project`. That writes `.mcp.json`
at the repo root. Commit it with a variable, never the token:

```json
{
  "mcpServers": {
    "heyeveryone": {
      "type": "http",
      "url": "https://heyeveryone.ai/mcp",
      "headers": { "Authorization": "Bearer ${HEYEVERYONE_TOKEN}" }
    }
  }
}
```

Notes:

- Scopes: `local` (the default) and `user` go in `~/.claude.json`.
- Claude Code's v2 runtime asks the server whether it supports MCP
  2026-07-28 and uses it if so (heyeveryone does).
- To force the older handshake, set `MCP_PROTOCOL_NEGOTIATION=legacy`.

Plugin and skill: heyeveryone also comes as a Claude Code plugin, this MCP
server plus a skill that teaches Claude Code the content workflow (draft a
version per channel, request a review, schedule, publish only with
permission, read results) and the [CLI](#command-line-heyeveryone-cli). Its
public listing is waiting on a release; meanwhile the `claude mcp add`
command above gives Claude Code the same tools. With the plugin's folder
(`agent/` in the heyeveryone repository), `claude --plugin-dir agent` loads it.

Source: [code.claude.com/docs/en/mcp](https://code.claude.com/docs/en/mcp).

## Codex

OAuth:

```sh
codex mcp add heyeveryone --url https://heyeveryone.ai/mcp
codex mcp login heyeveryone
```

Personal access token:

```sh
export HEYEVERYONE_TOKEN=hey_pat_...
codex mcp add heyeveryone --url https://heyeveryone.ai/mcp \
  --bearer-token-env-var HEYEVERYONE_TOKEN
```

or in `~/.codex/config.toml` (or a project's `.codex/config.toml`):

```toml
[mcp_servers.heyeveryone]
url = "https://heyeveryone.ai/mcp"
bearer_token_env_var = "HEYEVERYONE_TOKEN"
```

- In the TUI, `/mcp` lists connected servers.
- IDE extension: gear menu > **MCP servers** > **Add server** > **Streamable
  HTTP**.
- The old `experimental_use_rmcp_client` flag is no longer needed for HTTP
  servers.
- Codex speaks the `initialize` handshake (MCP 2025-11-25) unless its
  2026-07-28 feature flag is on. heyeveryone serves both.

Sources: [learn.chatgpt.com: MCP in Codex](https://learn.chatgpt.com/docs/extend/mcp?surface=cli),
[Codex config reference](https://learn.chatgpt.com/docs/config-file/config-reference).

## Cursor

`~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (one project):

```json
{
  "mcpServers": {
    "heyeveryone": {
      "url": "https://heyeveryone.ai/mcp",
      "headers": { "Authorization": "Bearer ${env:HEYEVERYONE_TOKEN}" }
    }
  }
}
```

Leave out `headers` to sign in with OAuth instead.

Source: [cursor.com/docs/context/mcp](https://cursor.com/docs/context/mcp).

## Gemini CLI

```sh
# OAuth: then run /mcp auth heyeveryone inside Gemini CLI
gemini mcp add --transport http heyeveryone https://heyeveryone.ai/mcp

# Personal access token
gemini mcp add --transport http --header "Authorization: Bearer hey_pat_..." \
  heyeveryone https://heyeveryone.ai/mcp
```

`--scope user` writes `~/.gemini/settings.json`; the default is the
project's `.gemini/settings.json`. By hand:

```json
{
  "mcpServers": {
    "heyeveryone": {
      "httpUrl": "https://heyeveryone.ai/mcp",
      "headers": { "Authorization": "Bearer hey_pat_..." }
    }
  }
}
```

- `httpUrl` means Streamable HTTP. `url` alone means the old SSE transport,
  although `gemini mcp add --transport http` writes
  `"url"` with `"type": "http"`, which also works.
- Gemini's docs don't promise `$VAR` expansion inside `headers`. Paste the
  token, or use `/mcp auth` instead.

Source: [gemini-cli docs: MCP servers](https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md).

## VS Code

Run **MCP: Add Server**, or edit `.vscode/mcp.json`:

```json
{
  "inputs": [
    { "type": "promptString", "id": "hey-token", "description": "heyeveryone token", "password": true }
  ],
  "servers": {
    "heyeveryone": {
      "type": "http",
      "url": "https://heyeveryone.ai/mcp",
      "headers": { "Authorization": "Bearer ${input:hey-token}" }
    }
  }
}
```

Leave out `headers` and `inputs` to sign in with OAuth. VS Code identifies
itself with its client metadata document, so there's nothing to register.

Source: [VS Code MCP configuration](https://code.visualstudio.com/docs/copilot/reference/mcp-configuration).

## Grok

**grok.com:**

1. Open **grok.com/connectors** > **New Connector** > **Custom**.
2. Enter `https://heyeveryone.ai/mcp` and complete the sign-in.

- On Business and Enterprise, an admin adds the connector first.
- xAI doesn't document which sign-in methods or callback URL Grok uses. If
  OAuth fails, tell us: it is the one client we haven't seen connect.

**xAI API (remote MCP tool)**, with a personal access token:

```python
from xai_sdk.tools import mcp

tools = [mcp(
    server_url="https://heyeveryone.ai/mcp",
    server_label="heyeveryone",
    authorization="Bearer hey_pat_...",
)]
```

With the Responses API (`https://api.x.ai/v1/responses`), add
`{"type": "mcp", "server_url": "https://heyeveryone.ai/mcp", "server_label": "heyeveryone", "authorization": "Bearer hey_pat_..."}`
to `tools`. xAI's docs don't say whether `authorization` gets a `Bearer `
prefix added for you. Include it; if you get a 401, try the bare token.

Sources: [docs.x.ai: connectors](https://docs.x.ai/grok/connectors),
[docs.x.ai: remote MCP tools](https://docs.x.ai/docs/guides/tools/remote-mcp-tools).

## Troubleshooting

- **401 with `WWW-Authenticate: Bearer resource_metadata=...`**: the client
  has no valid token. Chat apps start sign-in from this. A CLI with a personal
  access token means the token was revoked or mistyped.
- **403 "Requests from the origin ... are not allowed"**: a browser-based
  client on a plain-http, non-local page. Serve it over https or from
  `localhost`.
- **The consent page says "unverified" or warns about a local redirect**:
  this is normal for CLIs (Claude Code, Codex, Gemini CLI, Inspector), which
  receive the sign-in on your own computer.
- **A redirect URI is refused**: heyeveryone accepts `https` redirect URIs,
  and `http` only on `localhost`, `127.0.0.1` or `[::1]` (any port). Custom
  schemes such as `cursor://` are refused; use a personal access token with
  such clients. None of the clients above needs one.
- **429 "Too many requests. Try again in N seconds."**: a rate limit (see
  "Rate limits"). Wait the `Retry-After` seconds; a loop that keeps calling
  is the usual cause.
- **Tools you expected are missing**: agents never see people-only tools
  (confirming schedules, approvals, tokens, billing). Calling one by name gets
  the MCP error "Unknown tool".

## Request limits

| Limit | Default | Counts |
|---|---|---|
| `agent` | 120 a minute | every request of one agent (the agent a token belongs to, so refreshing a token doesn't reset it) |
| `heavy` | 30 a minute | on top, per agent: calls of tools that cost credits or reach outside heyeveryone (publishing, URL fetches, platform checks; `tools/list` marks them with `openWorldHint` or a credit note) |
| `account` | 600 a minute | every agent request of one account, all its agents together |
| `ip` | 600 a minute | every request from one address (an IPv6 /64), signed in or not |

A refused request returns HTTP 429 with `Retry-After` in seconds. Wait that long, then retry.

## Client behavior and result limits

- Transport: stateless Streamable HTTP, POST only. Both MCP generations are
  served on the same URL:
  - **2026-07-28**: `server/discover`, the per-request `_meta` envelope, and
    the `MCP-Protocol-Version`, `Mcp-Method` and `Mcp-Name` headers.
  - **2025-11-25 back to 2024-11-05**: the `initialize` handshake.
- Authorization follows the MCP 2026-07-28 authorization spec:
  - Protected resource metadata at `/.well-known/oauth-protected-resource/mcp`
    and at the root.
  - Authorization server metadata at `/.well-known/oauth-authorization-server`.
  - Client ID Metadata Documents are preferred. Dynamic Client Registration
    is kept for older clients.
  - PKCE with `S256` only. `resource` (RFC 8707) binds each token to `/mcp`
    or `/api/v1`. `iss` is sent in every authorization response (RFC 9207).
- One scope, `agent`. What an agent may do is decided per workspace by the
  person, not by scopes: access, read-only, and Autopilot with its channels
  and daily limit. A read-only token keeps `tools/list` unchanged; write
  tools refuse it with `forbidden` and a sentence saying it is read-only.
- Errors:
  - An unknown tool is a JSON-RPC error `-32602`.
  - A tool that fails returns `isError: true` with a text block
    `<code>: <message>`, for example `forbidden: ...` or
    `confirmation_required: ...`.
- Retries: `create_content` and `create_post` take an optional
  `idempotencyKey` (on REST also the `Idempotency-Key` header). The same key
  from the same agent in the same workspace within 24 hours returns what the
  first call created (`replayed: true`) and creates nothing; the same key
  with a different input is refused (`idempotency_conflict`). Scheduling is
  already idempotent through `schedule_versions`' `confirmationToken`.
- Near duplicates: `get_publish_plan` lists `nearDuplicates` and a
  `near_duplicate` warning when a version's text is nearly the same as a post
  published in the last 30 days or scheduled on the same channel. It never
  blocks; show it to the person.
- Server identity (MCP `Implementation`): name `heyeveryone`, the version of
  `@heyeveryone/mcp`, a one-line `description`, `websiteUrl` (the app's
  origin) and `icons` (`/icon.svg`). The instructions start with the rules
  that keep people safe: "Humans publish", the confirmation step and
  credits, all in the first 512 characters.
- Size (HEY-70, HEY-145): `tools/list` sends no `outputSchema` and compact
  input schemas (no regex next to a `format`): 104 tools in about 126,000
  characters (HEY-156). Tests keep it at 120 tools or fewer (VS Code allows 128 across
  all of a person's servers) and 140,000 characters, with 12 tools and
  10,000 characters of headroom (D-431). Results still carry
  `structuredContent` and the same JSON as text. Full output schemas are in
  `apps/web/src/generated/mcp-tools.json` and the OpenAPI document.
- Renamed and merged tools (D-431): 19 tools became parameters of others
  (for example `get_campaign_results` is `get_results` with
  `groupBy: campaign`). MCP lists only the new names. The old REST paths
  still answer until the next release: they run the new tool, return its
  result and send `Deprecation` and `Link` headers. The tool surface freeze
  (HEY-156, D-470) then renamed tools to brand words (`create_piece` is
  `create_content`, `update_master` is `update_original`) and merged four
  more, with no aliases. Both tables are in
  [docs/agents/tool-changes.md](../agents/tool-changes.md).
- Result size: a query result over 75,000 characters (Claude Code's 25,000
  tokens, conservatively) is refused with `result_too_large: ...` saying how
  to ask for less (a smaller `limit`, a shorter `from`/`to`, a filter).
  Mutations are never refused for size. `query_content` pages at 40 rows
  for agents (a larger `limit` is lowered; `nextCursor` says there is more). REST is not limited
  this way.
