Amp
Wire KYA into Amp so tool calls the agent routes through Shield’s MCP gate pass Shield’s evaluate first and are recorded. Amp’s built-in tools do not go through the gate and are not evaluated or recorded. Allow runs, Deny stops, Hold waits for a person.
Setup
kya connect amp
That writes a shield-kya entry into ~/.config/amp/settings.json, under amp.mcpServers, not the usual bare mcpServers. Amp prefixes its MCP root key; connect knows that and won’t create a second, ignored mcpServers block.
Amp has no project-scope config in the registry, so kya connect amp --project exits with a usage error. Global scope is the only option today.
No restart: Amp applies settings.json changes live.
Prefer editing by hand? Copy amp/settings.example.json into place and merge the amp.mcpServers section yourself.
What KYA reports
Each tool call Amp routes through Shield’s MCP gate lands on the receipt: tool id, decision (Allow / Deny / Hold), timestamp, and a clipped, redacted preview of what would change. Open it with kya receipt --open.
Files written
| Scope | Path |
|---|---|
| Global | ~/.config/amp/settings.json |
Connect merges. Your other Amp settings stay as they were. If the existing file doesn’t parse as JSON, connect stops and tells you. It never overwrites a config it cannot read.
Verify
- Ask Amp to list its MCP tools.
shield-kyashows up live, no restart. - Confirm
kya.policy_evaluate,kya.session_ingest,kya.request_approvalare listed. -
Offline smoke, no cloud needed:
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
Edit ~/.config/amp/settings.json and delete the shield-kya entry under amp.mcpServers. Nothing else is installed: no daemon, no background process. (kya connect amp --force rewires the entry if you only want to refresh it.)
Troubleshooting
- Server not listed in Amp. Check the entry landed under
amp.mcpServers. A hand-addedmcpServersblock is ignored by Amp. Workspace-scoped entries need one approval:amp mcp approve shield-kya. command not founderrors. Connect wiresnode …/cli.js serve-mcp --stdiofrom the install you ran it from. If you connected via a tempnpxcache and later cleared it, rerunkya connect amp --forcefrom a real install (npm i -g @shield-agent/kya).--projectfails. Expected: Amp has no project-scope config wired. Use the global file.- Decisions need a key. The wired env sets
KYA_OFFLINE=1, so the server starts keyless and sample-evaluates. Against an authenticated control plane, setKYA_API_KEYin the entry’senvblock.
Honesty note
Amp decides which tools go through MCP. KYA gates the ones that do. A tool Amp executes outside MCP is outside the gate. Do not treat this setup as full coverage of the agent.
Wrap fallback
Works with or without MCP:
kya wrap --offline -- amp "explain this stack trace"
Wrap evaluates the command itself before it runs and records a row in the record. Use it for hosts, shells, or scripts that never speak MCP.