fix(web-security): prefer caido-sdk-client over MCP when importable#84
Merged
GangGreenTemperTatum merged 2 commits intoJul 9, 2026
Conversation
The Caido MCP skill (caido-proxy) was the only documented Caido surface, so agents always routed through MCP even when the caido-sdk-client library was directly importable. Add a basic caido-sdk skill that steers agents to the direct SDK when available, with a runtime availability probe and an explicit fallback chain (direct import -> uv run --with -> caido-proxy MCP). - New skill skills/caido-sdk/SKILL.md - Cross-reference note in caido-proxy/SKILL.md pointing to the SDK path No SDK or MCP server code changed.
Remove repetition (fallback order stated twice, 'does not replace caido-proxy' stated three times, verbose Notes). Condense code example. 120 -> 85 lines, no loss of substance.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Agents (especially OSS models) always routed Caido interaction through the MCP server, even when the
caido-sdk-clientPython library was directly importable. Root cause is layered steering:skilltool instruction ("load any plausibly relevant skill first") makes models load thecaido-proxyskill the moment "caido" appears in a prompt.caido-proxy/SKILL.mddocuments only themcp__caido__*tools — no direct-SDK path.web-security.mdlists Caido under "MCP tools"; the only fallback it offers is curl-through-proxy, never the SDK.tools/caido_proxy.pyis a stub), so nothing authorizes a directimport caido_sdk_client.Result: a prompt like "use the caido python sdk..." still went to MCP.
Fix
Add a basic
caido-sdkskill that steers agents to the direct SDK when it is importable, with a runtime availability probe and an explicit fallback chain. No SDK or MCP server code changed.Fallback order encoded in the skill:
import caido_sdk_clientsucceeds → use SDK directly (one process, no per-call MCP round-trips)uvpresent →uv run --with caido-sdk-client(mirrors how the MCP provisions itself)caido-proxyMCP skillThis is deliberately conditional: the SDK is usually only installed inside the MCP's isolated
uvenv, not the agent runtime, so the skill probes before committing rather than assuming the import works.Changes
capabilities/web-security/skills/caido-sdk/SKILL.mdcapabilities/web-security/skills/caido-proxy/SKILL.md— cross-reference note pointing tocaido-sdkwhen the SDK is importableNotes
caido-sdk-client(the SDK) andcaido-server-auth(auth-only helper the SDK depends on). The skill documents that you normally interact only withcaido_sdk_client.capability.yaml.