cap-shield

cap-shield is an MCP server for Claude Code, Codex, Cursor, Gemini CLI, OpenCode from robinlidberg-dot/cap-shield-mcp. Its token cost is not measured, scanned A, original, MIT.

A local service that selects and compresses context for AI agents based on measurements rather than estimates. It runs from the cap-shield Python package and requires an API key environment variable.

In plain words
What is it for?
Use it when an AI agent needs measured context selection or compression. Configure CAP_SHIELD_API_KEY before running the service.
Why use it?
It addresses the problem of giving an AI agent more context than it can use efficiently. The input does not specify the compression method or its results.

MCP server for Claude CodeCodexCursorGemini CLIOpenCode

Written for no agent in particular: it speaks MCP, so any client can run it.

Good fit Use it when an AI agent needs measured context selection or compression.

Compare 6 mcp servers from other repositories ↓
Install with agentmods
npx agentmods add mcp/robinlidberg-dot/cap-shield-mcp/cap-shield
Install

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.

Clone the repo
git clone --depth 1 https://github.com/robinlidberg-dot/cap-shield-mcp

Made for: Claude Code, Codex, Cursor, Gemini CLI, OpenCode.

Wrote 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.

agentmods badge for cap-shield

README.md
[![agentmods](https://agentmods.dev/badge/mcp/robinlidberg-dot/cap-shield-mcp/cap-shield.svg)](https://agentmods.dev/mcp/robinlidberg-dot/cap-shield-mcp/cap-shield)
Your own site
<a href="https://agentmods.dev/mcp/robinlidberg-dot/cap-shield-mcp/cap-shield"><img src="https://agentmods.dev/badge/mcp/robinlidberg-dot/cap-shield-mcp/cap-shield.svg" alt="Measured on agentmods" height="20"></a>
Per session not measured What this adds to a session before it is invoked.
When invoked not measured Not applicable: nothing here is loaded into a session.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Security

Grade A, and why

cap-shield 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 6d 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.

server.json · 11 lines

What it actually says

{
  "cap-shield": {
    "command": "uvx",
    "args": [
      "cap-shield"
    ],
    "env": {
      "CAP_SHIELD_API_KEY": ""
    }
  }
}
Changes

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.

  1. 6d ago First seen · 11 lines scan A 1cc167456747

Subscribe to this mod's changes

cap-shield is an MCP server published in the GitHub repository robinlidberg-dot/cap-shield-mcp (0 stars, last pushed 3d ago), licensed MIT. Its token cost is not measured: an MCP server costs its tool schemas, not its config file. 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.