cap-shield
Server Details
Context selection and compression for AI agents - recall measured, not claimed.
- Status
- Healthy
- Uptime
- 100.0% over the last 24 hours
- Last Tested
- Transport
- Streamable HTTP · MCP 2024-11-05
- URL
- Repository
- robinlidberg-dot/cap-shield-mcp
- GitHub Stars
- 0
- Server Listing
- cap-shield-mcp
- ChatGPT
- –
- Claude
- –
TDQS
Scored across 9 tools
Most tools target clearly distinct operations: memory write (remember), memory read (assemble_context), batching (pack_batch/unpack_batch), and identity (get_account/issue_pass). The only real overlap is assemble_context vs assemble_escalation_context, but the escalation tool is explicitly gated on 'escalate_recommended=true' or date/count/session-spanning questions, which makes the boundary workable. measure_traffic and list_packages are also clearly differentiated as no-key diagnostic tools.
The set largely follows a verb_noun snake_case pattern: assemble_context, assemble_escalation_context, get_account, issue_pass, list_packages, measure_traffic, pack_batch, unpack_batch. The lone deviation is 'remember', a bare verb with no object, which breaks the pattern but is still unambiguous. No mixed casing or wildly inconsistent verb styles.
Nine tools is well within the sweet spot and each maps to a needed step: bootstrap (get_account, measure_traffic, list_packages), memory lifecycle (remember, assemble_context, assemble_escalation_context), compression (pack_batch, unpack_batch), and identity attestation (issue_pass). Nothing feels redundant or padded.
The memory surface is write-and-read only: there is no forget/delete, no update, and no list_entries, which are natural lifecycle operations an agent will eventually need. Compression is likewise asymmetric — unpack_batch explicitly rejects single-message packets and no single-message pack tool exists, so that path is a dead end despite list_packages reporting per-message dictionaries. Identity lacks key rotation/revocation, though that is a lesser gap.
Available Tools
9 toolsassemble_contextRetrieve relevant memoryARead-onlyIdempotentInspect
Retrieve the memory entries that answer a question, within a token budget. REQUIRES A KEY. Send the returned 'context' to your language model INSTEAD of the whole history. This does not call a model itself — it selects what to send. The budget is a ceiling, not a target: selection stops where relevance runs out, often well below it. The response says how many entries were left behind and why. If the response has a 'budget_warning', the best match did not fit: call again with its suggested_token_budget.
Inputs: query (required), namespace (required), reduce, token_budget, +1 more.
assemble_escalation_contextRetrieve wide dated memoryARead-onlyIdempotentInspect
Retrieve a WIDE context for a question your model could not answer from assemble_context. REQUIRES A KEY. Use it when assemble_context returned escalate_recommended=true, or when the answer depends on dates, counts or several sessions. This does not call a model itself. Returns 'context' (up to token_budget, default 150 000 tokens: lower it if your model's window is smaller), where each stored entry starts with a header '--- Session YYYY/MM/DD (Ddd) HH:MM ---' giving when it was stored, and 'utelamnat_kontext': lower-ranked entries that were left out, in the same format. Read those only if the answer is still missing from 'context'. Python users can pass the whole response to cap_escalate_helper.eskalera_om_behovs_v6().
Inputs: query (required), namespace (required), token_budget, utelamnat_tokens.
get_accountCreate account and API keyBInspect
Get an account and an API key. Requires an email address. The key is returned ONCE and cannot be shown again — store it immediately. Beta quotas are low by design; they are hard stops, never overage billing.
Inputs: email (required), traffic.
issue_passIssue a signed agent passAInspect
Issue a short-lived (15 minute) signed credential (a JWT) stating who the caller acts for. REQUIRES A KEY. Anyone can verify it independently against /.well-known/jwks.json — without calling CAP-Shield again. 'acts_for' and 'scope' are NOT validated against reality: the pass only attests that the key holder claimed this, at this time, and that the claim is recorded in the audit chain. This is identity and claimed authorization, not a payment or access-control mechanism.
Inputs: acts_for (required), scope, audience.
list_packagesList compression packagesARead-onlyIdempotentInspect
List the available dictionaries with their MEASURED compression, including the ones that perform badly. Each entry says whether it works one message at a time or only batched, and how many messages came out LARGER. No key needed.
Inputs: no named parameters.
measure_trafficMeasure possible savingsARead-onlyIdempotentInspect
Measure how much of your own agent traffic could be saved. NO ACCOUNT OR KEY NEEDED — use this first. Returns byte savings over the wire and, if a query is given, token savings from selective context retrieval. Nothing is stored: the text is compressed in memory and discarded. Rate limited to 20 calls per hour per IP.
Inputs: texts (required), query, dict_id.
pack_batchCompress a batch of messagesARead-onlyIdempotentInspect
Pack several messages into ONE compressed packet instead of packing them one at a time. REQUIRES A KEY. Worth it for many small/medium messages (the per-message header cost is paid once per batch, and zstd shares context across them) — for a single message this has no advantage. Returns packet_b64 (hand it to unpack_batch to get the messages back) plus the measured byte savings versus packing each message separately. SECURITY: only batch messages that already share the SAME trust boundary (same tenant/agent — nothing attacker-influenced mixed in with a secret). Batched messages share one compression context, which can leak size-based information between them (a CRIME/BREACH-style side channel). There is no padding mitigation on this endpoint today, so trust-boundary separation is the only protection — don't rely on padding.
Inputs: texts (required), dict_id, agent_id.
rememberStore a memory entryAInspect
Store a memory entry for later retrieval. REQUIRES A KEY. This does not call any language model — it stores text in an isolated per-tenant archive. Use assemble_context to get relevant entries back.
Inputs: text (required), namespace (required), item_id, ttl_days.
unpack_batchDecompress a batch packetARead-onlyIdempotentInspect
Unpack a batch packet made by pack_batch (or by the /api/v1/pack-batch endpoint) back into the exact original list of messages, in order. REQUIRES A KEY. Not for a packet made by the single-message pack endpoint — that is a different format and this will reject it.
Inputs: packet_b64 (required), agent_id.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Long-term memory for AI agents: durable records, observable retrieval, governed context assembly.
Memory that reasons: continual learning for stateful agents. Better context, fewer tokens.
Long-term memory for AI agents: hybrid vector and full-text recall, rooms, time-travel.
Continuity for agents: a live memory you can read and cite right now, outliving the context window.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceVirtual Infinite Context for Agents and LLMs - maintains a continuous rolling context window, surfacing relevant memories while respecting token budgets.6MIT
- AlicenseNot gradedqualityBmaintenancePersistent long-term memory for AI agents via MCP, saving 80-90% memory-related token costs by enabling on-demand recall instead of always-injecting context.20 npm8MIT
- AlicenseNot gradedqualityBmaintenanceDeterministic context compression for MCP agents, reducing token usage via 11 tools for prompts, history, shell output, file deltas, and code navigation without ML or GPU.9MIT
- AlicenseAqualityCmaintenanceDeterministic repository context packing for AI coding agents: selects, compresses, and budgets only the files a task needs. Measured 83% fewer input tokens at the same task coverage, fully local, no LLM in the loop.924 PyPI9Functional Source , Version 1.1, MIT Future
Glama MCP Gateway
Add one secure layer between your agents and this server.