Cline
Wire KYA into Cline (the VS Code extension) so tool calls it routes through MCP pass Shield’s evaluate first. Allow runs, Deny stops, Hold waits for a person.
Fastest path: llms-install.md at the repo root: global install, two absolute paths, one settings block, verify, with the keyless offline config. It is written so Cline can follow it; a run where Cline sets it up from that file alone has not been tested yet. node scripts/cline-install-check.mjs checks everything except Cline itself.
There is no kya connect cline. Cline’s config lives inside VS Code’s globalStorage, which is not safe to rewrite programmatically while VS Code is running. Copy the example by hand instead.
Setup
- Open the example:
cline/cline_mcp_settings.example.json. -
Merge its
mcpServers.shield-kyablock into Cline’s MCP settings file:OS Path macOS ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.jsonLinux ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.jsonWindows %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.jsonUsing VS Code Insiders, VSCodium, or a fork? The
Codepath segment changes (Code - Insiders,VSCodium, …); the rest is the same. - Save the file. Cline’s MCP hub watches
cline_mcp_settings.jsonand connects new servers on save, with no VS Code restart.
The example leaves "autoApprove": [] empty on purpose. Auto-approving MCP calls would skip exactly the human checkpoint KYA exists to provide.
What KYA reports
Each MCP tool call shows on the KYA receipt with its decision and a clipped, redacted change preview: kya receipt --open. Holds surface as pending approvals (kya dash) until a person decides.
Files written
You write one file by hand: the cline_mcp_settings.json for your VS Code variant above. KYA installs nothing else.
Verify
- In Cline’s MCP panel, confirm
shield-kyashows as connected with three tools:kya.policy_evaluate,kya.session_ingest,kya.request_approval. - Ask Cline to do something small that needs approval.
-
Offline smoke:
kya wrap --offline --tool-id Write --irreversible --args '{"path":"x.ts","content":"hi"}'Expect a
REQUIRE_APPROVErow in the record (trail) (--irreversiblewithout a policy never auto-allows).
Uninstall
Remove the shield-kya block from cline_mcp_settings.json and save. The watcher disconnects it. No VS Code restart.
Troubleshooting
- Server shows red / fails to start. The example uses
npx --no-install @shield-agent/kya@…. It needs the package already installed (npm i -g @shield-agent/kya) or on PATH.--no-installis deliberate: no silent registry fetch at editor startup. - Connected but no record rows. Check which tools Cline actually routes through MCP; native file edits may not go through the MCP path; see the honesty note.
- Edits after setup not picked up. Cline watches the settings file and connects on save. If a connection looks stuck, use the per-server restart button in the MCP tab.
- globalStorage path not found. The extension creates the directory on first run. Install Cline, open it once, then look again.
Honesty note
Cline’s MCP coverage is the weakest of the wired hosts: the extension decides per-tool whether a call goes through MCP, and autoApprove can bypass the human checkpoint entirely. Keep autoApprove empty, and treat anything Cline does outside MCP as ungated.
Wrap fallback
kya wrap --offline -- <any command>
If you script around the extension or drive it headlessly, wrap evaluates the command itself before it runs and leaves a record row, with no MCP required.