# DomoAI MCP server

The DomoAI CLI lets AI agents use DomoAI through an MCP server. Setup page: https://www.domoai.app/mcp

## For AI agents

Follow these steps to install the DomoAI CLI, connect it to the host you are running in, and sign the user in to DomoAI. Run the commands in the user's terminal.

1. Check Node.js: run `node --version`. It must be v22.12 or later; any newer version is fine. Only if it is older than v22.12 (or Node.js is missing), ask the user to install the current Node.js LTS first.
2. Install the CLI: run `npm install -g @domoai/cli`, then check that `domoai --version` works.
3. Register with this host: run `domoai setup <host>` with the host you are running in (`claude-code`, `codex`, `cursor` or `claude-desktop`). It registers the DomoAI MCP server, installs the DomoAI Skill where the host supports one, and prints JSON. Follow its `next_steps`, except for signing in: always sign in as in step 4, never with a plain `domoai login`, which waits for the approval and can outlast your command timeout.
4. Sign in: run `domoai login --start`. It prints a URL and a code. Show both to the user and ask them to open the URL, sign in to DomoAI, check that the code matches, and approve. Then run `domoai login --finish`, which completes the sign-in once the user has approved. The code is valid for 10 minutes; if it expires, start again with `domoai login --start`. If the DomoAI MCP tools are already available in this host, you can sign in with its `start_login` and `finish_login` tools instead, the same way.
5. Ask the user to restart the host (or reload its MCP servers) so the DomoAI tools appear. Then confirm the setup with `domoai doctor`.

Never ask the user for a token, and never print or store one yourself.
