# Connect Claude Code, Codex or Cursor to your messenger (/en/docs/agents) Connect your AI agent to your messenger so it can find messages, gather context and prepare replies. This page is for anyone connecting a terminal agent, a browser or phone chat, or an MCP app. It explains which connection to choose, how to set it up, where to get skills and how to check the result. By the end, you can ask your agent for your first useful task. **On this page:** 1. [What is an agent, and how does it use the tool?](#what-is-an-agent-and-how-does-it-use-the-tool) 2. [Choose where you want to use it](#choose-where-you-want-to-use-it) 3. [Connect the instructions](#connect-the-instructions) 4. [Check whether you are ready](#check-whether-you-are-ready) 5. [Notes for your agent](#notes-for-your-agent) 6. [Where to get WireCat skills](#where-to-get-wirecat-skills) 7. [For chat apps and remote agents](#for-chat-apps-and-remote-agents) 8. [MCP and skills](#mcp-and-skills) 9. [Use from web or mobile](#use-from-web-or-mobile) 10. [Ready for your first task](#ready-for-your-first-task) ## What is an agent, and how does it use the tool? [#what-is-an-agent-and-how-does-it-use-the-tool] An **AI agent** is a program that can use tools to carry out your request. For example, it can find messages and turn them into a summary. You describe the task; the agent chooses the actions. A **CLI** is a command-line tool: a program controlled with text commands. An agent with terminal access runs it on your computer or server, the same way you would in a terminal. A **skill** teaches the agent the commands, so you do not need to memorise them. Apps that cannot run programs have their own route at [the end of this page](#chat-apps-and-remote-agents). ## Choose where you want to use it [#choose-where-you-want-to-use-it] - **[I use ChatGPT, Claude or another AI chat in a browser or mobile app](/llms.mdx/docs/browser-apps/content.md)** — Follow the browser/mobile connection guide. - **[I use Codex, Claude Code, Cursor, Gemini CLI, Hermes or OpenClaw with terminal access](#connect-instructions)** — Connect the command-line tool below. - **[My app cannot run commands, or my agent runs on another computer](#chat-apps-and-remote-agents)** — See the other routes, including an optional MCP connection. - **[I want to check an existing connection](#check-connection)** — Run the account-and-chats check. - **[I have not installed the tool or connected my account](/llms.mdx/docs/installation/content.md)** — Start with installation and login. ## Connect the instructions [#connect-the-instructions] The examples use `tg` for Telegram. For MAX, replace `tg` with `max` and the skill name `tg-cli` with `max-cli`. This applies to all examples and agent notes on this page. ### First setup [#first-setup] Run this once in the terminal on the computer where your agent works. Setup connects your account and adds the agent instructions: ```sh tg personal setup --agent codex ``` Replace `codex` with `cursor`, `claude` or `gemini` for your agent. Without `--agent`, setup asks you to choose. For Hermes, OpenClaw or another agent, use `none` and follow the relevant note below. ### When the agent runs the login [#when-the-agent-runs-the-login] An agent has no terminal to draw a QR code in or to open a browser from, so each tool prints what you need as text, and the agent passes it to you in the chat. Replace `personal` with your profile name. - **Telegram and MAX:** the agent runs `tg personal session start qr` or `max personal session start qr` in the background, because the command waits for your scan and a shell tool shows nothing until it ends. Without a terminal, the tool prints the QR code as text. The agent pastes it into the chat as a code block, exactly as printed, and you scan it with the Telegram or MAX app on your phone. When Telegram renews the code, the agent pastes the new one and says that the old one expired. - **MAX codes expire fast:** a MAX QR code lasts about 2 minutes, so the agent pastes it at once. When it expires, the agent runs the command again for a new code. - **Zoom:** without a terminal, `zm personal session start` prints `Open this URL to approve Zoom login:` and the URL. The agent gives you the URL as a link. Open it in a browser on the same computer, because Zoom returns to a listener there. - **Google Drive:** `drive personal session start` always prints its Google sign-in URL, and also tries to open a browser. If no browser opens, the agent gives you the printed URL as a link to open on the same computer. - **Google Calendar:** `gcal personal session start` always prints `Open Google sign-in:` and the URL, and also tries to open a browser. If no browser opens, the agent gives you the URL as a link to open on the same computer. It signs in through WireCat's Google app unless you give it your own client. See [Google Calendar settings](/llms.mdx/docs/gcal/configuration/content.md#your-own-google-client). A phone-number login, a two-step verification password and the first registration of your Telegram app still need you at a terminal. ### Account already connected [#account-already-connected] `tg personal setup` with an agent chosen has already installed the skill. If your agent already sees `tg-cli`, you can skip this step. A global npm install of `tg`, `max` or `memo` adds the skill only when `TG_INSTALL_AGENT`, `MAX_INSTALL_AGENT` or `MEMO_INSTALL_AGENT` names an agent (`all`, `claude`, `codex`, `cursor` or `gemini`). The one-command Windows installer for `tg` and `max` adds it unless you pass `-Agent none`. `zm` and `drive` install a skill only when asked: run `zm skill install` or `drive skill install` after `npm install -g`. To add or update the instructions without repeating login: ```sh tg skill install ``` The **skill** is an instruction file that teaches the agent how to use the tool. It does not contain your messenger login. Start a new agent conversation after installation. Where each agent looks for the skill file: - **Codex, Cursor Agent, Gemini CLI**: `~/.agents/skills/tg-cli/SKILL.md`; install only for them with `tg skill install --for agents`. - **Claude Code**: `~/.claude/skills/tg-cli/SKILL.md`; install only for it with `tg skill install --for claude`. - **Hermes**: `~/.hermes/skills/tg-cli/SKILL.md`; save the output of `tg skill show`, see [Hermes](#hermes). - **OpenClaw**: `~/.agents/skills/tg-cli/SKILL.md`; `tg skill install --for agents`, see [OpenClaw](#openclaw). `~` is your home folder, also on Windows. Without `--for`, `skill install` writes both the `.agents` and the `.claude` copy. You can also get the skills from a skill directory, such as ClawHub or skills.sh: [Where to get WireCat skills](#where-to-get-wirecat-skills). **After you update the tool, run `tg skill install` again**, so the instructions match the new version. For Hermes, or any file you saved by hand, save it from `tg skill show` again. When the agent sets `AI_AGENT` or `CLAUDECODE`, the tool reminds it at most once a day if its copy of the skill is missing or older than the tool. The reminder goes to stderr, so JSON output stays usable. ## Check whether you are ready [#check-whether-you-are-ready] ```text prompt Use tg CLI. Read its instructions with tg skill show, show the connected account and list five recent chats. Only read: do not send anything or mark messages as read. ``` The account and chats should match yours. You can then continue to [First tasks](/llms.mdx/docs/first-tasks/content.md). ### If it does not work [#if-it-does-not-work] - **The agent cannot find `tg`.** Ask it to run `tg --version`. If that fails, the agent's terminal does not see the installed tool. Open a new terminal, or restart the agent or editor after installing Node.js and the tool. On Windows, see [what the installer changes](/llms.mdx/docs/installation/content.md#what-the-windows-installer-changes). More causes: [Telegram troubleshooting](/llms.mdx/docs/tg/troubleshooting/content.md) · [MAX troubleshooting](/llms.mdx/docs/max/troubleshooting/content.md#max-%D0%BD%D0%B5-%D0%BD%D0%B0%D1%85%D0%BE%D0%B4%D0%B8%D1%82%D1%81%D1%8F-%D0%BF%D0%BE%D1%81%D0%BB%D0%B5-%D1%83%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%BA%D0%B8). - **The agent reports "no session".** The tool runs, but it finds no login. Log in with `tg personal setup` in the same environment and profile the agent uses: the same computer user, the same profile name and the same folder variables such as `TG_CONFIG_DIR`, if you set them. Details: [Telegram](/llms.mdx/docs/tg/troubleshooting/content.md#no-session-for-profile-personal--run-tg-personal-setup-in-a-local-terminal) · [MAX](/llms.mdx/docs/max/troubleshooting/content.md#no-session-for-profile-personal). ## Notes for your agent [#notes-for-your-agent] Use these only for the extra step your client needs. The connection command above is shared. ### Codex [#codex] Use Codex locally, in its CLI or IDE extension. Select `$tg-cli` in your conversation. If it is missing, open a new conversation or restart Codex. [Codex skills guide](https://learn.chatgpt.com/docs/build-skills). ### Cursor [#cursor] Use **Agent** with terminal access (An app where you paste text commands and see their results. Use PowerShell on Windows or Terminal on macOS; on Linux, open your terminal app.), then ask it to use the tool. You can pick `tg-cli` through `/` in the Agent chat. If the skill is missing, restart Cursor or ask the agent to read `tg skill show`. [Cursor skills guide](https://cursor.com/help/customization/skills). ### Claude Code [#claude-code] Use `/tg-cli` in a new local session. [Claude Code skills guide](https://code.claude.com/docs/en/skills). ### Gemini CLI [#gemini-cli] Use `gemini skills list` to see whether the skill is available. In an existing session, `/skills reload` refreshes it. [Gemini skills guide](https://geminicli.com/docs/cli/skills/). ### Hermes [#hermes] **Install the skill.** Hermes Agent reads skills from `~/.hermes/skills`. Ask Hermes to save the exact output of `tg skill show` into `~/.hermes/skills/tg-cli/SKILL.md`, keeping the frontmatter and UTF-8 text. On macOS or Linux you can do it yourself: ```sh mkdir -p ~/.hermes/skills/tg-cli tg skill show > ~/.hermes/skills/tg-cli/SKILL.md ``` Hermes can also install the skill from this site; other sources are in [Where to get WireCat skills](#hermes-agent): ```sh hermes skills install well-known:https://wirecat.dev/.well-known/skills/tg-cli ``` If Hermes stops at a caution from its security scan, don't force the install: [report it](https://github.com/WireCatLabs/cli-docs/issues) with the finding. Then start a new session and try the check above. Hermes's terminal must have the tool and the same account login. **In one step:** `tg skill install --for hermes`. It puts the skill in `~/.agents/skills` and adds that folder to `skills.external_dirs` in Hermes's settings; if that fails, it saves a copy in `~/.hermes/skills` instead, and says which it did. Before you run it, delete the copy you saved in `~/.hermes/skills/tg-cli`, or run `hermes skills uninstall tg-cli` if you installed it from this site: Hermes prefers that folder, so an old copy would hide the new one. **If Hermes cannot find `tg`.** Hermes runs commands with the environment of a login `bash` (`bash -l`), saved when the session starts. That shell reads `~/.bash_profile` if you have one, otherwise `~/.profile`. It does not read `~/.zshrc`. If you added npm's folder to `PATH` only in `~/.zshrc`, copy that `export PATH=…` line to the file bash reads, start a new Hermes session and ask it to run `tg --version`. **If you talk to Hermes from a chat.** Its gateway lets you message Hermes from Telegram, Discord and other chats. Anyone the gateway accepts can ask Hermes to run `tg` with your account: read your chats or send as you. Keep its allowed-users list to yourself, and consider a profile that only reads: see [Permissions](/llms.mdx/docs/configuration/content.md#permissions). [Hermes skills guide](https://hermes-agent.nousresearch.com/docs/user-guide/features/skills/). ### OpenClaw [#openclaw] **Install the skill.** With its default state folder, OpenClaw also reads `~/.agents/skills`, so `tg skill install --for agents` is enough. If you moved that folder with `OPENCLAW_STATE_DIR`, ask OpenClaw to save the exact output of `tg skill show` into `skills/tg-cli/SKILL.md` inside it. Check that the skill is available to your agent and start a new session. The tool must be installed on the computer or server where OpenClaw runs. **If OpenClaw cannot find `tg`.** OpenClaw's background service starts with a short `PATH`, such as `/usr/local/bin:/usr/bin:/bin` on Linux, and npm's global folder may be missing from it. Find that folder with `npm prefix -g`; on macOS and Linux the programs are in its `bin` folder. Stop OpenClaw's gateway, add the folder, then start the gateway again: ```sh openclaw config set tools.exec.pathPrepend '["/home/you/.npm-global/bin"]' --strict-json ``` Replace the path with yours. The value replaces the whole list, so include any folders you already set there. **If you talk to OpenClaw from a chat.** Its channels connect OpenClaw to Telegram, WhatsApp, Discord and other chats. Anyone a channel accepts can ask OpenClaw to run `tg` with your account: read your chats or send as you. Accept only yourself in its pairing or allowlist settings, and consider a profile that only reads: see [Permissions](/llms.mdx/docs/configuration/content.md#permissions). [OpenClaw skills guide](https://docs.openclaw.ai/tools/skills). ### Another agent [#another-agent] The examples above are not a closed list. Any agent with command-line access can use the tool. Give it the output of `tg skill show`, or give it [the Markdown documentation](#documentation-for-your-agent). It finds what to do with `tg guide`, which lists step-by-step scenarios for common tasks, and `tg commands`, which lists every command by section and marks the ones that change something. The same scenarios are on this site, one page per tool: [Telegram](/llms.mdx/docs/tg/scenarios/content.md), [MAX](/llms.mdx/docs/max/scenarios/content.md), [Zoom](/llms.mdx/docs/zm/scenarios/content.md), [Google Drive](/llms.mdx/docs/drive/scenarios/content.md), [Google Calendar](/llms.mdx/docs/gcal/scenarios/content.md) and [Memo](/llms.mdx/docs/memo/scenarios/content.md). `--help` after a command, as in `tg chats list --help`, shows its options. A cloud agent runs on another computer. Install the tool and log in there; your local login is not available to it. Ready-made installation choices cover specific clients; other agents use their own instruction or tool settings. ## Where to get WireCat skills [#where-to-get-wirecat-skills] A **skill** is an instruction file, `SKILL.md`, that teaches your AI agent the commands of one WireCat tool. Each tool installs its own skill with `skill install` (see [Connect the instructions](#connect-instructions)). This section lists the skill directories that offer the same skills, for when you prefer to install and update skills the way your agent does. By the end, your agent has the skill it needs, from the source you chose. A skill only teaches. The tool itself must still be installed and logged in on the computer where your agent runs: see [Installation](/llms.mdx/docs/installation/content.md). ### Skill names [#skill-names] The examples use `tg` for Telegram. For another tool, replace the repository and the skill name: - **Telegram** (`tg`): repository `WireCatLabs/tg-cli`, skill `tg-cli` - **MAX** (`max`): repository `WireCatLabs/max-cli`, skill `max-cli` - **WhatsApp** (`wa`): repository `WireCatLabs/whatsapp-cli`, skill `whatsapp-cli` - **Google Drive** (`drive`): repository `WireCatLabs/drive-cli`, skill `drive-cli` - **Notion** (`notion`): repository `WireCatLabs/notion-cli`, skill `notion-cli` - **Yandex Disk** (`ydisk`): repository `WireCatLabs/ydisk-cli`, skill `yandex-disk-cli` - **Google Calendar** (`gcal`): repository `WireCatLabs/gcal-cli`, skill `gcal-cli` - **Mail** (`mail`): repository `WireCatLabs/mail-cli`, skill `mail-cli` - **Bitrix24** (`b24`): repository `WireCatLabs/bitrix24-cli`, skill `bitrix24-cli` - **amoCRM and Kommo** (`amo`): repository `WireCatLabs/amo-cli`, skill `amo-cli` - **WordPress** (`wordpress`): repository `WireCatLabs/wordpress-cli`, skill `wordpress-cli` - **Linear** (`linear`): repository `WireCatLabs/linear-cli`, skill `linear-cli` - **Attio** (`attio`): repository `WireCatLabs/attio-cli`, skill `attio-cli` - **HubSpot** (`hubspot`): repository `WireCatLabs/hubspot-cli`, skill `hubspot-cli` - **Asterisk** (`pbx`): repository `WireCatLabs/asterisk-cli`, skill `asterisk-cli` - **Zoom** (`zm`): repository `WireCatLabs/zoom-cli`, skill `zoom-cli` - **Memo** (`memo`): repository `WireCatLabs/cli-memo`, skill `cli-memo` ### From the tool itself [#from-the-tool-itself] This is the copy that matches the tool version you installed. It works for Codex, Claude Code, Cursor, Gemini CLI and OpenClaw: ```sh tg skill install ``` Run it again after you update the tool. ### Hermes Agent [#hermes-agent] This site publishes every tool's skill, at the release these pages describe, in a skill index that Hermes reads. Install one skill: ```sh hermes skills install well-known:https://wirecat.dev/.well-known/skills/tg-cli ``` Hermes scans every skill before it installs one. If it stops at a caution, don't force the install: [report it](https://github.com/WireCatLabs/cli-docs/issues) with the finding it shows. `hermes skills search https://wirecat.dev --source well-known` lists them all. Hermes keeps the source, so `hermes skills update` refreshes the skill later. Clients of the newer discovery format read the same skills at `https://wirecat.dev/.well-known/agent-skills/index.json`. You can also add a tool's repository as a standing skill source (a tap): ```sh hermes skills tap add WireCatLabs/tg-cli ``` A repository source reads the repository's main branch, which can be ahead of the released tool. [Hermes skills guide](https://hermes-agent.nousresearch.com/docs/user-guide/features/skills/#skills-hub). ### OpenClaw and ClawHub [#openclaw-and-clawhub] ClawHub is OpenClaw's skill directory. The WireCat skills are listed there by the `wirecat` publisher: `wirecat-tg`, `wirecat-max`, `wirecat-whatsapp`, `wirecat-zoom`, `wirecat-memo` and `wirecat-drive`. One command installs a skill for every workspace: ```sh openclaw skills install @wirecat/wirecat-tg --global ``` Without ClawHub, `tg skill install --for agents` gives OpenClaw the skill, because OpenClaw reads `~/.agents/skills`. [OpenClaw skills guide](https://docs.openclaw.ai/tools/skills). ### skills.sh [#skillssh] The `skills` command from skills.sh installs a skill from a repository into the folders of the agents it finds on your computer: ```sh npx skills add WireCatLabs/tg-cli --skill tg-cli ``` Keep `--skill`: some repositories also hold skills for people who work on the tool itself. Like a Hermes repository source, it reads the main branch. [skills.sh](https://skills.sh/). ### Claude Code plugin marketplace [#claude-code-plugin-marketplace] **Coming soon.** A WireCat marketplace for Claude Code, with one plugin per tool that holds only its skill. When it is published, add it in Claude Code with: ```text /plugin marketplace add WireCatLabs/claude-plugins ``` Until then, `tg skill install --for claude` installs the skill for Claude Code. [Claude Code plugins guide](https://code.claude.com/docs/en/plugins). ### Check the result [#check-the-result] Start a new agent session and run the check in [Check whether you are ready](#check-connection). If the agent has the skill but cannot run the tool, see the notes for [Hermes](#hermes) and [OpenClaw](#openclaw). ## For chat apps and remote agents [#for-chat-apps-and-remote-agents] Everything above runs the command-line tool directly. For an agent on the same computer, that is the faster route, and you can run the same command yourself when something looks wrong. **MCP** is an optional connection for apps that cannot run programs: - **ChatGPT, Claude or another chat in a browser or phone app:** follow the [browser/mobile connection guide](/llms.mdx/docs/browser-apps/content.md). - **A desktop app with MCP settings, such as Claude Desktop:** follow [MCP setup](#cursor-and-claude-desktop). - **An agent on another computer:** install the tool and log in there, as described in [Another agent](#other-agents). If it can only reach your computer over a connection, use [MCP setup](#mcp-and-skills). Login is not an MCP tool: an agent that has only MCP asks you to run the login command yourself. ## MCP and skills [#mcp-and-skills] ### What MCP is [#what-mcp-is] **MCP (Model Context Protocol)** is an open standard for connecting AI agents to tools. It works like a universal plug: an app that supports MCP can use a compatible MCP server without a custom integration. The standard is published at [modelcontextprotocol.io](https://modelcontextprotocol.io/). Two sides take part: - The **client** is the application your agent runs in, for example Claude Desktop, ChatGPT, Cursor or Gemini CLI. It asks the server which tools exist and calls one when your request needs it. - The **server** is `tg mcp serve` or `max mcp serve`, part of the command-line tool. It runs on your computer, or on a server that a browser chat reaches over a public HTTPS address. Through MCP, the AI can use only the tools the server offers, and only within the profile's [permissions](/llms.mdx/docs/configuration/content.md#permissions): a read-only profile cannot send. Connecting MCP does not log in to your messenger for you; you log in once with the command-line tool. It does not download your whole archive either. An agent with a terminal, such as Claude Code or Codex, does not need MCP: it can run `tg` and `max` commands directly, and a **skill** tells it how. An agent without a terminal, such as one in Claude Desktop or a browser chat, uses MCP. The [comparison below](#cli-skill-or-mcp) helps you choose. **Using an AI chat in the browser or on your phone?** ChatGPT, Claude and other web chats connect through a public HTTPS address: follow the [browser and mobile setup guide](/llms.mdx/docs/browser-apps/content.md). ### What the MCP server does [#what-the-mcp-server-does] Our MCP server gives your agent access to the connected messenger: chats, messages, shared files, searches and reports. You ask for a result; the agent calls the server, which performs the action through the messenger tool. The server is included in the command-line tool and **must be running while the agent uses it**. A local client can start it on your computer. For a browser or mobile chat, keep it running on a computer or server and connect through a public HTTPS address with authentication. Follow the [browser/mobile setup guide](/llms.mdx/docs/browser-apps/content.md) for that connection. ### How the agent finds and runs actions [#how-the-agent-finds-and-runs-actions] The server exposes a small set of tools instead of making you choose from hundreds of commands. First the agent finds an action and its arguments; then it runs that action. For example, to find an agreement it discovers message search, executes it and opens the matching messages. The examples in this section use Telegram names. For MAX, replace `tg` with `max`, including tool and configuration names. | Tool | What it does | |---|---| | `tg_tools_search` | Finds the command for a task and tells the agent its arguments and effects. This searches available actions, not your messages. | | `tg_read` | Runs a discovered read action: list chats, search messages, read files or build a report. | | `tg_write` | Runs a discovered change: send a message, save extracted text or manage a group, within the profile’s permissions. | ### What the skill does [#what-the-skill-does] A **skill** is an instruction file for your agent: which tools to use, how to gather context, check sources and prepare a result. MCP provides access to actions; the skill explains how to use them for a task. The skill contains guidance, not your account credentials. The installed tool includes the instructions: [add them](#connect-instructions) with the setup command, or display them with `tg skill show`. An agent with terminal access can use the instructions and run the CLI directly. ### CLI, skill or MCP? [#cli-skill-or-mcp] | Connection | What it provides | Choose it when | |---|---|---| | CLI | Commands in a terminal, with JSON results | Your agent already has a local terminal | | Skill + CLI | Instructions for using those commands and workflows | Your agent can run terminal commands, for example Codex, Cursor Agent, Claude Code, Gemini CLI, Hermes or OpenClaw | | MCP | Named tools and their parameters directly inside your client | Your agent has no terminal, for example in Claude Desktop, or you prefer the client's tool interface | | MCP over HTTP | The same tools for an AI chat in a browser, such as ChatGPT or Claude, behind your own tunnel | You chat in a browser — [ChatGPT and Claude in the browser](/llms.mdx/docs/browser-apps/content.md) | | Markdown docs | A readable explanation and command reference | You want the agent to look up how something works | For an agent with a terminal, start with [a skill](#connect-instructions). MCP is optional and follows the same profile permissions as the CLI. It does not log in for you or download the whole archive. ### Before connecting [#before-connecting] [Install and log in](/llms.mdx/docs/installation/content.md). Run `tg personal mcp config` or `max personal mcp config` to print a configuration with the actual Node and CLI paths on your machine. This command prints settings; it does not edit your client. Desktop clients may have a different PATH from your terminal. The server serves the profile you name: `tg personal mcp serve`. You can serve several profiles from one server with `tg mcp serve --profiles personal,work`, or every profile with `--profiles all`; each tool call then says which profile it is for. max works the same way. Without a profile or `--profiles`, neither starts the server. `tg mcp` or `max mcp` on its own only shows help. #### Codex [#codex-1] In a terminal where the installed command works: ```sh tg personal mcp add codex codex mcp list ``` Setup uses Codex's own command and leaves other servers intact. By hand, the equivalent is `codex mcp add tg -- tg personal mcp serve`. Connect only the messengers you use. Codex stores MCP settings in `~/.codex/config.toml`. For Windows or an IDE with a different PATH, take `command`, `args` and `env` from `mcp config` and put them into `[mcp_servers.tg]` or `[mcp_servers.max]`; Codex uses TOML, not `mcpServers` JSON. [Official Codex MCP guide](https://learn.chatgpt.com/docs/extend/mcp?surface=cli). #### Claude Code [#claude-code-1] ```sh tg personal mcp add claude-code claude mcp list ``` By hand, the equivalent is `claude mcp add --scope user tg -- tg personal mcp serve`. If the profile exposes write tools, setup asks you to check its [permissions](/llms.mdx/docs/configuration/content.md#permissions) first and then repeat with `--allow-writes`. That flag only confirms the installation; it does not change the permissions. Use `/mcp` in a session to check status. For full paths, use the values from `mcp config`. [Official Claude Code MCP guide](https://code.claude.com/docs/en/mcp). #### Cursor and Claude Desktop [#cursor-and-claude-desktop] Copy the server entry printed by `tg personal mcp config` or `max personal mcp config` into the client's `mcpServers` settings, preserving its full paths and environment. Merge it with existing servers. | Client | Configuration file | |---|---| | Cursor, personal | `~/.cursor/mcp.json` | | Cursor, project | `.cursor/mcp.json` | | Claude Desktop, macOS | `~/Library/Application Support/Claude/claude_desktop_config.json` | | Claude Desktop, Windows | `%APPDATA%\Claude\claude_desktop_config.json` | Restart the client and check that the server's tools are available. [Official Cursor MCP guide](https://cursor.com/help/customization/mcp). #### Gemini CLI [#gemini-cli-1] ```sh gemini mcp add --scope user tg tg personal mcp serve gemini mcp list ``` For full paths and environment variables, merge the generated entry into `mcpServers` in `~/.gemini/settings.json`. [Official Gemini MCP guide](https://geminicli.com/docs/tools/mcp-server/). #### Hermes [#hermes-1] Hermes uses `mcp_servers` in `~/.hermes/config.yaml`. Add `tg` or `max` there with the `command`, `args` and `env` values from the generated configuration, keeping existing settings. Hermes uses YAML; do not paste the whole `mcpServers` JSON object into it. Restart Hermes to load the server. [Official Hermes quickstart](https://hermes-agent.nousresearch.com/docs/getting-started/quickstart/). ### Zoom, Google Drive and Memo [#zoom-google-drive-and-memo] Each tool starts its own server. Connect it with the command your client uses for MCP servers: - **Zoom:** `zm personal mcp serve`. - **Google Drive:** `drive personal --read-only mcp serve`. - **Notion:** `notion personal mcp serve`. - **Yandex Disk:** `ydisk personal mcp serve`. - **Google Calendar:** `gcal personal mcp serve`. - **Mail:** `mail personal mcp serve`. - **Bitrix24:** `b24 personal mcp serve`. - **amoCRM and Kommo:** `amo work mcp serve`. - **Attio:** `attio work mcp serve`. - **HubSpot:** `hubspot work mcp serve`. - **Asterisk:** `pbx office mcp serve`. - **WordPress:** `wordpress blog mcp serve`. - **Linear:** `linear work mcp serve`. - **Memo:** `memo mcp serve`. ### What the agent can do [#what-the-agent-can-do] MCP covers most everyday CLI operations: read and search chats, inspect people and groups, work with message attachments, prepare reports, send replies and manage groups when permitted. For full command syntax and MCP-specific availability, use the messenger references: - [Telegram MCP tools and coverage](/llms.mdx/docs/tg/mcp/content.md#tools) · [Telegram command reference](/llms.mdx/docs/tg/commands/content.md). - [MAX MCP tools and coverage](/llms.mdx/docs/max/mcp/content.md#%D0%B8%D0%BD%D1%81%D1%82%D1%80%D1%83%D0%BC%D0%B5%D0%BD%D1%82%D1%8B) · [MAX command reference](/llms.mdx/docs/max/commands/content.md). The available catalogue is determined by the messenger and profile permissions. Ask the agent to discover an action through the search tool; its result provides the supported command and arguments. A read-only profile excludes changes. The server has no confirmation step of its own: approval prompts come from your app, and the server cannot check whether a person accepted them. After connecting, ask for five recent chats. Continue with [First tasks](/llms.mdx/docs/first-tasks/content.md). ### Documentation for your agent [#documentation-for-your-agent] The messenger MCP servers access your account. Documentation access is separate: | Resource | What to give your agent | |---|---| | [Page index](/llms.txt) | `https://wirecat.dev/llms.txt` — find a relevant page and follow its Markdown link | | [All pages](/llms-full.txt) | `https://wirecat.dev/llms-full.txt` — the full reference, for tools that can handle a large document | | One page | Use **Copy Markdown** or **Open** at the top of a docs page | | The tool itself | For an agent that runs the tool: `tg guide` lists step-by-step scenarios, `tg commands` lists every command by section | Try: **“Read https://wirecat.dev/llms.txt, find the Telegram inbox documentation and use it to summarise my unread messages.”** If your agent cannot fetch URLs, copy the page's Markdown into the chat. These Markdown pages can be read directly. Give the agent the index or the page it needs; no additional documentation server is required. If a connection fails, check the full paths, the Node version, and that client and terminal use the same profile and configuration directories. Each [Telegram](/llms.mdx/docs/tg/mcp/content.md) / [MAX](/llms.mdx/docs/max/mcp/content.md) MCP reference explains the environment and troubleshooting. ## Use from web or mobile [#use-from-web-or-mobile] ChatGPT, Claude, Gemini and other AI chats in a browser or phone app cannot run programs on your computer. They reach the tool through MCP and a public HTTPS address. The guide [Use from web or mobile](/llms.mdx/docs/browser-apps/content.md) covers the address, adding the connection to your chat, permissions, recovery and an always-on server. ## Ready for your first task [#ready-for-your-first-task] Ask the agent to find an agreement, catch up on a conversation or prepare a draft: [First tasks](/llms.mdx/docs/first-tasks/content.md). If it cannot find the tool, check installation and that it runs on the same computer as your agent. For a chat on another device, use the [browser/mobile guide](/llms.mdx/docs/browser-apps/content.md). # AmoCRM CLI commands (/en/docs/amo/commands) Look up any `amo` command, its options and what it answers, and trust that it matches the version you run: this page is generated from the program itself. Your AI agent reads the same list as JSON with `amo commands --json`, and picks a command and its options from there. Each exit code means one kind of failure, so a script or an agent can tell what went wrong. **The first word is the profile**, a name you choose: `amo personal config show`. `AMO_PROFILE` does the same for a whole shell session. No profile is assumed: a command that uses an account stops without one and lists the profiles on this computer. **On this page:** 1. [Options for every command](#options-for-every-command) 2. [Deals](#amo-deals) 3. [Pipelines](#amo-pipelines) 4. [Contacts](#amo-people) 5. [Companies](#amo-organizations) 6. [What changed](#amo-changes) 7. [The API](#amo-api) 8. [Exit codes](#exit-codes) ## Options for every command [#options-for-every-command] | Option | What it does | |---|---| | `-V, --version` | output the version number. | | `-v, --verbose` | more detail in what is shown: -v ids, -vv everything we know. Default: `0`. | | `--json` | machine-readable output: one JSON value on stdout; --json=id,text keeps only those fields. | | `--jsonl` | machine-readable output: one JSON object per line, for streaming and jq. | | `--quiet` | diagnostics off; a failure is still said. | | `--trace` | the connection's own log lines on stderr — never content. | | `--debug` | on a failure, its whole record — cause and stack — in place of the short line. | | `--timeout ` | give up on the whole command after this — 30s, 2m, 500ms. | | `--offline` | answer from what was recorded and never connect; fails if nothing was. | | `--no-input` | never prompt or open interactive login; piped input remains available. | | `--max-input-bytes ` | maximum buffered input bytes (default: 16777216). | | `--max-output-bytes ` | maximum machine output bytes (default: 4194304; 0 disables). | | `--brief` | found items as reference, title, time, author and excerpt only. | | `--full` | found items with their whole text and every provider field. | | `--compact` | one line per item for an agent: reference first, text last, paging and next steps as # lines. | | `--dry-run` | preview parsed arguments and permissions before running the action. | | `--yes` | go ahead without the question an ask level puts before a write. | | `--record` | keep this run even where the config says record false; record_input false leaves the typed words out. | | `--no-record` | do not keep this run, even if it fails. | ## `amo commands` [#amo-commands] every command by section; --json prints its contract, one path per call ### `amo commands info` [#amo-commands-info] one command contract, or all schemas, error reasons and explicit overrides ```sh amo commands info [path] ``` | Argument | | What it is | |---|---|---| | `path` | optional | one command path; without one, export schemas, error reasons and explicit overrides. | **Example:** `amo commands info commands` ## `amo session` [#amo-session] keep this profile's amoCRM sign-in and account address in the OS keyring ### `amo session start` [#amo-session-start] sign this profile in: --host names the account, and its long-lived token (a private integration → Keys and scopes → Generate a long-lived token) is asked hidden or read from stdin, never taken as an argument, checked against the account, and only then kept in the keyring with the address, or in a private file. The token acts with the rights of the administrator who made it. With --client-id it signs in through that integration in the browser instead: its secret key is asked hidden or read from stdin, and the tokens act with the rights of the user who signs in; the integration's Redirect URI must be https://wirecat.dev/webhooks/apps/amo-callback. With --one-click, amoCRM's button on connect.wirecat.dev creates a WireCat integration in the account you choose, and nothing is copied by hand: amoCRM sends the integration's secret key to connect.wirecat.dev, which hands it to amo once and keeps no copy; amocrm.ru accounts only for now. amoCRM lets only an account administrator allow either browser sign-in, so a user who is not one signs in with a token an administrator made. Each sign-in forgets the profile's other kind **Changes something on this computer only.** ```sh amo session start [options] ``` | Option | What it does | |---|---| | `--host
` | the account's address, such as https://example.amocrm.ru, kept as given. | | `--client-id ` | the integration's ID (client_id), or AMO_AMOCRM_CLIENT_ID; its secret key comes from AMO_AMOCRM_CLIENT_SECRET, a hidden prompt or stdin. | | `--one-click` | sign in with one click in the browser: amoCRM creates WireCat's integration in the account; only an administrator can allow it. | | `--credential-storage ` | where the sign-in is kept: keyring, which falls back to a private file by itself, or file. Default: `keyring`. | **Example:** `amo work session start --host https://example.amocrm.ru`, `amo work session start --host https://example.amocrm.ru --one-click`, `amo work session start --host https://example.amocrm.ru --client-id 0123abcd-4567-89ef-0123-456789abcdef` ### `amo session status` [#amo-session-status] show which account this profile signs in to, with a long-lived token or an integration, and where that comes from: AMO_TOKEN, the keyring or a file; never a token or the secret key ```sh amo session status [options] ``` | Option | What it does | |---|---| | `--check` | ask the account whether the sign-in still works and whose it is: the account, the user and admin. | **Example:** `amo work session status`, `amo work session status --check --json` ### `amo session end` [#amo-session-end] forget this profile's long-lived token, or its integration's secret key and tokens, and the account address on this computer; amoCRM has no call that revokes a token: revoke it on the integration's Keys and scopes tab, or switch the integration off **Changes something on this computer only.** ```sh amo session end ``` **Example:** `amo work session end` ### `amo session list` [#amo-session-list] list the profiles on this computer, whether each has a token and for which account; picks none ```sh amo session list ``` **Example:** `amo session list`, `amo session list --json` ## `amo account` [#amo-account] this profile on this computer ### `amo account remove` [#amo-account-remove] sign the profile out, then forget it on this computer: its settings, its saved sign-in and its files; --keep-data leaves its messages in the store, where search still finds them, --delete-data deletes them; asks first, or --yes **Changes something on this computer only.** ```sh amo account remove [options] ``` | Option | What it does | |---|---| | `--keep-data` | leave what the store holds of this account, still searchable. | | `--delete-data` | delete what the store and the tool's own files hold of this account. | | `--dry-run` | list what it would remove and keep, and change nothing. | **Returns:** account removal — profile, data, dry_run, account, revoked, config_file, removed, kept; every field: amo commands info account remove **Example:** `amo personal account remove --keep-data --dry-run`, `amo personal account remove --delete-data --yes` ## `amo sync` [#amo-sync] bring the CRM's copy in the local store up to date: pipelines, companies, contacts, deals that changed since the last sync, or everything with --rescan; a run stops before its deadline or --max-pages and the next one goes on from there **Changes something on this computer only.** ```sh amo sync [options] ``` | Option | What it does | |---|---| | `--rescan` | list everything again, every id too, dropping a round in progress. | | `--max-pages ` | at most this many requests to the CRM in this run. | **Returns:** crm sync — provider, account, scope, pipelines, skipped_owner_rejected, stage_tasks, synced, issues, and 9 more; every field: amo commands info sync **Example:** `amo work sync`, `amo work sync --rescan`, `amo work sync --max-pages 20` ## `amo store` [#amo-store] the local copy of the CRM, and the shared store file it lives in ### `amo store status` [#amo-store-status] how far each kind's sync is: rows saved, partial or complete, when it last moved, how many are stored ```sh amo store status ``` **Returns:** crm sync progress — kind, round, id_pass, stored, job, profile, done, total, and 6 more; every field: amo commands info store status **Example:** `amo work store status --json` ### `amo store apply` [#amo-store-apply] apply scope mine to the contacts already stored: remove those no deal of the chosen users and no kept company names, and the people they leave empty; counts only unless --yes, under scope all too. A sync that narrows the scope, or sync --rescan under mine, does this itself **Changes something on this computer only.** ```sh amo store apply [options] ``` | Option | What it does | |---|---| | `--yes` | remove the contacts it counts; otherwise only count them. | **Returns:** crm contacts removed — contacts, persons, persons_kept, names, applied; every field: amo commands info store apply **Example:** `amo work store apply`, `amo work store apply --yes` ### `amo store info` [#amo-store-info] the store file: where it is, its size, its schema against the one this tool speaks, which tools used it and how many rows it holds, by provider, chat kind, account, year (UTC) and attachment kind, over every account; changes nothing ```sh amo store info ``` **Returns:** store info — path, exists, schema, opens, error, bytes, journal_mode, pages, and 12 more; every field: amo commands info store info **Example:** `amo work store info` ### `amo store check` [#amo-store-check] whether the store is healthy — integrity, search indexes, disk ```sh amo store check ``` **Returns:** store check — path, exists, ok, opens, error, checks, schema, integrity, and 11 more; every field: amo commands info store check **Example:** `amo work store check` ### `amo store migrate` [#amo-store-migrate] bring the store up to this build's schema, then normalize, index and stem the messages and notes stored before it **Changes something on this computer only.** ```sh amo store migrate ``` **Returns:** store migration — path, exists, from, to, normalized, indexed, terms, stemmed, and 1 more; every field: amo commands info store migrate **Example:** `amo work store migrate` ### `amo store rebuild` [#amo-store-rebuild] rebuild the word index, its typo vocabulary, the stems, the files' word index, the notes' indexes and who took part in what, from what is stored, and drop the vectors no stored text uses; loses nothing **Changes something on this computer only.** ```sh amo store rebuild ``` **Returns:** store reindex — path, exists, normalized, indexed, terms, stemmed, notes_indexed, file_texts, and 2 more; every field: amo commands info store rebuild **Example:** `amo work store rebuild` ### `amo store backup` [#amo-store-backup] copy the store into a new file, while it is in use; never overwrites a file **Changes something on this computer only.** ```sh amo store backup [options] ``` | Argument | | What it is | |---|---|---| | `file` | required | the new file. | | Option | What it does | |---|---| | `--encrypt` | compress and encrypt with a password, typed at a hidden prompt or piped on stdin; it is never kept — lose it and the file cannot be opened. | **Returns:** store backup — path, from, bytes, schema, rows, encrypted; every field: amo commands info store backup **Example:** `amo work store backup ./backup.db` ### `amo store restore` [#amo-store-restore] put a backup in place of the store; the store it replaces is kept beside it, never deleted. Given a rollback copy (backups/-rollback-schema--