Skip to content

fix(web-security): prefer caido-sdk-client over MCP when importable#84

Merged
GangGreenTemperTatum merged 2 commits into
mainfrom
ads/cap-1144-fix-web-security-capability-on-steering-with-caido-mcp-vs
Jul 9, 2026
Merged

fix(web-security): prefer caido-sdk-client over MCP when importable#84
GangGreenTemperTatum merged 2 commits into
mainfrom
ads/cap-1144-fix-web-security-capability-on-steering-with-caido-mcp-vs

Conversation

@GangGreenTemperTatum

Copy link
Copy Markdown
Contributor

Problem

Agents (especially OSS models) always routed Caido interaction through the MCP server, even when the caido-sdk-client Python library was directly importable. Root cause is layered steering:

  • The runtime-injected skill tool instruction ("load any plausibly relevant skill first") makes models load the caido-proxy skill the moment "caido" appears in a prompt.
  • caido-proxy/SKILL.md documents only the mcp__caido__* tools — no direct-SDK path.
  • web-security.md lists Caido under "MCP tools"; the only fallback it offers is curl-through-proxy, never the SDK.
  • The SDK exists but is treated as an implementation detail of the MCP server (tools/caido_proxy.py is a stub), so nothing authorizes a direct import caido_sdk_client.

Result: a prompt like "use the caido python sdk..." still went to MCP.

Fix

Add a basic caido-sdk skill 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:

  1. import caido_sdk_client succeeds → use SDK directly (one process, no per-call MCP round-trips)
  2. import fails but uv present → uv run --with caido-sdk-client (mirrors how the MCP provisions itself)
  3. neither works / Caido unreachable → fall back to the caido-proxy MCP skill

This is deliberately conditional: the SDK is usually only installed inside the MCP's isolated uv env, not the agent runtime, so the skill probes before committing rather than assuming the import works.

Changes

  • New: capabilities/web-security/skills/caido-sdk/SKILL.md
  • Edit: capabilities/web-security/skills/caido-proxy/SKILL.md — cross-reference note pointing to caido-sdk when the SDK is importable

Notes

  • Two Caido Python packages exist: caido-sdk-client (the SDK) and caido-server-auth (auth-only helper the SDK depends on). The skill documents that you normally interact only with caido_sdk_client.
  • No changes to the SDK, MCP servers, or capability.yaml.

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.
@GangGreenTemperTatum GangGreenTemperTatum merged commit 573e57f into main Jul 9, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant