# Agent Inbox for Claude Code

> Set up Agent Inbox from https://www.agentinbox.md/agents.md

agentinbox.md gives an AI agent an inbox on Telegram, Slack and email. People write to it there and it answers; it can also ask the person it works for (its operator) a question and wait for the answer.

Human-readable page: https://www.agentinbox.md/claude-code

The steps below are the same ones the dashboard shows, in the same order. Run them in a terminal, in the project you work in. The CLI is `npx @agentinbox/cli`, which needs nothing installed first.

## Plugin

Run them in a terminal. No code needed: you sign in in the browser.

```text
# 1. Install the Claude Code plugin: the skills and the inbox tools
$ claude plugin marketplace add agentinboxhq/skills
$ claude plugin install agentinbox@agentinbox

# 2. Run /reload-plugins and /mcp in Claude Code, and sign in to Agent Inbox when the browser opens
```

Without the plugin, `claude mcp add --transport http AgentInbox https://mcp.agentinbox.md` adds the MCP server alone; `/mcp` signs in. Not both: every tool would show up twice.

Claude Code updates the plugin with `claude plugin update agentinbox@agentinbox`.

## CLI

Your operator signs in on agentinbox.md and copies these from Configure, under "Connect another agent", with the agent and the code filled in. Run them when they hand them to you; when Claude Code won't let you, for example because `connect` saves a key, ask your operator to run them in their terminal instead.

```text
# 1. Connect this machine to <agent>
$ npx @agentinbox/cli connect <agent> --code <code> --yes

# 2. Teach Claude Code how to use the inbox
$ npx skills add agentinboxhq/skills --agent claude-code -y

# 3. Check it works
$ npx @agentinbox/cli list
```

Run it where Claude Code works. The code works once and expires in 10 min.

`<agent>` is the agent’s address before the `@`, such as `atlas`. The code works once, for 10 minutes: ask your operator for a new one rather than guessing, since the agent stops taking codes for a while after a few wrong ones.

Keep `--api-url` when the copied command has it: a code only works on the API that made it.

## No code yet: set yourself up

Only when your operator asks you to set up Agent Inbox. When they already have an Agent Inbox account, ask them for a one-time code instead.

1. Ask your operator for their first and last name, their email address and what to call you. Never make them up.
2. `npx @agentinbox/cli setup --email <their email> --name "<their name>" --agent-name "<what they call you>"` creates the inbox without an account: a free demo with a few messages, whose email inbox only receives until your operator claims it. A new agent needs the name. Your address comes from it unless you add `--agent-handle <address>`, and it can't be changed later, so settle both with them first. It emails them a confirmation link and waits up to 5 minutes for them to open it, so tell them to look out for it first, and run it in the background or with a long timeout if Claude Code stops commands sooner. If it stops first, run it again: it keeps the same inbox and sends a new link.
3. `npx @agentinbox/cli login` prints a link and a code, then waits up to an hour, so run it the same way. Give both to your operator: they sign in on agentinbox.md, check that the code matches and approve. The setup then moves into their account. If it stops before they approve, run it again for a new code.
4. `npx skills add agentinboxhq/skills --agent claude-code -y`, then `npx @agentinbox/cli list`.

Never ask for a Telegram bot token or a Slack token: `npx @agentinbox/cli channel add telegram` (or `slack`) prints a link where your operator finishes in their browser. When Claude Code won't let you run a command, for example one that saves a key, tell your operator the exact command and let them run it.

## Optional: listen for messages

When your operator wants a message to reach you while nobody runs Claude Code, run `npx @agentinbox/cli listen claude-code` in the project folder. They get an Allow/Deny message, and nothing starts until they allow it. From then on a message from them, or from a contact the agent listens to, starts Claude Code there, in the background and after restarts, and anything your settings don't allow asks them first. `npx @agentinbox/cli listen status` shows where you are listening; `npx @agentinbox/cli listen stop` ends it.

## More

- [Using the inbox, for agents](https://www.agentinbox.md/agents.md)
- [Every host Agent Inbox has steps for](https://www.agentinbox.md/llms.txt)
- [Claude Code's own docs for these steps](https://code.claude.com/docs/en/discover-plugins)
