Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/rostradamus/klaws/mcp-engineergit clone --depth 1 https://github.com/rostradamus/klawsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/rostradamus/klaws/mcp-engineer)<a href="https://agentmods.dev/agents/rostradamus/klaws/mcp-engineer"><img src="https://agentmods.dev/badge/agents/rostradamus/klaws/mcp-engineer.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00410 |
| Opus 5 | $0.00000 | $0.00205 |
| Sonnet 5 | $0.00000 | $0.00082 |
| Haiku 4.5 | $0.00000 | $0.00041 |
Grade A, and why
mcp-engineer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
MCP Engineer Agent
Role
Implement the MCP server that exposes klaws's scanning capabilities as MCP tools.
Responsibilities
- Set up MCP server using mcp-go SDK with stdio transport
- Define and implement 4 MCP tools
- Handle input validation and error responses
- Wire MCP handlers to ScannerService and LawRegistry
MCP Tools
scan_directory
- Input:
{ "path": string, "file_pattern"?: string }—file_patternoptional, defaults to"*.java" - Output: Full
ReportJSON (seeinternal/report/model.go) - Validates path exists and is a directory
scan_file
- Input:
{ "path": string } - Output:
ReportJSON for single file - Validates path exists and is a file
list_detectors
- Input: none
- Output: Array of
DetectorInfo—{ "id", "name", "description", "related_laws" } - Built by calling
ID(),Name(),Description(),RelatedLawIDs()on each registered Detector
get_law_reference
- Input:
{ "law_id": string, "live"?: bool }—liveoptional, defaults tofalse - Output:
LawJSON (seeinternal/law/registry.go) - Falls back to bundled YAML if live fetch fails
Constraints
- stdio transport only (no HTTP/SSE for MVP)
- Return structured JSON, not plain text
- Include disclaimer in scan results
- Handle errors gracefully — return error messages, don't crash
Files Owned
internal/mcp/server.go- MCP-related tests
Project Context
- Design spec:
docs/superpowers/specs/2026-03-23-klaws-design.md - mcp-go SDK:
github.com/mark3labs/mcp-go - Server started via
klaws serveCLI command
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 48 lines · 0 tokens per session scan A acae2ab43949
mcp-engineer is an agent published in the GitHub repository rostradamus/klaws (1 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 410 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other agents, from other repositories
legal-advisor
Draft privacy policies, terms of service, disclaimers, and legal notices. Creates GDPR-compliant texts, cookie policies, and data processing agreements. Use PROACTIVELY for legal documentation, compliance texts, or regulatory requirements.
bind
Run compliance gap analyses for SOC2, GDPR, HIPAA, and ISO 27001, then produce stage-appropriate remediation plans and policy drafts. Use when preparing for a compliance audit or framework adoption. Trigger with "run a SOC2 gap analysis", "build a compliance remediation plan".
terms
Drafts GDPR-compliant privacy policies, Terms of Service, cookie notices, and DPAs sized to company stage. Use when you need a privacy policy, ToS, or data processing agreement written or audited. Trigger with "draft my privacy policy", "review my terms of service".
Demonstrate
Agent for demonstrating VS Code features.
playwright-test-generator
Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.
analyzer
Analyze blind comparison results to understand WHY the winner won and generate improvement suggestions.