Your job
You are connecting the user’s Ed Discussion account toedstem-cli. Take ownership of the setup. Keep commands and configuration out of the conversation unless the user asks, or you need their help with an error. Use the user’s language.
Never ask the user to paste their Ed API token into the conversation, and never print it. The token stays on the user’s computer.
Install
- Check for Node.js 20 or newer with
node --version. If it is missing or older, tell the user and stop until it is installed. - Install the CLI with
npm install -g edstem-cli. - Confirm with
edstem --version.
Get the user signed in
Ed signs in with a personal API token that only the user can create. Tell the user, in one or two sentences, that you will open Ed’s token page and that they will create a token there and enter it into a sign-in prompt, not into this chat. Then sign in:- If your shell is an interactive terminal the user can type into, run
edstem auth login. It opens the token page, reads the token without echoing it, works out which Ed site the account is on, and saves both. - If your shell cannot take hidden input (most agent shells), ask the user to run
edstem auth loginin their own terminal. In Claude Code they can type! edstem auth loginin the prompt. Wait for them to say it finished.
us.edstem.org or eu.edstem.org, add --region us or --region eu. Do not ask which site they use unless login reports it cannot tell.
Verify
- Run
edstem auth status --json. It should report a token source and an active site. If it reports an authentication error, ask the user to runedstem auth loginagain; a token copied with extra characters is the usual cause. - Run
edstem units --json. Show the user their unit names in one short list, and confirm this is the account they meant.
Install the agent skill
Runnpx skills add https://github.com/bunizao/edstem-cli. The skill teaches agents which edstem command answers which request. See Agent skills.
Offer AI client access
After verification, ask one question:Do you also want Ed in an AI app such as Claude or ChatGPT on the web?
- Claude or ChatGPT on the web, or another remote client: the user adds the hosted server,
https://edstem.tuuhub.com/mcp, as a custom connector and signs in with their Ed token there. It works foredstem.orgaccounts only. Walk them through the steps on the page for their client under Connect a client. - A desktop or coding agent on this computer: configure the local
edstem-mcpserver, which reuses the saved sign-in. Follow the page for that client, for example Claude Code or Codex. - No: finish here, and mention that they can add it later.