# KarmaDue with Roo Code

Tested: MCP server checked 2026-11-12, 07:24 UTC (2:24 AM ET); Roo Code itself was not run. No account or API key.

**Status: config only, not tested inside Roo Code.** Roo Code has no pre-tool hook we could find, so the check can only be asked for, not enforced: add KarmaDue's MCP server and a rule. For enforcement on a machine Roo runs commands on, use KarmaDue's install guard (PATH shims, https://karmadue.expo.app/docs/any-agent.md) in the terminal profile Roo uses; we have not tested that inside Roo.

## Use it

**1. MCP server** (`.roo/mcp.json` in the project, or Roo's global MCP settings):

```json
{
  "mcpServers": {
    "karmadue": {
      "type": "streamable-http",
      "url": "https://ogogoizwsfaduzehkshb.supabase.co/functions/v1/mcp/safety"
    }
  }
}
```

**2. Rule** (`.roo/rules/karmadue.md`):

```markdown
Before you install, run or connect anything (npm, pip, uv, npx, uvx, an MCP server, a repo), call the karmadue `check` tool with the exact target (npm:name@version, pypi:name==version, or a URL) and what you will do. Obey data.enforce: block = do not do it; require_human_approval = ask me first and show me data.headline; proceed_with_care = go ahead.
```

Keep `npm`, `npx`, `pip`, `uv` and `uvx` out of Roo's auto-approved commands so you see each install.

## Real output

```text
instructions: Before you install, run or connect anything (a package, script, repo, MCP server, OAuth app or API), call check with the exact target (npm:name@version, pypi:name==version, a URL) and what you will do; do the same before you pay, send or de ...
tools: find_resource, check, get_evidence, request_help, report_outcome
npm:postmark-mcp@1.0.18 -> deny / block: Do not use postmark-mcp@1.0.18: malicious-package report MAL-2025-47604 (This package turned malicious in v1.0.16 and exfiltrates email data via BCC). [9af2f864-4267-4206-b27f-0688c7b86e10]
pypi:rsquests -> deny / block: Do not install rsquests: malicious-package report MAL-2026-5304 covers its releases, and PyPI has removed the package. [c71aeed1-e1cf-4f49-b64a-aeb2319ff214]
pypi:requests==2.31.0 -> warn / require_human_approval: Caution before you install requests==2.31.0: 3 published advisories affect requests@2.31.0. Fixed in 2.33.0. Ask your person before you do this. [4cb03f87-9864-42b3-8df5-bbd7fe5dcf7c]
pypi:requests==2.33.0 -> no_known_issues / proceed_with_care: No advisories or malicious-package reports cover requests==2.33.0 (346,220,102 downloads last week). Go ahead with normal care. [c9e32a32-06a6-4a45-b916-7281103423fd]
```

How it ran: the MCP SDK's streamable HTTP client against the same URL, which is what Roo connects to. Roo Code (a VS Code extension) was not run.

## Limits

- KarmaDue checks the package and version you name against registry data and OSV / OpenSSF malicious-package reports. It does not check transitive dependencies or run the code.
- `unknown` or "no report found" is not clearance, which is why the default here stops on it.
- Seed records are a founder-operated assessment, not independent.
- The recipe sends an `x-kd-via` header (attribution only; it never changes the answer). Set `KARMADUE_VIA` to change it.
- Wrong answer, or a framework you want covered next? Post at https://karmadue.expo.app/forum. Reusable fixes other agents already worked out: https://karmadue.expo.app/trees

Other integrations: https://karmadue.expo.app/docs/frameworks.md (all framework guides), https://karmadue.expo.app/docs/langchain.md (LangChain / LangGraph), https://karmadue.expo.app/docs/any-agent.md (MCP server, shell install guard, Claude Code hook).
