Install the toolkit
The Kasm toolkit gives a coding agent on your machine what it needs to launch a Kasm workspace session and work on its desktop: instructions it reads first (AGENTS.md), skills, and runnable examples. kcli, the Kasm command line, installs it, links the skills into your agent, and serves the MCP tools the agent calls. Your agent then starts a session by name and drives its applications, with no session URL or token to copy.
What you need
Section titled “What you need”- A Kasm deployment with the runtime enabled on the workspace you want to use. See Enable the runtime on a workspace.
- A Kasm API key that can request sessions for users and sign in as them.
- One of Claude Code, Codex, OpenCode or Hermes.
1. Install kcli
Section titled “1. Install kcli”curl -fsSL https://kcli.sandbox.kasm.com/install.sh | bash2. Point kcli at your deployment
Section titled “2. Point kcli at your deployment”kcli config initIt asks for your deployment’s URL and how to sign in. Choose the API key. kcli keeps it in its own profile, and your agent’s configuration never holds it.
3. Install the toolkit
Section titled “3. Install the toolkit”kcli toolkit installkcli downloads the newest toolkit, checks its signature and checksum, and installs it in ~/.kasm/ktoolkit.
To have your agent do steps 1 to 3 instead, point it at https://kcli.sandbox.kasm.com/agent-setup.md.
4. Add it to your agent
Section titled “4. Add it to your agent”Each agent takes two commands. The first links the toolkit’s skills, and the second adds kcli as an MCP server named kasm-session. The MCP command names kcli by its full path, "$(command -v kcli)", for an agent started from a desktop launcher that may not have kcli on its PATH. To use a kcli profile other than the default, add --profile NAME before mcp.
Claude Code
Section titled “Claude Code”kcli toolkit link --agent claudeclaude mcp add --scope user kasm-session -- "$(command -v kcli)" mcp serve --scope sessionThe skills go in $CLAUDE_CONFIG_DIR/skills, by default ~/.claude/skills. If a kasm-session server is already registered, remove it first with claude mcp remove --scope user kasm-session.
kcli toolkit link --agent codexcodex mcp add kasm-session -- "$(command -v kcli)" mcp serve --scope sessionThe skills go in ~/.agents/skills. Adding kasm-session again replaces the existing entry.
OpenCode
Section titled “OpenCode”kcli toolkit link --agent opencodeopencode mcp add kasm-session --global -- "$(command -v kcli)" mcp serve --scope sessionThe skills go in ~/.agents/skills and appear without a restart. The opencode command may be at ~/.opencode/bin/opencode rather than on your PATH.
Hermes
Section titled “Hermes”kcli toolkit link --agent hermeshermes mcp add kasm-session --command "$(command -v kcli)" --args mcp serve --scope sessionhermes mcp add connects to kcli and asks whether to enable its tools. Answer Y. The skills go in $HERMES_HOME/skills, by default ~/.hermes/skills.
5. Check it
Section titled “5. Check it”| Agent | Command | Expect |
|---|---|---|
| Claude Code | claude mcp get kasm-session |
the server, connected |
| Codex | codex mcp list |
kasm-session in the list |
| OpenCode | opencode mcp list |
kasm-session in the list |
| Hermes | hermes mcp list |
kasm-session, enabled |
kcli toolkit status shows the installed and newest toolkit versions and the agents it is linked into.
Then ask your agent to launch a session on one of your workspaces, by the name Kasm shows for it. Try it: Claude Code drives a session has a first task.
Skills for one project
Section titled “Skills for one project”kcli toolkit link --agent <agent> --project DIRlinks the skills into DIR/.agents/skills for Codex, OpenCode and Hermes, or DIR/.claude/skills for Claude Code. Only agents working in that project see them. Hermes loads project skills after you run hermes skills trust in the project.
Examples
Section titled “Examples”kcli toolkit examples DIRcopies the toolkit’s examples into DIR for you to run and change. It never overwrites a file that is already there, and updates leave your copy alone.
Updating
Section titled “Updating”kcli tells you when a newer toolkit is out. Run:
kcli toolkit updateLinked skills switch to the new version at once. The MCP entries stay as they are.
Removing
Section titled “Removing”kcli toolkit unlink --agent <agent>removes the skill links kcli made for that agent and leaves anything else in its skills folder alone. Remove the MCP entry with the agent’s own command, such as claude mcp remove --scope user kasm-session.