{
  "schema": "keryn.dev/mcp-server/v1",
  "name": "io.github.getkeryn/mcp",
  "package": "@keryn/mcp",
  "version": "0.2.0",
  "protocolVersions": [
    "2025-06-18",
    "2025-03-26",
    "2024-11-05"
  ],
  "transports": [
    "stdio",
    "streamable-http"
  ],
  "remote": "https://api.keryn.app/mcp",
  "environment": [
    {
      "name": "KERYN_API_KEY",
      "description": "Keryn Cloud organization API key for the keryn_cloud_* tools. Without it only the local tools work.",
      "isRequired": false,
      "isSecret": true
    },
    {
      "name": "KERYN_ORGANIZATION",
      "description": "Pin calls to this organization id; they fail if the credential belongs to another.",
      "isRequired": false
    },
    {
      "name": "KERYN_BIN",
      "description": "Path to the keryn CLI the local tools run (default: keryn on PATH). Download it from https://keryn.app/download after signing in, then run keryn login.",
      "isRequired": false
    }
  ],
  "tools": [
    {
      "name": "keryn_scan",
      "title": "Scan a folder for AI security findings",
      "description": "Scan a folder or file on this machine with Keryn: finds the AI models, SDKs, agents, prompts, tools and MCP servers it uses and where they are exposed, with the proof level of each finding. Runs offline. Returns the exit code, counts, coverage and the most severe findings; pass a ruleId to keryn_explain_rule.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "description": "Folder or file to scan.",
            "minLength": 1
          },
          "failOn": {
            "type": "string",
            "description": "Lowest severity that makes the exit code 1.",
            "enum": [
              "error",
              "warning",
              "info",
              "none"
            ],
            "default": "error"
          },
          "deep": {
            "type": "boolean",
            "description": "Also run the Deep pass (interprocedural analysis). Slower; finds chains across files.",
            "default": true
          },
          "maxFindings": {
            "type": "integer",
            "description": "Most findings to return.",
            "minimum": 1,
            "maximum": 200,
            "default": 25
          }
        },
        "required": [
          "path"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "assessment": {
            "type": "object",
            "description": "Recorded canonical cases, decision reasons and accounting from keryn.dev/assessment/v1. Case counts are separate from raw findings.",
            "additionalProperties": true
          },
          "exitCode": {
            "type": "integer",
            "description": "Keryn exit code: 0 pass, 1 findings, 3 incomplete coverage, 10 warnings."
          },
          "counts": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer",
                "description": "All findings."
              },
              "error": {
                "type": "integer",
                "description": "ERROR findings."
              },
              "warning": {
                "type": "integer",
                "description": "WARNING findings."
              },
              "info": {
                "type": "integer",
                "description": "INFO findings."
              },
              "gating": {
                "type": "integer",
                "description": "Findings that count toward the exit code."
              }
            },
            "required": [
              "total",
              "error",
              "warning",
              "info",
              "gating"
            ]
          },
          "coverage": {
            "type": "object",
            "properties": {
              "complete": {
                "type": "boolean",
                "description": "false when a rule was unsupported, partial or timed out (exit 3)."
              },
              "rulesRequested": {
                "type": "integer",
                "description": "Rules asked for."
              },
              "rulesExecuted": {
                "type": "integer",
                "description": "Rules that ran."
              },
              "filesScanned": {
                "type": "integer",
                "description": "Files read."
              }
            },
            "required": [
              "complete",
              "rulesRequested",
              "rulesExecuted",
              "filesScanned"
            ]
          },
          "findings": {
            "type": "array",
            "description": "Most severe first, up to maxFindings.",
            "items": {
              "type": "object",
              "properties": {
                "ruleId": {
                  "type": "string",
                  "description": "Rule id; pass it to keryn_explain_rule."
                },
                "severity": {
                  "type": "string",
                  "description": "ERROR, WARNING or INFO.",
                  "enum": [
                    "ERROR",
                    "WARNING",
                    "INFO"
                  ]
                },
                "path": {
                  "type": "string",
                  "description": "Repository-relative file."
                },
                "line": {
                  "type": "integer",
                  "description": "1-based line.",
                  "minimum": 0
                },
                "message": {
                  "type": "string",
                  "description": "What the rule says."
                },
                "fingerprint": {
                  "type": "string",
                  "description": "Stable id of this finding."
                },
                "gating": {
                  "type": "boolean",
                  "description": "false when the finding does not count toward the exit code."
                }
              },
              "required": [
                "ruleId",
                "severity",
                "path",
                "line",
                "message"
              ]
            }
          },
          "truncated": {
            "type": "boolean",
            "description": "true when more findings exist than were returned."
          }
        },
        "required": [
          "exitCode",
          "counts",
          "coverage",
          "findings",
          "truncated"
        ]
      },
      "annotations": {
        "title": "Scan a folder for AI security findings",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "_meta": {
        "dev.keryn/examples": [
          {
            "description": "Scan the current project.",
            "arguments": {
              "path": "."
            },
            "result": {
              "exitCode": 0,
              "assessment": {
                "schema": "keryn.dev/assessment/v1",
                "headline": "Keryn — Checks passed (Go); dependency advisories not checked (offline)",
                "states": {
                  "analysis": "complete",
                  "policy": "checks passed",
                  "approval": "not recorded",
                  "dependencyAdvisories": "not checked (offline)"
                },
                "comparison": "not compared: no finding baseline supplied",
                "revision": {
                  "base": "not recorded",
                  "analyzed": "cc6605deb2cf071432b8a0f60d6ec087b9bf0c85"
                },
                "metrics": {
                  "contract": 1,
                  "comparison": {
                    "contract": 1,
                    "base": null,
                    "analyzed": {
                      "revision": "cc6605deb2cf071432b8a0f60d6ec087b9bf0c85",
                      "library": "0.8.0",
                      "engine": "keryn-engine/0.1.1 (tree-sitter-wasm, semgrep-compatible subset)",
                      "complete": true
                    },
                    "validity": "no-baseline",
                    "reasons": [
                      "no baseline was supplied"
                    ],
                    "cases": null
                  },
                  "coverage": [
                    {
                      "capability": "pattern-rules",
                      "unit": "rule",
                      "planned": 1598,
                      "completed": 1598,
                      "unsupported": 0,
                      "excluded": 0,
                      "unknown": 0,
                      "ratio": 1,
                      "state": "complete"
                    },
                    {
                      "capability": "files",
                      "unit": "file",
                      "planned": 3,
                      "completed": 2,
                      "unsupported": 0,
                      "excluded": 0,
                      "unknown": 0,
                      "ratio": 0.6666666666666666,
                      "state": "partial"
                    },
                    {
                      "capability": "cross-file",
                      "unit": "flow-dependent pattern finding",
                      "planned": 0,
                      "completed": 0,
                      "unsupported": 0,
                      "excluded": 0,
                      "unknown": 0,
                      "ratio": null,
                      "state": "complete"
                    },
                    {
                      "capability": "known-fix",
                      "unit": "file",
                      "planned": 0,
                      "completed": 0,
                      "unsupported": 0,
                      "excluded": 0,
                      "unknown": 0,
                      "ratio": null,
                      "state": "not-run"
                    }
                  ]
                },
                "reasons": [
                  "dependency advisories not checked (offline): 1 lockfile(s); keryn scan --online checks them"
                ],
                "failureReason": null,
                "counts": {
                  "current": 2,
                  "new": 0,
                  "existing": 0,
                  "unclassified": 2,
                  "clearedPrevious": null,
                  "newlyBlocking": null,
                  "displayed": 2,
                  "omitted": {
                    "displayLimit": 0
                  },
                  "recordedRuleHits": 4,
                  "contributingRules": 2,
                  "nonCaseObservations": 2,
                  "suppressedRuleHits": 0,
                  "failedChecks": 0
                },
                "cases": [
                  {
                    "id": "sha256:664e1222c2ca2a2a5935615bc6e362cfcb9bd366dbc7d3f82a5851b7e6faec35",
                    "title": "OpenAI Codex and ChatGPT: configuration. This shows the tool is set up in this repository; it does not show which code the tool wrote.",
                    "path": ".codex/config.toml",
                    "line": 1,
                    "evidence": "inventory",
                    "rules": [
                      "ai-attribution:file/codex/config"
                    ],
                    "blocking": false,
                    "change": "unclassified",
                    "newlyBlocking": null
                  },
                  {
                    "id": "sha256:4ae95b11a596cca6ead669ba6688f5ab448d205dd0e9a06361ad7a1717a8cc16",
                    "title": "Codex CLI is configured with sandbox_mode = \"danger-full-access\": the model's commands run with the user's full filesystem and network. Combined with a permissive approval policy, one injected instruction can read keys, modify any repository and exfiltrate over the network. Use \"workspace-write\" (or \"read-only\") and widen it per task when needed.",
                    "path": ".codex/config.toml",
                    "line": 3,
                    "evidence": "pattern",
                    "rules": [
                      "keryn.agentclient.codex-sandbox-full-access"
                    ],
                    "blocking": false,
                    "change": "unclassified",
                    "newlyBlocking": null
                  }
                ],
                "acceptedRisks": [],
                "exceptions": {
                  "known": false,
                  "expiredEntries": 0
                },
                "limitations": [
                  "Newly blocking needs a base run (--base); without one it is unknown.",
                  "Cases follow core fingerprint deduplication; co-located rules without shared identity stay separate.",
                  "Recorded rule hits exclude hits removed by core deduplication."
                ]
              },
              "counts": {
                "total": 4,
                "error": 0,
                "warning": 1,
                "info": 3,
                "gating": 2
              },
              "coverage": {
                "complete": true,
                "rulesRequested": 1598,
                "rulesExecuted": 1598,
                "filesScanned": 2
              },
              "findings": [
                {
                  "ruleId": "keryn.agentclient.codex-sandbox-full-access",
                  "severity": "WARNING",
                  "path": ".codex/config.toml",
                  "line": 3,
                  "message": "Codex CLI is configured with sandbox_mode = \"danger-full-access\": the model's commands run with the user's full filesystem and network. Combined with a permissive approval policy, one injected instruction can read keys, modify any repository and exfiltrate over the network. Use \"workspace-write\" (or",
                  "fingerprint": "sha256:4ae95b11a596cca6ead669ba6688f5ab448d205dd0e9a06361ad7a1717a8cc16"
                },
                {
                  "ruleId": "ai-attribution:file/codex/config",
                  "severity": "INFO",
                  "path": ".codex/config.toml",
                  "line": 1,
                  "message": "OpenAI Codex and ChatGPT: configuration. This shows the tool is set up in this repository; it does not show which code the tool wrote.",
                  "fingerprint": "sha256:664e1222c2ca2a2a5935615bc6e362cfcb9bd366dbc7d3f82a5851b7e6faec35"
                },
                {
                  "ruleId": "keryn.inv.lib.openai",
                  "severity": "INFO",
                  "path": "package.json",
                  "line": 1,
                  "message": "References the OpenAI SDK.",
                  "fingerprint": "sha256:8ab69397401652276adcb79b338794f8109e1dabf2f47b15a1fd1b2934219fb5",
                  "gating": false
                },
                {
                  "ruleId": "keryn.inv.lib.langchain",
                  "severity": "INFO",
                  "path": "package.json",
                  "line": 1,
                  "message": "References LangChain.",
                  "fingerprint": "sha256:9efd99b86d2b9aa83ac350dbec08a391f0cda0d3feb24b22eb5f30d949312233",
                  "gating": false
                }
              ],
              "truncated": false
            }
          }
        ],
        "dev.keryn/runs": "local"
      },
      "runs": "local"
    },
    {
      "name": "keryn_ai_bom",
      "title": "List the AI components of a folder (AI-BOM)",
      "description": "Inventory the AI components of a folder or file on this machine as a CycloneDX 1.6 AI bill of materials: models, providers, SDKs, agents, tools, MCP servers. Faster than keryn_scan and returns components, not findings. Runs offline.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "description": "Folder or file to inventory.",
            "minLength": 1
          },
          "maxComponents": {
            "type": "integer",
            "description": "Most components to return.",
            "minimum": 1,
            "maximum": 500,
            "default": 100
          }
        },
        "required": [
          "path"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "specVersion": {
            "type": "string",
            "description": "CycloneDX version, 1.6."
          },
          "componentCount": {
            "type": "integer",
            "description": "All components found."
          },
          "components": {
            "type": "array",
            "description": "Up to maxComponents.",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "description": "CycloneDX component type."
                },
                "name": {
                  "type": "string",
                  "description": "Component name."
                },
                "version": {
                  "type": "string",
                  "description": "Version when known."
                }
              },
              "required": [
                "type",
                "name"
              ]
            }
          },
          "truncated": {
            "type": "boolean",
            "description": "true when more components exist than were returned."
          }
        },
        "required": [
          "specVersion",
          "componentCount",
          "components",
          "truncated"
        ]
      },
      "annotations": {
        "title": "List the AI components of a folder (AI-BOM)",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "_meta": {
        "dev.keryn/examples": [
          {
            "description": "Which AI libraries does this repo use?",
            "arguments": {
              "path": "."
            },
            "result": {
              "specVersion": "1.6",
              "componentCount": 2,
              "components": [
                {
                  "type": "library",
                  "name": "langchain"
                },
                {
                  "type": "library",
                  "name": "openai"
                }
              ],
              "truncated": false
            }
          }
        ],
        "dev.keryn/runs": "local"
      },
      "runs": "local"
    },
    {
      "name": "keryn_explain_rule",
      "title": "Explain a Keryn rule",
      "description": "Explain one Keryn rule from its id: what it reports, severity, confidence, false-positive risk, the trust edge it sits on, CWE and OWASP mappings, remediation and references. Offline; reads the rules bundled with the CLI.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "ruleId": {
            "type": "string",
            "description": "Rule id, for example keryn.agentclient.codex-sandbox-full-access.",
            "minLength": 3,
            "pattern": "^[A-Za-z0-9_.-]+$"
          }
        },
        "required": [
          "ruleId"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Rule id."
          },
          "severity": {
            "type": "string",
            "description": "ERROR, WARNING or INFO."
          },
          "message": {
            "type": "string",
            "description": "What the rule reports."
          },
          "confidence": {
            "type": "string",
            "description": "P0 to P3."
          },
          "edge": {
            "type": "string",
            "description": "The trust edge: reaches, calls, reads, writes, sends, grants, depends_on, trusts or none."
          },
          "details": {
            "type": "object",
            "description": "Everything else the CLI prints: taxa, remediation, references.",
            "additionalProperties": true
          }
        },
        "required": [
          "id",
          "severity",
          "message",
          "details"
        ]
      },
      "annotations": {
        "title": "Explain a Keryn rule",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "_meta": {
        "dev.keryn/examples": [
          {
            "description": "Why was this flagged?",
            "arguments": {
              "ruleId": "keryn.agentclient.codex-sandbox-full-access"
            },
            "result": {
              "id": "keryn.agentclient.codex-sandbox-full-access",
              "severity": "WARNING",
              "message": "Codex CLI is configured with sandbox_mode = \"danger-full-access\": the model's commands run with the user's full filesystem and network. Combined with a permissive approval policy, one injected instruction can read keys, modify any repository and exfiltrate over the network. Use \"workspace-write\" (or \"read-only\") and widen it per task when needed.",
              "confidence": "P1",
              "edge": "grants",
              "details": {
                "id": "keryn.agentclient.codex-sandbox-full-access",
                "severity": "WARNING",
                "message": "Codex CLI is configured with sandbox_mode = \"danger-full-access\": the model's commands run with the user's full filesystem and network. Combined with a permissive approval policy, one injected instruction can read keys, modify any repository and exfiltrate over the network. Use \"workspace-write\" (or \"read-only\") and widen it per task when needed.",
                "languages": [
                  "generic"
                ],
                "subcategory": "vuln",
                "confidence": "P1",
                "falsePositiveRisk": "low",
                "edge": "grants",
                "taxa": [
                  {
                    "taxonomy": "owasp_llm",
                    "id": "LLM06",
                    "name": "Excessive Agency"
                  },
                  {
                    "taxonomy": "owasp_agentic",
                    "id": "ASI05",
                    "name": "Unexpected Code Execution"
                  },
                  {
                    "taxonomy": "owasp_agentic",
                    "id": "ASI02",
                    "name": "Tool Misuse and Exploitation"
                  },
                  {
                    "taxonomy": "cwe",
                    "id": "CWE-250"
                  }
                ],
                "technology": [
                  "codex-cli"
                ],
                "remediation": "Set sandbox_mode = \"workspace-write\" and keep network access off inside the sandbox unless the task needs it; run full-access sessions only inside a container that holds no credentials.",
                "references": [
                  "https://github.com/openai/codex/blob/main/docs/config.md",
                  "https://raw.githubusercontent.com/openai/codex-action/main/action.yml"
                ]
              }
            }
          }
        ],
        "dev.keryn/runs": "local"
      },
      "runs": "local"
    },
    {
      "name": "keryn_mcp_inventory",
      "title": "Judge an MCP server's tools for risk",
      "description": "Judge the tools of an MCP server from a saved tools/list response: permissions, side effects, risk score and a poisoning screen over names and descriptions (hidden text, instructions to read secrets, cross-tool shadowing). The server is never contacted. Set example to judge Keryn's deliberately flawed demo server.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "toolsList": {
            "type": "object",
            "description": "A tools/list response ({tools: [...]}) or an array of tool definitions.",
            "additionalProperties": true
          },
          "example": {
            "type": "boolean",
            "description": "Judge the Keryn demo MCP server's tool list instead.",
            "default": false
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "assessment": {
            "type": "object",
            "description": "Recorded canonical cases, decision reasons and accounting from keryn.dev/assessment/v1. Case counts are separate from raw findings.",
            "additionalProperties": true
          },
          "exitCode": {
            "type": "integer",
            "description": "Keryn exit code: 0 pass, 1 findings, 3 incomplete coverage, 10 warnings."
          },
          "counts": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer",
                "description": "All findings."
              },
              "error": {
                "type": "integer",
                "description": "ERROR findings."
              },
              "warning": {
                "type": "integer",
                "description": "WARNING findings."
              },
              "info": {
                "type": "integer",
                "description": "INFO findings."
              },
              "gating": {
                "type": "integer",
                "description": "Findings that count toward the exit code."
              }
            },
            "required": [
              "total",
              "error",
              "warning",
              "info",
              "gating"
            ]
          },
          "coverage": {
            "type": "object",
            "properties": {
              "complete": {
                "type": "boolean",
                "description": "false when a rule was unsupported, partial or timed out (exit 3)."
              },
              "rulesRequested": {
                "type": "integer",
                "description": "Rules asked for."
              },
              "rulesExecuted": {
                "type": "integer",
                "description": "Rules that ran."
              },
              "filesScanned": {
                "type": "integer",
                "description": "Files read."
              }
            },
            "required": [
              "complete",
              "rulesRequested",
              "rulesExecuted",
              "filesScanned"
            ]
          },
          "findings": {
            "type": "array",
            "description": "Most severe first, up to maxFindings.",
            "items": {
              "type": "object",
              "properties": {
                "ruleId": {
                  "type": "string",
                  "description": "Rule id; pass it to keryn_explain_rule."
                },
                "severity": {
                  "type": "string",
                  "description": "ERROR, WARNING or INFO.",
                  "enum": [
                    "ERROR",
                    "WARNING",
                    "INFO"
                  ]
                },
                "path": {
                  "type": "string",
                  "description": "Repository-relative file."
                },
                "line": {
                  "type": "integer",
                  "description": "1-based line.",
                  "minimum": 0
                },
                "message": {
                  "type": "string",
                  "description": "What the rule says."
                },
                "fingerprint": {
                  "type": "string",
                  "description": "Stable id of this finding."
                },
                "gating": {
                  "type": "boolean",
                  "description": "false when the finding does not count toward the exit code."
                }
              },
              "required": [
                "ruleId",
                "severity",
                "path",
                "line",
                "message"
              ]
            }
          },
          "truncated": {
            "type": "boolean",
            "description": "true when more findings exist than were returned."
          }
        },
        "required": [
          "exitCode",
          "counts",
          "coverage",
          "findings",
          "truncated"
        ]
      },
      "annotations": {
        "title": "Judge an MCP server's tools for risk",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "_meta": {
        "dev.keryn/examples": [
          {
            "description": "Try it on the demo server.",
            "arguments": {
              "example": true
            },
            "result": {
              "exitCode": 1,
              "assessment": {
                "schema": "keryn.dev/assessment/v1",
                "headline": "Keryn — Policy blocked (Hold)",
                "states": {
                  "analysis": "complete",
                  "policy": "blocked",
                  "approval": "not recorded",
                  "dependencyAdvisories": "not applicable"
                },
                "comparison": "not compared: no finding baseline supplied",
                "revision": {
                  "base": "not recorded",
                  "analyzed": "tools-list"
                },
                "metrics": {
                  "contract": 1,
                  "comparison": {
                    "contract": 1,
                    "base": null,
                    "analyzed": {
                      "revision": "tools-list",
                      "engine": "mcp-tool-introspector/0.1.0",
                      "complete": true
                    },
                    "validity": "no-baseline",
                    "reasons": [
                      "no baseline was supplied"
                    ],
                    "cases": null
                  },
                  "coverage": [
                    {
                      "capability": "pattern-rules",
                      "unit": "rule",
                      "planned": 0,
                      "completed": 0,
                      "unsupported": 0,
                      "excluded": 0,
                      "unknown": 0,
                      "ratio": null,
                      "state": "complete"
                    },
                    {
                      "capability": "files",
                      "unit": "file",
                      "planned": 1,
                      "completed": 1,
                      "unsupported": 0,
                      "excluded": 0,
                      "unknown": 0,
                      "ratio": 1,
                      "state": "complete"
                    },
                    {
                      "capability": "cross-file",
                      "unit": "flow-dependent pattern finding",
                      "planned": 0,
                      "completed": 0,
                      "unsupported": 0,
                      "excluded": 0,
                      "unknown": 0,
                      "ratio": null,
                      "state": "not-run"
                    },
                    {
                      "capability": "known-fix",
                      "unit": "file",
                      "planned": 0,
                      "completed": 0,
                      "unsupported": 0,
                      "excluded": 0,
                      "unknown": 0,
                      "ratio": null,
                      "state": "not-run"
                    }
                  ]
                },
                "reasons": [
                  "4 violation(s)/finding(s) at or above 'error'"
                ],
                "failureReason": "policy_blocked",
                "counts": {
                  "current": 7,
                  "new": 0,
                  "existing": 0,
                  "unclassified": 7,
                  "clearedPrevious": null,
                  "newlyBlocking": null,
                  "displayed": 7,
                  "omitted": {
                    "displayLimit": 0
                  },
                  "recordedRuleHits": 7,
                  "contributingRules": 7,
                  "nonCaseObservations": 0,
                  "suppressedRuleHits": 0,
                  "failedChecks": 4
                },
                "cases": [
                  {
                    "id": "case:29f5caf38384ef2c",
                    "title": "tool summarize_page: tool text tells the model to read secrets or key files (/description): read ~/.ssh/",
                    "path": "keryn-demo-mcp",
                    "line": 1,
                    "evidence": "pattern (flow not established)",
                    "rules": [
                      "mcp:tool-poisoning:secret-read"
                    ],
                    "blocking": true,
                    "change": "unclassified",
                    "newlyBlocking": null
                  },
                  {
                    "id": "case:e0d28472267905d2",
                    "title": "High-risk tool permission surface: run_shell: A model-exposed tool can read sensitive data, write external state, access broad resources, or lacks clear confirmation boundaries.",
                    "path": "keryn-demo-mcp",
                    "line": 1,
                    "evidence": "pattern (flow not established)",
                    "rules": [
                      "mcp:tool-permission-scorer:high-risk-tool-permission-surface-run-shell"
                    ],
                    "blocking": true,
                    "change": "unclassified",
                    "newlyBlocking": null
                  },
                  {
                    "id": "case:e3fc5de6ddb9a34d",
                    "title": "High-risk MCP capability: run_shell: An MCP-exposed tool has broad or sensitive capability that should be constrained before agent use.",
                    "path": "keryn-demo-mcp",
                    "line": 1,
                    "evidence": "pattern (flow not established)",
                    "rules": [
                      "mcp:mcp-tool-introspector:high-risk-mcp-capability-run-shell"
                    ],
                    "blocking": true,
                    "change": "unclassified",
                    "newlyBlocking": null
                  },
                  {
                    "id": "case:f2bb09378cadd4fe",
                    "title": "tool summarize_page: tool text tells the model to hide something from the user (/description): <IMPORTANT>",
                    "path": "keryn-demo-mcp",
                    "line": 1,
                    "evidence": "pattern (flow not established)",
                    "rules": [
                      "mcp:tool-poisoning:concealment"
                    ],
                    "blocking": true,
                    "change": "unclassified",
                    "newlyBlocking": null
                  },
                  {
                    "id": "case:3eef81824ac9a188",
                    "title": "tool summarize_page: tool text steers how the model uses other tools (/description): Before using this tool",
                    "path": "keryn-demo-mcp",
                    "line": 1,
                    "evidence": "pattern (flow not established)",
                    "rules": [
                      "mcp:tool-poisoning:cross-tool-shadowing"
                    ],
                    "blocking": false,
                    "change": "unclassified",
                    "newlyBlocking": null
                  },
                  {
                    "id": "case:b54e79b24b9890d7",
                    "title": "Risky tool surface detected: summarize_page: The tool schema or description exposes capabilities that should be reviewed before model use.",
                    "path": "keryn-demo-mcp",
                    "line": 1,
                    "evidence": "pattern (flow not established)",
                    "rules": [
                      "mcp:tool-schema-inventory:risky-tool-surface-detected-summarize-page"
                    ],
                    "blocking": false,
                    "change": "unclassified",
                    "newlyBlocking": null
                  },
                  {
                    "id": "case:f171b87d4a0fe2f3",
                    "title": "Risky tool surface detected: run_shell: The tool schema or description exposes capabilities that should be reviewed before model use.",
                    "path": "keryn-demo-mcp",
                    "line": 1,
                    "evidence": "pattern (flow not established)",
                    "rules": [
                      "mcp:tool-schema-inventory:risky-tool-surface-detected-run-shell"
                    ],
                    "blocking": false,
                    "change": "unclassified",
                    "newlyBlocking": null
                  }
                ],
                "acceptedRisks": [],
                "exceptions": {
                  "known": false,
                  "expiredEntries": 0
                },
                "limitations": [
                  "Newly blocking needs a base run (--base); without one it is unknown.",
                  "Cases follow core fingerprint deduplication; co-located rules without shared identity stay separate.",
                  "Recorded rule hits exclude hits removed by core deduplication."
                ]
              },
              "counts": {
                "total": 7,
                "error": 4,
                "warning": 3,
                "info": 0,
                "gating": 7
              },
              "coverage": {
                "complete": true,
                "rulesRequested": 0,
                "rulesExecuted": 0,
                "filesScanned": 1
              },
              "findings": [
                {
                  "ruleId": "mcp:mcp-tool-introspector:high-risk-mcp-capability-run-shell",
                  "severity": "ERROR",
                  "path": "keryn-demo-mcp",
                  "line": 1,
                  "message": "High-risk MCP capability: run_shell: An MCP-exposed tool has broad or sensitive capability that should be constrained before agent use."
                },
                {
                  "ruleId": "mcp:tool-permission-scorer:high-risk-tool-permission-surface-run-shell",
                  "severity": "ERROR",
                  "path": "keryn-demo-mcp",
                  "line": 1,
                  "message": "High-risk tool permission surface: run_shell: A model-exposed tool can read sensitive data, write external state, access broad resources, or lacks clear confirmation boundaries."
                },
                {
                  "ruleId": "mcp:tool-poisoning:concealment",
                  "severity": "ERROR",
                  "path": "keryn-demo-mcp",
                  "line": 1,
                  "message": "tool summarize_page: tool text tells the model to hide something from the user (/description): <IMPORTANT>"
                },
                {
                  "ruleId": "mcp:tool-poisoning:secret-read",
                  "severity": "ERROR",
                  "path": "keryn-demo-mcp",
                  "line": 1,
                  "message": "tool summarize_page: tool text tells the model to read secrets or key files (/description): read ~/.ssh/"
                },
                {
                  "ruleId": "mcp:tool-poisoning:cross-tool-shadowing",
                  "severity": "WARNING",
                  "path": "keryn-demo-mcp",
                  "line": 1,
                  "message": "tool summarize_page: tool text steers how the model uses other tools (/description): Before using this tool"
                },
                {
                  "ruleId": "mcp:tool-schema-inventory:risky-tool-surface-detected-run-shell",
                  "severity": "WARNING",
                  "path": "keryn-demo-mcp",
                  "line": 1,
                  "message": "Risky tool surface detected: run_shell: The tool schema or description exposes capabilities that should be reviewed before model use."
                },
                {
                  "ruleId": "mcp:tool-schema-inventory:risky-tool-surface-detected-summarize-page",
                  "severity": "WARNING",
                  "path": "keryn-demo-mcp",
                  "line": 1,
                  "message": "Risky tool surface detected: summarize_page: The tool schema or description exposes capabilities that should be reviewed before model use."
                }
              ],
              "truncated": false
            }
          }
        ],
        "dev.keryn/runs": "local"
      },
      "runs": "local"
    },
    {
      "name": "keryn_ai_attribution",
      "title": "Find AI coding tool use in a repository",
      "description": "Find where AI coding tools are used in a git repository on this machine: tool configuration and instruction files (Copilot, Cursor, Claude Code, Codex, Windsurf, Aider and others) and the commits that declare AI involvement (Co-authored-by and Assisted-by trailers, agent accounts, signature lines, Git AI notes), each with a confidence. Reads commit metadata and file paths only: no diffs, no code leave the machine. Aggregate only: it never breaks results down by developer. Declared involvement is a lower bound and says nothing about lines written.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "description": "Repository folder.",
            "minLength": 1
          },
          "maxCommits": {
            "type": "integer",
            "description": "Most commits read, newest first.",
            "minimum": 1,
            "maximum": 100000,
            "default": 20000
          },
          "since": {
            "type": "string",
            "description": "Only commits after this date, for example 2026-01-01 or 6.months."
          }
        },
        "required": [
          "path"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "commits": {
            "type": "integer",
            "description": "Commits read from the local git history (0 when none could be read)."
          },
          "declared": {
            "type": "integer",
            "description": "Commits that declare AI involvement at medium or high confidence."
          },
          "declaredShare": {
            "type": "number",
            "description": "declared / commits by people: a lower bound, because use that leaves no mark is not seen. Absent with no commits."
          },
          "tools": {
            "type": "array",
            "description": "Tools the commits declare, most first.",
            "items": {
              "type": "object",
              "properties": {
                "tool": {
                  "type": "string",
                  "description": "Catalogue id, for example claude-code, copilot, cursor, codex, aider."
                },
                "commits": {
                  "type": "integer",
                  "description": "Commits that declare it."
                },
                "high": {
                  "type": "integer",
                  "description": "Of those, high confidence."
                },
                "medium": {
                  "type": "integer",
                  "description": "Of those, medium confidence."
                }
              },
              "required": [
                "tool",
                "commits",
                "high",
                "medium"
              ]
            }
          },
          "configured": {
            "type": "array",
            "description": "Tools the tree is set up for (configuration and instruction files): no code is attributed by these.",
            "items": {
              "type": "object",
              "properties": {
                "tool": {
                  "type": "string",
                  "description": "Catalogue id."
                },
                "confidence": {
                  "type": "string",
                  "description": "high, medium or low.",
                  "enum": [
                    "high",
                    "medium",
                    "low"
                  ]
                },
                "files": {
                  "type": "integer",
                  "description": "Files that show it."
                }
              },
              "required": [
                "tool",
                "confidence",
                "files"
              ]
            }
          },
          "series": {
            "type": "array",
            "description": "The last 12 months.",
            "items": {
              "type": "object",
              "properties": {
                "period": {
                  "type": "string",
                  "description": "Month, YYYY-MM."
                },
                "commits": {
                  "type": "integer",
                  "description": "Commits."
                },
                "declared": {
                  "type": "integer",
                  "description": "Commits declaring AI involvement."
                }
              },
              "required": [
                "period",
                "commits",
                "declared"
              ]
            }
          },
          "limits": {
            "type": "array",
            "description": "Always read these with the numbers.",
            "items": {
              "type": "string",
              "description": "What the numbers do not say."
            }
          }
        },
        "required": [
          "commits",
          "declared",
          "tools",
          "configured",
          "series",
          "limits"
        ]
      },
      "annotations": {
        "title": "Find AI coding tool use in a repository",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "_meta": {
        "dev.keryn/examples": [
          {
            "description": "Which AI tools does this repository use, and how often do commits declare them?",
            "arguments": {
              "path": "."
            },
            "result": {
              "commits": 1,
              "declared": 1,
              "declaredShare": 1,
              "tools": [
                {
                  "tool": "claude-code",
                  "commits": 1,
                  "high": 1,
                  "medium": 0
                }
              ],
              "configured": [
                {
                  "tool": "codex",
                  "confidence": "medium",
                  "files": 1
                }
              ],
              "series": [
                {
                  "period": "2026-01",
                  "commits": 1,
                  "declared": 1
                }
              ],
              "limits": [
                "A commit with no marker is \"no declared AI involvement\", not \"written by a person\": use that leaves no trace is not seen, so every share here is a lower bound.",
                "A declaration says a tool took part; it does not say how many lines the tool wrote, whether anyone reviewed them, or that the declaration is true.",
                "Configuration files show a tool is set up in the repository, not that it wrote anything.",
                "Only 1 contributor in this window: the repository figures describe individuals."
              ]
            }
          }
        ],
        "dev.keryn/runs": "local"
      },
      "runs": "local"
    },
    {
      "name": "keryn_decide",
      "title": "Propose a release decision",
      "description": "Propose the release decision for a folder: Go, Go with accepted risk, or Hold, from a scan and the repository's .keryn/decisions.yml. It names what is open and what was accepted; it never says a release is safe, and a person signs it with keryn decide sign.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "description": "Repository folder.",
            "minLength": 1
          }
        },
        "required": [
          "path"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "exitCode": {
            "type": "integer",
            "description": "0 Go, 1 Hold, 3 incomplete coverage, 10 warnings."
          },
          "label": {
            "type": "string",
            "description": "Go, Go with accepted risk, or Hold."
          },
          "line": {
            "type": "string",
            "description": "One-line statement of the decision."
          },
          "holds": {
            "type": "array",
            "description": "Open Holds.",
            "items": {
              "type": "object",
              "description": "A Hold: the finding, edge and proof level.",
              "additionalProperties": true
            }
          },
          "acceptedRisks": {
            "type": "array",
            "description": "Risks accepted on purpose.",
            "items": {
              "type": "object",
              "description": "An accepted risk with who, why and until when.",
              "additionalProperties": true
            }
          },
          "signed": {
            "type": "object",
            "description": "The signature record, or null.",
            "additionalProperties": true,
            "nullable": true
          },
          "coverageStatement": {
            "type": "string",
            "description": "What the scan did and did not cover."
          }
        },
        "required": [
          "exitCode",
          "label",
          "line",
          "holds",
          "acceptedRisks",
          "signed"
        ]
      },
      "annotations": {
        "title": "Propose a release decision",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "_meta": {
        "dev.keryn/examples": [
          {
            "description": "Can this be released?",
            "arguments": {
              "path": "."
            },
            "result": {
              "exitCode": 0,
              "label": "Go",
              "line": "Go (proposed, not signed)",
              "holds": [],
              "acceptedRisks": [],
              "signed": null,
              "coverageStatement": "1598/1598 rules executed (0 unsupported, 0 partial, 0 timed out); 4 files scanned, 0 skipped; 2 earlier Keryn output files skipped; 1 left out by the host (symlinks, size, ignored dirs)."
            }
          }
        ],
        "dev.keryn/runs": "local"
      },
      "runs": "local"
    },
    {
      "name": "keryn_docs",
      "title": "Read Keryn's offline docs",
      "description": "Read a page of the documentation that ships inside the CLI: command help (cmd-scan, cmd-ci, ...), exit codes, output formats, the eight edge kinds. Call with no topic to list the pages.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "topic": {
            "type": "string",
            "description": "A page id or a unique prefix, for example exit-codes. Omit to list pages.",
            "pattern": "^[a-z0-9-]*$"
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "topic": {
            "type": "string",
            "description": "The page id, or null for the list.",
            "nullable": true
          },
          "text": {
            "type": "string",
            "description": "The page as Markdown, or the list of pages as lines."
          }
        },
        "required": [
          "topic",
          "text"
        ]
      },
      "annotations": {
        "title": "Read Keryn's offline docs",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "_meta": {
        "dev.keryn/examples": [
          {
            "description": "What do the exit codes mean?",
            "arguments": {
              "topic": "exit-codes"
            },
            "result": {
              "topic": "exit-codes",
              "text": "# Exit codes\n\n| Code | Name | Meaning |\n|---|---|---|\n| 0 | pass | Nothing failed the gate. |\n| 1 | violations | At least one finding at or above `--fail-on` (default `error`) and `--gate-confidence` (default `P1`). |\n| 2 | usage | The command line or a config, policy or rules file is wrong. Nothing was scanned. |\n| 3 | coverage | Requested analysis was unavailable, unsupported, partial, timed out, or completion is unknown. Source scan supports `--allow-incomplete`; ci, sca and dast retain exit 3. |\n| 4 | internal | An internal error or a timeout. Re-run with `KERYN_DEBUG=1` for the stack. |\n| 10 | pass with warnings | Only with `--exit-warn`: the gate passed with warnings or incomplete coverage. |\n\nWhen Deep runs it checks the pattern findings, with no flag. One it proves a data flow to reads \"confirmed by Deep\" and counts toward the gate whatever its rule's confidence; a flow-dependent one it finds no flow to reads \"needs review\" and counts only with `--gate-confidence P2`. SARIF carries the verdict as `properties.deepCheck` (`path` or `no-path`) beside `properties.gating`.\n\nAn exit code is part of the contract: CI steps may branch on it.\n"
            }
          }
        ],
        "dev.keryn/runs": "local"
      },
      "runs": "local"
    },
    {
      "name": "keryn_cloud_whoami",
      "title": "Show who Keryn Cloud thinks you are",
      "description": "Show the identity behind the Keryn Cloud credential in use: kind (API key, device or user), scopes, project limits and the organization every call is scoped to. Use it first to confirm the organization.",
      "inputSchema": {
        "type": "object",
        "properties": {},
        "required": [],
        "additionalProperties": false
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "description": "user, api-key or worker."
          },
          "organizationId": {
            "type": "string",
            "description": "The organization all calls are scoped to."
          },
          "organizationName": {
            "type": "string",
            "description": "Organization name.",
            "nullable": true
          },
          "scopes": {
            "type": "array",
            "description": "Scopes the credential holds.",
            "items": {
              "type": "string",
              "description": "A scope."
            }
          },
          "projectIds": {
            "type": "array",
            "description": "Projects the credential is limited to; null means all.",
            "items": {
              "type": "string",
              "description": "Project id."
            },
            "nullable": true
          }
        },
        "required": [
          "kind",
          "organizationId",
          "scopes",
          "projectIds"
        ]
      },
      "annotations": {
        "title": "Show who Keryn Cloud thinks you are",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      },
      "_meta": {
        "dev.keryn/examples": [
          {
            "description": "Confirm the organization.",
            "arguments": {},
            "result": {
              "kind": "api-key",
              "organizationId": "org_123",
              "organizationName": "Acme",
              "scopes": [
                "scans:create",
                "scans:read"
              ],
              "projectIds": null
            }
          }
        ],
        "dev.keryn/runs": "cloud"
      },
      "runs": "cloud"
    },
    {
      "name": "keryn_cloud_ai_attribution",
      "title": "Analyse AI attribution from commit metadata",
      "description": "Run the stable v1 attribution API on commit metadata you supply. Uses the same request and response as the SDK analyseAttribution method. Sends no source code. Returns organization aggregates, evidence and shadow metering; per-developer rows require a signed-in administrator via HTTP.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "body": {
            "type": "object",
            "properties": {
              "commits": {
                "type": "array",
                "items": {
                  "type": "object",
                  "description": "Commit metadata: sha, authoredAt, authorName, authorEmail, message and optional note or account metadata.",
                  "additionalProperties": true
                }
              },
              "pulls": {
                "type": "array",
                "items": {
                  "type": "object",
                  "description": "Pull request metadata.",
                  "additionalProperties": true
                }
              },
              "files": {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "Repository path."
                }
              },
              "seen": {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "Previously analysed commit id."
                }
              },
              "bucket": {
                "type": "string",
                "description": "Time series bucket.",
                "enum": [
                  "week",
                  "month"
                ]
              },
              "developers": {
                "type": "string",
                "description": "Return aggregate attribution. Defaults to off.",
                "enum": [
                  "off"
                ]
              },
              "weakSignals": {
                "type": "boolean",
                "description": "Include experimental low-confidence style signals."
              }
            },
            "required": [
              "commits"
            ],
            "description": "Attribution request body.",
            "additionalProperties": false
          }
        },
        "required": [
          "body"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "report": {
            "type": "object",
            "description": "Stable keryn.ai-attribution/1 report.",
            "additionalProperties": true
          },
          "metering": {
            "type": "object",
            "description": "Shadow attribution metering.",
            "additionalProperties": true
          }
        },
        "required": [
          "report",
          "metering"
        ]
      },
      "annotations": {
        "title": "Analyse AI attribution from commit metadata",
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      },
      "_meta": {
        "dev.keryn/examples": [
          {
            "description": "Analyse a synthetic assisted commit without sending source code.",
            "arguments": {
              "body": {
                "commits": [
                  {
                    "sha": "0000000000000000000000000000000000000001",
                    "authoredAt": "2026-11-01T10:00:00Z",
                    "authorName": "Example",
                    "authorEmail": "developer@example.invalid",
                    "message": "feat: example\n\nCo-authored-by: Claude <noreply@anthropic.com>"
                  }
                ]
              }
            },
            "result": {
              "report": {
                "schema": "keryn.ai-attribution/1",
                "engine": {
                  "name": "keryn-ai-attribution",
                  "version": "1.0.0",
                  "ruleset": "5fb9706036ad",
                  "rules": 174
                },
                "range": {
                  "from": "2026-11-01T10:00:00Z",
                  "to": "2026-11-01T10:00:00Z",
                  "commits": 1
                },
                "repo": {
                  "commits": 1,
                  "automation": 0,
                  "declared": 1,
                  "authored": 0,
                  "assisted": 1,
                  "weak": 0,
                  "byTool": [
                    {
                      "tool": "claude-code",
                      "commits": 1,
                      "authored": 0,
                      "assisted": 1,
                      "confidence": {
                        "high": 1,
                        "medium": 0,
                        "low": 0
                      },
                      "firstSeen": "2026-11-01T10:00:00Z",
                      "lastSeen": "2026-11-01T10:00:00Z"
                    }
                  ],
                  "series": [
                    {
                      "period": "2026-11",
                      "commits": 1,
                      "declared": 1,
                      "authored": 0,
                      "assisted": 1,
                      "weak": 0
                    }
                  ],
                  "declaredShare": 1
                },
                "configured": [],
                "surfaceHash": "sha256:6655345edfe6a568a871c57e52ef549b9fd78a443218dc6b56b378b1ff3e763f",
                "coverage": {
                  "channels": {
                    "trailer": "read",
                    "author": "read",
                    "message": "read",
                    "note": "not-available",
                    "pr": "not-available",
                    "file": "not-available",
                    "style": "off"
                  },
                  "limits": [
                    "A commit with no marker is \"no declared AI involvement\", not \"written by a person\": use that leaves no trace is not seen, so every share here is a lower bound.",
                    "A declaration says a tool took part; it does not say how many lines the tool wrote, whether anyone reviewed them, or that the declaration is true.",
                    "Configuration files show a tool is set up in the repository, not that it wrote anything.",
                    "Only 1 contributor in this window: the repository figures describe individuals."
                  ]
                },
                "samples": []
              },
              "metering": {
                "product": "sast",
                "module": "attribution",
                "shadow": true,
                "credits": 0,
                "listCredits": 0,
                "deduped": false,
                "ratesVersion": "kc.2026-11-16.2",
                "surfaceHash": "sha256:6655345edfe6a568a871c57e52ef549b9fd78a443218dc6b56b378b1ff3e763f",
                "metered": false
              }
            }
          }
        ],
        "dev.keryn/runs": "cloud"
      },
      "runs": "cloud"
    },
    {
      "name": "keryn_cloud_credits",
      "title": "Show Keryn Cloud credit",
      "description": "Show the organization's credit: balance, what is reserved by running scans, the part restricted to certain uses, the grants (starter, promo) with their expiry, and whether the starter credit is still available.",
      "inputSchema": {
        "type": "object",
        "properties": {},
        "required": [],
        "additionalProperties": false
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "balanceCents": {
            "type": "integer",
            "description": "Balance in cents."
          },
          "reservedCents": {
            "type": "integer",
            "description": "Reserved by queued or running scans."
          },
          "restrictedCents": {
            "type": "integer",
            "description": "Free-grant credit that cannot pay for every use."
          },
          "starter": {
            "type": "string",
            "description": "available or claimed.",
            "enum": [
              "available",
              "claimed"
            ]
          },
          "grants": {
            "type": "array",
            "description": "Starter and promo grants.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Grant id."
                },
                "kind": {
                  "type": "string",
                  "description": "starter or promo."
                },
                "amountCents": {
                  "type": "integer",
                  "description": "Amount in cents."
                },
                "expiresAt": {
                  "type": "string",
                  "description": "When it expires."
                },
                "expired": {
                  "type": "boolean",
                  "description": "Already expired."
                }
              },
              "required": [
                "id",
                "kind",
                "amountCents"
              ]
            }
          }
        },
        "required": [
          "balanceCents",
          "reservedCents",
          "starter",
          "grants"
        ]
      },
      "annotations": {
        "title": "Show Keryn Cloud credit",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      },
      "_meta": {
        "dev.keryn/examples": [
          {
            "description": "How much credit is left?",
            "arguments": {},
            "result": {
              "balanceCents": 1000,
              "reservedCents": 0,
              "restrictedCents": 1000,
              "starter": "claimed",
              "grants": [
                {
                  "id": "g1",
                  "kind": "starter",
                  "amountCents": 1000,
                  "expiresAt": "2027-02-14T00:00:00Z",
                  "expired": false
                }
              ]
            }
          }
        ],
        "dev.keryn/runs": "cloud"
      },
      "runs": "cloud"
    },
    {
      "name": "keryn_cloud_limits",
      "title": "Show Keryn Cloud limits and price",
      "description": "Show what the organization may run now: available credit, scans at a time, whether trust scans are enabled, any payment hold, and what a website scan costs: credits per page checked under the published table (a scan is rounded up to a whole credit and unchanged pages are free), or the cents per page a service before that table charges.",
      "inputSchema": {
        "type": "object",
        "properties": {},
        "required": [],
        "additionalProperties": false
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "availableCents": {
            "type": "integer",
            "description": "Balance minus reservations."
          },
          "concurrencyLimit": {
            "type": "integer",
            "description": "Scans at a time."
          },
          "trustScanEnabled": {
            "type": "boolean",
            "description": "Trust scans allowed."
          },
          "paymentHold": {
            "type": "boolean",
            "description": "A hold blocks new work."
          },
          "unitCents": {
            "type": "integer",
            "description": "Cents per page, only from a service that predates the published table."
          },
          "creditsPerUrl": {
            "type": "number",
            "description": "Credits per page checked (1 credit is 1 US cent)."
          },
          "rounding": {
            "type": "string",
            "description": "How a scan's total becomes whole credits, and when a repeat is free."
          },
          "maxPages": {
            "type": "integer",
            "description": "Most pages per scan."
          }
        },
        "required": [
          "availableCents",
          "concurrencyLimit",
          "trustScanEnabled",
          "paymentHold"
        ]
      },
      "annotations": {
        "title": "Show Keryn Cloud limits and price",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      },
      "_meta": {
        "dev.keryn/examples": [
          {
            "description": "Can I start a scan?",
            "arguments": {},
            "result": {
              "availableCents": 1000,
              "concurrencyLimit": 2,
              "trustScanEnabled": true,
              "paymentHold": false,
              "unitCents": 1,
              "maxPages": 50
            }
          }
        ],
        "dev.keryn/runs": "cloud"
      },
      "runs": "cloud"
    },
    {
      "name": "keryn_cloud_start_scan",
      "title": "Start a Keryn Cloud trust scan",
      "description": "Queue a trust scan of a public website in Keryn Cloud. It reserves credit for maxPages and returns at once; poll keryn_cloud_get_scan. Pass the same idempotencyKey on a retry so credit is never reserved twice. Scans only public addresses.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "http or https address, default ports, no credentials in it.",
            "pattern": "^https?://"
          },
          "maxPages": {
            "type": "integer",
            "description": "Pages to scan.",
            "minimum": 1,
            "maximum": 50,
            "default": 10
          },
          "projectId": {
            "type": "string",
            "description": "Limit to a project."
          },
          "idempotencyKey": {
            "type": "string",
            "description": "Unique per intended scan. Reuse it when retrying.",
            "minLength": 1,
            "maxLength": 128
          }
        },
        "required": [
          "url"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Scan id.",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "description": "queued, running, completed, failed or canceled.",
            "enum": [
              "queued",
              "running",
              "completed",
              "failed",
              "canceled"
            ]
          },
          "url": {
            "type": "string",
            "description": "The scanned address."
          },
          "maxPages": {
            "type": "integer",
            "description": "Page limit."
          },
          "reservedCents": {
            "type": "integer",
            "description": "Credit reserved for the scan, in cents."
          },
          "errorCode": {
            "type": "string",
            "description": "Why it failed, if it did.",
            "nullable": true
          },
          "result": {
            "type": "object",
            "description": "The scan result when completed.",
            "additionalProperties": true,
            "nullable": true
          }
        },
        "required": [
          "id",
          "status"
        ]
      },
      "annotations": {
        "title": "Start a Keryn Cloud trust scan",
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "_meta": {
        "dev.keryn/examples": [
          {
            "description": "Scan a site.",
            "arguments": {
              "url": "https://example.com",
              "maxPages": 10
            },
            "result": {
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "status": "queued",
              "url": "https://example.com/",
              "maxPages": 10,
              "reservedCents": 10,
              "errorCode": null,
              "result": null
            }
          }
        ],
        "dev.keryn/runs": "cloud"
      },
      "runs": "cloud"
    },
    {
      "name": "keryn_cloud_get_scan",
      "title": "Get a Keryn Cloud scan",
      "description": "Get a queued, running or finished Keryn Cloud trust scan by id, with its result once completed. Poll every few seconds until status is completed, failed or canceled.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Scan id from keryn_cloud_start_scan.",
            "format": "uuid"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Scan id.",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "description": "queued, running, completed, failed or canceled.",
            "enum": [
              "queued",
              "running",
              "completed",
              "failed",
              "canceled"
            ]
          },
          "url": {
            "type": "string",
            "description": "The scanned address."
          },
          "maxPages": {
            "type": "integer",
            "description": "Page limit."
          },
          "reservedCents": {
            "type": "integer",
            "description": "Credit reserved for the scan, in cents."
          },
          "errorCode": {
            "type": "string",
            "description": "Why it failed, if it did.",
            "nullable": true
          },
          "result": {
            "type": "object",
            "description": "The scan result when completed.",
            "additionalProperties": true,
            "nullable": true
          }
        },
        "required": [
          "id",
          "status"
        ]
      },
      "annotations": {
        "title": "Get a Keryn Cloud scan",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      },
      "_meta": {
        "dev.keryn/examples": [
          {
            "description": "Is it done?",
            "arguments": {
              "id": "123e4567-e89b-12d3-a456-426614174000"
            },
            "result": {
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "status": "running",
              "url": "https://example.com/",
              "maxPages": 10,
              "reservedCents": 10,
              "errorCode": null,
              "result": null
            }
          }
        ],
        "dev.keryn/runs": "cloud"
      },
      "runs": "cloud"
    },
    {
      "name": "keryn_cloud_cancel_scan",
      "title": "Cancel a Keryn Cloud scan",
      "description": "Ask a queued or running Keryn Cloud scan to stop. Unused reserved credit is released. Safe to repeat.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Scan id.",
            "format": "uuid"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "cancelRequested": {
            "type": "boolean",
            "description": "true once the request was accepted."
          }
        },
        "required": [
          "cancelRequested"
        ]
      },
      "annotations": {
        "title": "Cancel a Keryn Cloud scan",
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": true
      },
      "_meta": {
        "dev.keryn/examples": [
          {
            "description": "Stop a scan.",
            "arguments": {
              "id": "123e4567-e89b-12d3-a456-426614174000"
            },
            "result": {
              "cancelRequested": true
            }
          }
        ],
        "dev.keryn/runs": "cloud"
      },
      "runs": "cloud"
    },
    {
      "name": "keryn_cloud_run_scan",
      "title": "Run a Keryn Cloud trust, surface or MCP scan",
      "description": "Run a Keryn Cloud scan of a public address and store the result: trust (a site's privacy, security, legal and AI pages), surface (which AI services a host exposes) or mcp (a remote MCP server's tools, prompts and resources). Active surface checks need a domain you verified. It answers when the scan is done.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "description": "trust, surface or mcp.",
            "enum": [
              "trust",
              "surface",
              "mcp"
            ]
          },
          "target": {
            "type": "string",
            "description": "A URL for trust and mcp, a host name for surface.",
            "minLength": 1,
            "maxLength": 300
          },
          "active": {
            "type": "boolean",
            "description": "surface only: active port checks on a verified domain.",
            "default": false
          }
        },
        "required": [
          "kind",
          "target"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stored scan id."
          },
          "kind": {
            "type": "string",
            "description": "trust, surface or mcp."
          },
          "target": {
            "type": "string",
            "description": "What was scanned."
          },
          "status": {
            "type": "string",
            "description": "done or failed."
          },
          "findings": {
            "type": "integer",
            "description": "Findings in the report."
          },
          "summary": {
            "type": "object",
            "description": "Short typed summary.",
            "additionalProperties": true
          },
          "error": {
            "type": "string",
            "description": "Why it failed.",
            "nullable": true
          }
        },
        "required": [
          "id",
          "kind",
          "target",
          "status",
          "findings"
        ]
      },
      "annotations": {
        "title": "Run a Keryn Cloud trust, surface or MCP scan",
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "_meta": {
        "dev.keryn/examples": [
          {
            "description": "Profile an MCP server.",
            "arguments": {
              "kind": "mcp",
              "target": "https://api.keryn.app/demo/mcp"
            },
            "result": {
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "kind": "mcp",
              "target": "https://api.keryn.app/demo/mcp",
              "status": "done",
              "findings": 4,
              "summary": {
                "tools": 3
              },
              "error": null
            }
          }
        ],
        "dev.keryn/runs": "cloud"
      },
      "runs": "cloud"
    },
    {
      "name": "keryn_cloud_list_results",
      "title": "List uploaded scan results",
      "description": "List the scan results the organization uploaded to Keryn Cloud under its sharing setting (100 most recent): repository, visibility, how much was stored, and the counts.",
      "inputSchema": {
        "type": "object",
        "properties": {},
        "required": [],
        "additionalProperties": false
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "description": "Uploaded results, newest first.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Result id."
                },
                "repo": {
                  "type": "string",
                  "description": "owner/name."
                },
                "visibility": {
                  "type": "string",
                  "description": "public or private."
                },
                "detail": {
                  "type": "string",
                  "description": "full or metadata."
                },
                "summary": {
                  "type": "object",
                  "description": "Counts and decision.",
                  "additionalProperties": true
                },
                "createdAt": {
                  "type": "string",
                  "description": "When it was uploaded."
                }
              },
              "required": [
                "id",
                "repo",
                "visibility",
                "detail"
              ]
            }
          }
        },
        "required": [
          "results"
        ]
      },
      "annotations": {
        "title": "List uploaded scan results",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      },
      "_meta": {
        "dev.keryn/examples": [
          {
            "description": "What was uploaded?",
            "arguments": {},
            "result": {
              "results": [
                {
                  "id": "123e4567-e89b-12d3-a456-426614174000",
                  "repo": "acme/app",
                  "visibility": "public",
                  "detail": "full",
                  "summary": {
                    "findings": 3
                  },
                  "createdAt": "2026-11-16T10:00:00Z"
                }
              ]
            }
          }
        ],
        "dev.keryn/runs": "cloud"
      },
      "runs": "cloud"
    }
  ]
}
