grape-kit plugin

Connect Grape pipelines into coding agents: installation, credentials, verification, takeover, and uninstallation.

@grape-dev/grape-kit is an MCP plugin for coding agents. It does not deploy the Grape service or replace the Worker; it connects Grape's Pipelines, events, Scenes, Skills, and takeover capabilities to the Agent you use every day.

coding agent (OpenCode / CodeArts / WorkBuddy / dsh / openclaw)
  → grape-kit (MCP stdio, native direct HTTP)
    → Grape server (Pipeline / events / Scenes / takeover API)
      → Worker + Engine executes the task

What problem it solves

  • You are writing code in a coding agent and do not want to switch to a browser to start a task
  • You want the Agent to query the current Issue, trigger a Pipeline, and wait for the task to finish
  • You want to take over the context of a cloud node (for example coding) in a local Agent and continue there
  • You want to connect Grape capabilities to multiple hosts as one unified MCP tool set

It is not a replacement for the Grape server and not a Worker. Grape services, Workers, models, and repository authorization still have to be configured on the Grape side.

Capabilities

Main capabilities in the current release:

Capability group What it does Representative tools
Pipeline remote control Trigger Pipelines, check task status, wait for tasks, cancel/resume grape_trigger_pipeline, grape_get_task_status, grape_wait_task
Issues and events Create Issues, view Issue details, view the event stream, view my Issues grape_create_issue, grape_get_issue_detail, grape_get_issue_events
Scenes and repositories List Scenes, apply Scenes, host/sync repositories, project templates grape_list_scenes, grape_apply_scene
Search and knowledge Global search, Skill list/search/details, Knowledge Base grape_search_skills, grape_list_knowledge
Cloud-local takeover Hand a cloud node over to a local Agent, then return it to the platform grape_takeover_start, grape_takeover_progress, grape_takeover_finish
Worker onboarding Register the current machine as a Grape execution engine grape_worker_onboard

The exact number of tools changes between versions; rely on --version, doctor, or the tool list in the host.

Installation steps

Step What to do Completion criteria
Step 1 Prepare Node.js, the host machine, the Grape address, and a user-level API Key Versions meet the requirements and the Key works
Step 2 Write the host configuration with install A grape-kit entry appears in the host configuration
Step 3 Configure credentials with auth init ~/.grape/config.json has been generated
Step 4 Restart the host and run doctor Authentication, address, and tool checks pass
Step 5 Start one minimal task in the host Pipeline or Issue status can be retrieved

Step 1: Prepare prerequisites

Item Requirement
Grape server An accessible Grape deployment; obtain the GRAPE_BASE_URL that a browser can reach
User-level API Key grape_ prefix; do not use a session token
Node.js ≥ 20
Host OpenCode / CodeArts / WorkBuddy / dsh / openclaw, or another host that supports MCP stdio
Network The host machine can reach GRAPE_BASE_URL
Permission The installing user matches the host runtime user; the installer must be able to write the host configuration directory

Supported hosts

Host target Install location / notes
OpenCode opencode Writes the mcp.grape entry in opencode.jsonc and installs the Skills
CodeArts codearts Writes ~/.codeartsdoer/codearts_cli.jsonc (<project>/.codeartsdoer/codearts_cli.jsonc at project level); after installation, select Restart under Settings → MCP tools → Installed → grape-kit
WorkBuddy workbuddy Writes mcpServers.grape-kit in ~/.workbuddy/mcp.json; Skills go to ~/.workbuddy/skills/grape-remote/
dsh (DeepSeek Harness) dsh Writes a marked MCP managed block to $DSH_HOME/profiles/web/cordis.patch.yml ($DSH_HOME defaults to ~/.dsh); Skills go to $DSH_HOME/skills/
openclaw no --target Install through ClawHub: openclaw plugins install clawhub:grape-kit@latest

Two dsh integrations: grape-kit install --target dsh uses the minimal MCP path and reuses the same tool set; the full native Cordis plugin is provided by the dsh plugin. The two can coexist.

Step 2: Install the plugin

Automatic host detection

Without --target, the installer detects the hosts on the machine:

  • One detected: install directly
  • Several detected: install to all hosts (equivalent to --target all)
  • None detected: an interactive terminal shows a selection menu; a non-interactive environment reports an error and lists the available targets
npx -y @grape-dev/grape-kit install

Specify a host

# OpenCode
npx -y @grape-dev/grape-kit install --target opencode

# CodeArts
npx -y @grape-dev/grape-kit install --target codearts

# WorkBuddy
npx -y @grape-dev/grape-kit install --target workbuddy

# dsh: minimal MCP path
npx -y @grape-dev/grape-kit install --target dsh

# All supported hosts
npx -y @grape-dev/grape-kit install --target all

The installer backs up existing configuration, and repeated runs are idempotent. After installation, restart the corresponding host session so the MCP configuration takes effect.

Step 3: Configure credentials

Credentials have a single entry point, and the resolution order is fixed:

  1. GRAPE_API_TOKEN_ONCE: applies only to the current process, highest priority
  2. GRAPE_API_TOKEN / GRAPE_BASE_URL: environment variable channel
  3. GRAPE_AUTH_FILE or ~/.grape/config.json: file channel (GRAPE_HOME changes the directory)

Use auth init to write the file channel; it saves automatically with 600 permissions:

npx -y @grape-dev/grape-kit auth init \
  --token grape_xxx \
  --base-url https://<your-grape-domain>

npx -y @grape-dev/grape-kit doctor

You can also use environment variables:

export GRAPE_BASE_URL="https://<your-grape-domain>"
export GRAPE_API_TOKEN="grape_xxx"

⚠️ Do not write the token into the host's MCP configuration. The host configuration keeps only the grape-kit entry; grape-kit reads credentials from environment variables or ~/.grape/config.json.

Step 4: Restart and verify

After installing or updating credentials, restart the corresponding host session so the MCP configuration takes effect, then verify.

Run doctor first:

npx -y @grape-dev/grape-kit doctor --target <host> --probe

It checks:

  • Node.js version
  • whether GRAPE_BASE_URL is reachable
  • whether the token passes server authentication
  • whether the host configuration was written correctly
  • whether the grape-kit tools of the current version are complete

Then view the capability map:

npx -y @grape-dev/grape-kit intro

Step 5: Start one task in the host

Start a minimal task in the host in natural language, for example:

Which of my Issues are running in a pipeline?
Check the status of acme/demo issue #12.

If it returns real Pipeline or Issue status, installation, credentials, and host integration are all working.

Cloud-local takeover

A key capability of grape-kit is handing over node work in a cloud environment to a local Agent.

Basic flow:

grape_takeover_start
  → the platform issues a tko_ credential (12 hours by default)
  → returns prompt / env / workspace / skill / history
  → the local Agent continues the work

grape_takeover_progress
  → reports progress

grape_takeover_finish (request_only=true)
  → reports completion only, and waits for you to confirm in the conversation

grape_takeover_finish (request_only=false)
  → hands back formally; requires a user-level grape_ credential

grape_takeover_abort
  → returns the node to the cloud for a rerun

Keep three boundaries in mind:

  • tko_ carries repo_session + review_decide (it can submit review-pass / review-reject) but does not include git credential injection, so it cannot push directly
  • request-finish works with tko_; the final finish requires a user-level grape_ credential, and calling finish with tko_ returns 403
  • The platform has no UI confirmation button; confirmation happens in your conversation with the Agent. If the server does not support takeover, it falls back to read-only context

Update and uninstall

npx -y @grape-dev/grape-kit --version
npm install -g @grape-dev/grape-kit          # Update; restart the host after updating
npx -y @grape-dev/grape-kit uninstall --target <host>

Uninstalling only the host entry does not delete global credentials. To clean up ~/.grape, user-level environment variables, and caches:

npx -y @grape-dev/grape-kit uninstall --clean-global --dry-run   # Preview first
npx -y @grape-dev/grape-kit uninstall --clean-global

--dry-run only lists the items that will be deleted; it does not modify the disk.

Common failures

Symptom Cause Action
doctor returns 401 The token is not a user-level grape_ Key, or it has expired Regenerate a user-level API Key in the Grape personal settings
doctor reports the server is unreachable GRAPE_BASE_URL is an internal address, or the host environment has a proxy Change it to an address the host can reach; check the proxy environment variables
The host does not see grape-kit The host was not restarted after installation, or the target is wrong Restart the host session; verify --target
The Node version does not meet the requirement Node < 20 Upgrade Node and reinstall
The CodeArts configuration is written but the tools do not appear Only the file was written; Restart was not selected on the MCP tools page Settings → MCP tools → Installed → grape-kit → Restart
The dsh managed block is corrupted The patch file was edited by hand Run install --target dsh again; the installer backs up first
Takeover finish returns 403 A tko_ credential was used for the final handover Switch to a user-level grape_ credential and finish again

Windows notes

  • PowerShell may decode as GBK; run chcp 65001 first or set UTF-8 output
  • ~/.grape/config.json must not contain a UTF-8 BOM, or JSON parsing fails
  • setx GRAPE_API_TOKEN ... applies only to new processes; restart the host session after setting it

Relationship to the dsh plugin

Item grape-kit dsh native plugin
Applies to Multiple coding agent hosts, including the dsh MCP path DeepSeek Harness
Form MCP stdio + Skills dsh native Cordis plugin
Installation install --target dsh Install per the dsh plugin

The two do not conflict and can coexist; do not mix their tokens or configuration files.

Installation and startup | dsh plugin | Runtime and Worker | A2A collaboration API