Skip to content

kobiton/automate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

104 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Kobiton Logo Kobiton Automate

Discord Cloud Twitter Follow

Plugin for the Kobiton mobile testing platform. Works with Claude Code, GitHub Copilot CLI, Gemini CLI, Codex CLI, and Cursor CLI. Manage devices, upload apps, run automation sessions, and view test results directly from your AI coding assistant.

Contents

Before You Begin

Make sure you have:

Installation

Claude Code

Open your project and start a Claude Code session:

cd my-project
claude

Inside the session, add the Kobiton marketplace and install the plugin:

/plugin marketplace add kobiton/automate
/plugin install automate@kobiton

GitHub Copilot CLI

Open your project and start a Copilot CLI session:

cd my-project
copilot

Inside the session, add the Kobiton marketplace and install the plugin:

/plugin marketplace add kobiton/automate
/plugin install automate@kobiton

Gemini CLI

From your project directory, install the extension directly from GitHub:

cd my-project
gemini extensions install https://github.com/kobiton/automate

Then launch Gemini CLI:

gemini

The kobiton MCP server and bundled skills are auto-discovered. Confirm the extension is active with /extensions list and the MCP server with /mcp.

Codex CLI

Add the Kobiton marketplace and install the plugin from the in-session browser. Codex opens a browser for Kobiton OAuth login on the first tool call.

codex plugin marketplace add kobiton/automate
codex

Inside Codex:

  1. Type /plugins to open the plugin browser
  2. Select the kobiton marketplace, then install the automate plugin
  3. The system browser should open for Kobiton OAuth login. After sign-in, tokens are cached in the OS keychain (macOS Keychain / Linux Secret Service / Windows Credential Manager) with automatic refresh.
  4. Run /mcp to confirm kobiton is Connected.
Fallback: manual config.toml setup

If you prefer not to use the marketplace, register the MCP server directly in ~/.codex/config.toml:

[mcp_servers.kobiton]
url = "https://api.kobiton.com/mcp"

Then copy AGENTS.md into your workspace so Codex picks up the tool list and skill reference:

curl -sLO https://raw.githubusercontent.com/kobiton/automate/main/AGENTS.md

Launch codex and run /mcp to confirm. The OAuth flow still applies on the first tool call.

Cursor CLI

Open your project and start a Cursor CLI session:

cd my-project
agent

Inside the session, add the Kobiton marketplace and fetch the automate plugin from the repo.

/plugin marketplace add https://github.com/kobiton/automate

Then open automate and choose Install for you, it installs the 2 skills, the kobiton MCP server, and the /automate:setup and /automate:doctor commands.

Run /mcp list, select kobiton, and choose Login to complete Kobiton OAuth in the browser.

Run /automate:setup once to install the ~/.kobiton/bin/kobiton CLI wrapper used by the run-interactive-test skill.

Other MCP Clients

Kobiton's MCP server is built on the open Model Context Protocol, so any MCP-compatible client can connect to it. Same endpoint (https://api.kobiton.com/mcp), same browser-based OAuth login as the clients above.

Good to know: End-to-end tested only on Claude Code, Copilot CLI, Gemini CLI, Codex CLI, and Cursor CLI; entries below are configs we expect to work but have not yet validated. Please open an issue if any do not work for your setup. We're happy to help.

ChatGPT (Apps SDK)

ChatGPT consumes MCP servers via an HTTPS endpoint registered in ChatGPT developer mode. Point ChatGPT at:

https://api.kobiton.com/mcp

The Apps SDK does not require a separate manifest file; tool descriptors, OAuth flow, and _meta.ui widget hints flow through the MCP protocol itself. Reference: developers.openai.com/apps-sdk/build/mcp-server.

Cursor / Continue / Cline / other generic MCP clients

The Cursor IDE (the desktop editor, not the agent CLI covered above) reads MCP servers from the .cursor/mcp.json this repo already ships, so opening the project is enough.

{
  "mcpServers": {
    "kobiton": {
      "url": "https://api.kobiton.com/mcp"
    }
  }
}

Adjust to your client's specific format. The server URL and OAuth handshake are the same; if your client doesn't support OAuth, fall back to the API-key auth path (see API Key Authentication below) - most clients accept custom headers blocks.

Alternative: project-only MCP config (MCP server only, no skills or commands)

For a lightweight per-project setup that registers just the kobiton MCP server, drop .cursor/mcp.json from this repo into your project's .cursor/ directory:

cd my-project
mkdir -p .cursor
curl -sLO --output-dir .cursor https://raw.githubusercontent.com/kobiton/automate/main/.cursor/mcp.json
agent

You won't get the bundled skills, the /automate:setup and /automate:doctor commands, or the CLI wrapper.

Login

The first time your AI assistant calls a Kobiton tool, a browser window opens for OAuth login. Sign in with your Kobiton credentials, tokens are then managed automatically by the assistant.

You can also trigger or inspect authentication explicitly:

  • Claude Code: type /mcp and select kobiton to start the OAuth flow
  • GitHub Copilot CLI: type /mcp auth kobiton to start the OAuth flow; use /mcp (or /mcp show) to inspect server status
  • Gemini CLI: type /mcp auth kobiton to start the OAuth flow; use /mcp to inspect server status
  • Codex CLI: browser opens automatically on the first MCP tool call (e.g. "List my Kobiton devices") after plugin install. Tokens are cached in the OS keychain with automatic refresh. Use /mcp (or /mcp verbose) to inspect server status
  • Cursor CLI: run /mcp list, select kobiton, and choose Login to start the OAuth flow; tokens are stored by Cursor in the OS keychain

Behind the scenes, .mcp.json points to the Kobiton MCP server and authentication uses OAuth 2.1:

{
  "mcpServers": {
    "kobiton": {
      "type": "http",
      "url": "https://api.kobiton.com/mcp"
    }
  }
}

After login, verify the plugin loaded by asking your assistant: "List my Kobiton devices". If tools aren't recognized, see Troubleshooting.

API Key Authentication (Alternative)

For CI/CD pipelines or headless environments that cannot open a browser, use API key auth instead:

  1. Copy .mcp.apikey-example.json to .mcp.json

  2. Generate an API key at Kobiton Portal > Settings > API Keys

  3. Set the environment variable:

    # Add to ~/.zshrc, ~/.bashrc, or ~/.bash_profile
    export KOBITON_AUTH="Basic $(echo -n 'username:apikey' | base64)"
  4. Reload your shell and restart your AI CLI.

Note: OAuth and API key auth cannot coexist in a single .mcp.json (the API key config sets an Authorization header that OAuth must not have). To switch, replace .mcp.json with the appropriate format from .mcp.apikey-example.json.

Gemini CLI: API key auth requires editing gemini-extension.json instead of .mcp.json. Add a headers block under mcpServers.kobiton with "Authorization": "${KOBITON_AUTH}".

Codex CLI: OAuth is the default. For CI/headless environments where a browser cannot open, switch to API key auth by adding an env_http_headers block to the plugin's .mcp.json, then export KOBITON_AUTH in the shell that launches codex:

"env_http_headers": { "Authorization": "KOBITON_AUTH" }

Recommended: maintain a fork of kobiton/automate with this change committed, then install from your fork - survives plugin reinstalls and Codex upgrades. Last resort: edit the installed copy under ~/.codex/.tmp/marketplaces/kobiton/.codex/.mcp.json directly (this is Codex cache; the edit is overwritten on every reinstall).

Getting Started

After installation, run setup to fetch your credentials and write them to ~/.kobiton/.credentials:

/automate:setup

The plugin uses your already-authenticated MCP session (OAuth) to fetch your username and API key - no manual file editing required.

To verify everything is wired correctly, run the diagnostic:

/automate:doctor

/automate:doctor is read-only. It checks the CLI installation (symlink + target), the credentials file, the active profile, and required fields, and prints actionable remediation hints for any failures.

CLI symlink install behavior across CLIs: The run-interactive-test skill depends on a ~/.kobiton/bin/kobiton symlink.

  • Claude Code, Codex CLI: recreated automatically by a bundled SessionStart hook on every session start. On Codex, the first session prompts you to trust the hook once via /hooks; subsequent sessions run it silently. Running /automate:setup also recreates the symlink on demand.
  • GitHub Copilot CLI, Gemini CLI, Cursor CLI: no SessionStart hook runs, so create the symlink manually by running the setup command once after install: /automate:setup on Copilot, Gemini and Cursor (Copilot reads Claude-format Markdown commands; Gemini reads bundled TOML at commands/automate/setup.toml). Re-run it if the symlink goes missing.

Manual fallback - if the SessionStart hook was denied on Codex, or you need to install without an active session:

bash "$(find ~/.codex -name install-cli.sh -path '*automate*' 2>/dev/null | head -1)"

The script is idempotent - safe to re-run.

What You Can Do

Ask your assistant naturally:

  • "List my available Android devices"
  • "Upload my-app.apk and run tests on the Pixel 6"
  • "Show me the results for session 502"
  • "Run my Appium test script on the Pixel 6"

Tools

13 MCP tools across 4 domains.

Devices

Tool Description
listDevices List available devices filtered by platform, availability, or group
getDeviceStatus Get real-time status of a specific device
reserveDevice Reserve a device for exclusive testing
terminateReservation Release a reserved device by terminating its reservation

Sessions

Tool Description
listSessions List test sessions with filters for status, device, platform
getSession Get session details including commands, capabilities, metadata
getSessionArtifacts Get download URLs for video, logs, screenshots, reports
terminateSession Stop a running test session

Apps

Tool Description
listApps List uploaded app builds in your organization
uploadAppToStore Upload an app to Kobiton Store (permanent, visible in portal)
confirmAppUpload Confirm uploaded app for tracking record
getApp Get app details and version history

Account

Tool Description
getCredential Return the authenticated user's username, API key, and portal URL — backs /automate:setup

Skills

Skill Description
run-automation-suite Guided workflow for app upload, device selection, local Appium script execution (Node.js, Python, .NET, Java), and result collection.
run-interactive-test Guided workflow for interactive testing using natural language. WebDriver actions, device operations (adb shell, logs, screen), file management (push/pull), and more.

Platform support note: all MCP tools and the run-automation-suite skill work on every platform the host CLI supports. The run-interactive-test skill ships a CLI binary for macOS Apple Silicon only. On other platforms, use run-automation-suite or the MCP tools directly.

Commands

Command Description
/automate:setup Fetch credentials from the authenticated MCP server and write them to ~/.kobiton/.credentials
/automate:doctor Read-only diagnostic for CLI installation, credentials file, active profile, and required fields

Running Automation Tests

Use the run-automation-suite skill to run local Appium test scripts. Your AI assistant reads your script, extracts capabilities, confirms the target device, and executes the script locally. Supports Node.js (.js), Python (.py), .NET (.cs), and Java (.java) scripts.

Interactive Device Testing

Use the run-interactive-test skill to interact with devices using natural language. Describe what you want — "tap the login button", "type hello in the search field", "swipe down" — and your assistant translates your intent into CLI commands.

Beyond WebDriver, the skill also supports device operations (adb shell, logs, screen capture), file management (push/pull files to device), and app management.

Examples

See docs/examples.md for prompt examples covering every tool and skill - device management, session management, app management, automation, and interactive testing.

Troubleshooting

Updating the Plugin

After the plugin is updated upstream, pull the latest version:

  • Claude Code / Copilot CLI: run /plugin install automate@kobiton again
  • Gemini CLI: run gemini extensions update kobiton-automate from your shell
  • Codex CLI: run codex plugin marketplace upgrade to refresh the marketplace catalog, then reinstall the plugin from the browser to pull the latest manifest
  • Cursor CLI: re-run /plugin marketplace add https://github.com/kobiton/automate and reinstall the automate plugin - Cursor CLI has no dedicated update command yet (/plugin marketplace list only lists what's installed). Restart agent so the new manifest is picked up.

To make sure the assistant picks up the changes with no stale cache, reload per CLI:

  • Claude Code: run /reload-plugins in-session. If tools still behave unexpectedly, /clear resets the session context.
  • GitHub Copilot CLI: exit and relaunch the session (exit, then copilot). No in-session reload command.
  • Gemini CLI: exit and relaunch (exit, then gemini). Confirm with gemini extensions list.
  • Codex CLI: exit and relaunch. Confirm with codex plugin list.

If the issue persists after relaunch, quit the terminal entirely and start a fresh session.

Common Issues

MCP server doesn't appear in /mcp after install

All four CLIs cache plugin state when the session starts. After installing or updating the plugin, the kobiton MCP server may not show up in the server list immediately. Force a reload:

Claude Code — reload plugins in the current session:

/reload-plugins

GitHub Copilot CLI — exit and relaunch the session:

exit
copilot

Gemini CLI — exit and relaunch; if still missing, verify the extension is enabled:

exit
gemini extensions list
gemini

Codex CLI — exit and relaunch; if still missing, verify the marketplace was added and the plugin was installed:

exit
codex plugin marketplace list
codex plugin list
codex

If using the manual fallback config, also check grep -A 4 "mcp_servers.kobiton" ~/.codex/config.toml.

Then check the server list (/mcp in Claude Code, Gemini CLI, and Codex CLI, /mcp show in Copilot CLI). kobiton should now appear.

"Device not found"

The device may be offline, reserved by another user, or no longer in your device list. Use listDevices with available: true to find currently online devices.

"Upload timeout"

Large app files or slow connections can cause uploads to time out. Retry the upload — pre-signed URLs expire after 30 minutes, so a new URL will be generated automatically.

Claude Code

Plugin features not working or behaving unexpectedly

Some older versions of Claude Code don't support the plugin features this plugin relies on. Make sure you're on the latest version:

npm install -g @anthropic-ai/claude-code@latest

Then restart Claude Code and try again.

"It keeps asking me to open a folder"

Claude Code requires a working directory. Launch it from inside a project folder:

cd my-project
claude

If you see this prompt repeatedly, make sure you are not running claude from your home directory or root (/).

"Plugin not found in marketplace"

The Kobiton marketplace must be added before installing:

/plugin marketplace add kobiton/automate
/plugin install automate@kobiton

If it still isn't found, check your internet connection and ensure you're running the latest version of Claude Code (claude update).

"claude: command not found"

Claude Code is not installed or not in your PATH.

  • Install: follow the official install guide

  • PATH issue: if you installed via npm, make sure your npm global bin directory is in your PATH:

    npm install -g @anthropic-ai/claude-code

    Then open a new terminal window and try claude again.

"Nothing happens after install"

The plugin installed but tools don't appear or Claude doesn't recognize Kobiton commands.

  1. Run /reload-plugins to force Claude to pick up the new plugin
  2. Try asking: "List my Kobiton devices"
  3. If still not working, quit Claude Code entirely and start a fresh session
  4. Verify .mcp.json exists in the plugin directory — it tells Claude where the Kobiton MCP server lives

Copilot CLI

MCP tools not available after plugin install

Verify the plugin is installed and the MCP server is configured:

# Check installed plugins
copilot plugin list

# Check MCP server status
/mcp show

If the kobiton MCP server doesn't appear, add it manually by running /mcp add and entering the following when prompted:

  • Server name: kobiton
  • Type: http
  • URL: https://api.kobiton.com/mcp

Alternatively, edit ~/.copilot/mcp-config.json directly:

{
  "mcpServers": {
    "kobiton": {
      "type": "http",
      "url": "https://api.kobiton.com/mcp"
    }
  }
}
Tool calls are blocked

Copilot CLI requires explicit tool permissions. Allow Kobiton tools:

# Allow all Kobiton MCP tools
copilot --allow-tool='kobiton'

# Or allow specific tools
copilot --allow-tool='kobiton(listDevices)' --allow-tool='kobiton(getSession)'

Gemini CLI

Extension installed but tools or skills don't appear

Verify the extension is registered and enabled:

gemini extensions list

If kobiton-automate is missing, reinstall:

gemini extensions install https://github.com/kobiton/automate

If listed but disabled, enable it:

gemini extensions enable kobiton-automate

Then relaunch gemini and check /mcp for the kobiton server. The run-automation-suite skill is auto-discovered from skills/ at the extension root, no separate registration needed.

/mcp shows kobiton as Disconnected (OAuth not authenticated)

The extension is installed but you haven't completed OAuth yet. Trigger the flow manually:

/mcp auth kobiton

A browser window opens for Kobiton login. After signing in, run /mcp again — the status should change to 🟢 Connected.

Note: kobiton here is the MCP server name (declared inside the extension), not the extension name kobiton-automate. /mcp commands always take the server name.

OAuth doesn't open a browser on first tool call

Gemini CLI's extension uses dynamic OAuth discovery by default. The Kobiton MCP server advertises OAuth metadata at a standard well-known endpoint, so the browser flow should kick in automatically the first time a tool needs auth.

If nothing happens, try /mcp auth kobiton to trigger it explicitly. Check that your terminal can launch a browser. For headless environments, switch to API key auth by editing gemini-extension.json directly (see the API Key Authentication section above).

Codex CLI

Tools not appearing or "MCP server kobiton not initialized"

Verify each step:

  1. Plugin installed — open /plugins inside Codex and confirm automate is listed under the kobiton marketplace as Installed. If missing, run codex plugin marketplace add kobiton/automate and reinstall from the plugin browser.
  2. Codex version recent enough — update with npm install -g @openai/codex@latest.

After fixing, exit Codex and relaunch; the server should show in /mcp (or /mcp verbose).

Browser does not open for OAuth login

Codex tries to launch your system browser when Kobiton requires sign-in. If nothing opens, check:

  1. Default browser is set — your OS needs a default browser. SSH sessions without X forwarding cannot open one.
  2. Localhost ports not blocked — Codex listens on a local port to receive the login callback. Firewall rules that block all localhost ports will break the flow.
  3. Headless environment — switch to API key auth (see the API Key Authentication section above). Easiest: fork this repo, commit the env_http_headers change to .codex/.mcp.json, install from your fork.
OAuth login completes but /mcp still shows Disconnected

This usually means the cached token is stale and refresh failed. Force a re-login by clearing the OS keychain entry and reconnecting:

  • macOS: open Keychain Access, search for codex-mcp or kobiton, delete the entry, then trigger a tool call to re-run OAuth.
  • Linux: secret-tool clear service codex-mcp (or use Seahorse to remove the entry).
  • Windows: open Credential Manager, find the Codex entry under Generic Credentials, remove it.

After clearing, run any Kobiton tool prompt; the browser should reopen for fresh login.

Still Stuck?

For additional help, open an issue at github.com/kobiton/automate/issues or ask in #general-discussion on Discord. Feel free to share feature requests. We welcome product feedback and will consider it as we continue to improve the platform.

Privacy & Data

This plugin connects to the Kobiton cloud API (api.kobiton.com) over HTTPS (TLS 1.2+).

Authentication:

  • OAuth 2.1 (default): Your AI assistant opens a browser for Kobiton login. Short-lived access tokens are stored securely in the system keychain. No credentials are stored in the project.
  • API Key (alternative): The KOBITON_AUTH environment variable is sent via the Authorization header on each request. The value is stored only in your shell profile, never committed to the repo.

Data handling:

For details on how Kobiton handles your data, see the Kobiton Privacy Policy and Trust Center.

Development

The tools/ directory contains reference YAML schemas that mirror the MCP server's tool definitions. They are published to S3 for the backend but are not consumed by the plugin at runtime.

# Install dependencies
pnpm install

# Validate manifests and schemas
pnpm run validate

# Run tests
pnpm test

# Refresh the .codex/ mirror after editing skills/ or assets/
pnpm run build:codex

# Build combined tool definitions (for S3 publishing)
pnpm run build

License

MIT

About

AI coding assistant plugin for the Kobiton mobile testing platform. Works with Claude Code, Copilot CLI, Gemini CLI, and Codex CLI to manage devices, upload apps, run mobile automation, and view test results directly from your workspace.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors