Skip to content
Sprint projectMay 24, 2026Saudi Arabia

CapShim: Validating Capability Policies for the Model Context Protocol via a Non-Interference Type System

Fatimah Emad Eldin · Team CapShim

Submitted to The Secure Program Synthesis Hackathon. Sprint projects are early-stage work by participants, not Apart Research publications.

Read the report

Report: CapShim: Validating Capability Policies for the Model Context Protocol via a Non-Interference Type System

Presentation

Presentation: CapShim: Validating Capability Policies for the Model Context Protocol via a Non-Interference Type System

Code (opens in new tab)More on astral-fate.github.io (opens in new tab)
Share

CapShim is a transparent proxy between an LLM agent and an MCP server. It typechecks the agent's proposed tool-call plan against an Information Flow Control (IFC) lattice and statically rejects any plan whose data flow would violate a YAML-declared policy — before any tool fires.

Reviews

Judging this Sprint?

Review this project

Your public critique appears on this page without your name. Your private critique is not published; only the Apart team reads it. If you agree below, we share your review with grantmaking.ai (opens in new tab) and the Transformative AI Fund so strong projects can be funded.

Not shown on this page.

Shown on this page, without your name.

Only the Apart team reads this, and funders if you agree below.

Share my name publicly on grantmaking.ai *
Share my private critique with funders *

How much would this matter for AI safety if it worked? How innovative is it? For scores of 4-5: is this actually new to the field, or replicating recent work?

Scoring guide
  1. 1Negligible. No clear problem addressed, or no meaningful novelty.
  2. 2Limited. Addresses a real problem but with a generic or well-trodden approach. Incremental at best.
  3. 3Moderate. Clear problem with a reasonable approach; some novelty in framing or method beyond routine application of existing tools.
  4. 4Significant. Important problem with an original approach, or identifies a neglected problem area. A valuable contribution others could build on.
  5. 5Exceptional. Tackles a critical AI safety problem with a genuinely novel approach, or opens a new research direction. Clear theory of change. You'd be excited to share this with researchers in the area.

How sound are methodology, implementation, and findings?

Scoring guide
  1. 1Seriously flawed. Methodology broken, results uninterpretable, or implementation doesn't work.
  2. 2Weak. Approach has significant gaps: missing validation, flawed experimental design, or incomplete implementation.
  3. 3Competent. Technically solid given the short duration. Methodology makes sense, results are interpretable, limitations acknowledged, work builds toward clear conclusions.
  4. 4Strong. Thorough methodology with convincing validation. Results clearly support conclusions. Immediately useful for future work.
  5. 5Exceptional. Ambitious scope executed rigorously. Surprising findings, novel methods, or unusually robust validation.

How clearly are work, findings, and impact potential communicated?

Scoring guide
  1. 1Incomprehensible. Cannot determine what the project is actually claiming or doing.
  2. 2Hard to follow. Key information buried, missing, or diluted by excessive length. Significant effort to extract main points.
  3. 3Clear enough. Can understand the problem, approach, and results without undue effort. Core content clearly present: problem, method, findings, limitations.
  4. 4Well presented. Easy to follow, well-structured, appropriate level of detail. Target audience would get it quickly.
  5. 5Exceptionally clear. A pleasure to read. Complex ideas made accessible. Could serve as a model for how to present this type of work.

  1. The paper presents a very fun! and self contained little experiment in implementing a capability-based constraint system for MCP commands. This is a very nice project, and I'm curious to see how it develops! That being said, the work builds on a really rich area of information flow type systems for which similar ideas have been tried out and their various warts discovered and accounted for. In particular, following the development of the first information flow type systems, the area has investigated various extensions and refinements to make it easier and more ergonomic to use these types. One particular problem is that these policies end up being very restrictive, and often loose information too quickly. One idea that I would encourage the author to look into is that while historically these heavier more precise type systems have had typing obligations that would put off any human, they may be more than manageable for an agent. Anyway, overall, this paper is very clean, consise, self contained and fun to read, the direction is well scoped and tackles an interesting problem albeit with a small delta ontop of existing work. Looking forward to seeing how this develops!

    Read full reviewShow less
  2. The framing is principled and timely: treat MCP's ambient authority as a type error and enforce information-flow control at the protocol boundary. The artifact is real (a deployable proxy, four specified typing rules, real-server tests), and the limitations section is a model, naming in-LLM laundering, lying tool authors, and timing channels rather than burying them. The score rests on that engineering; validation is the soft spot. The 100% block and 0% false-positive figures use an external attack taxonomy but a self-built harness on the author's own toy server, plus ten invented benign cases, so they are not yet independent evidence; an outside agent-injection corpus would fix this. The non-interference argument, the paper's titular contribution, is an unproven sketch with its three lemmas deferred, and as stated covers only payload-bearing egress, narrower than the abstract implies. T-Declassify, the one rule that intentionally moves Secret data, is never exercised by any scenario.

    Read full reviewShow less
  3. This work correctly identifies a security issue underlying much of today's agentic workflows. The proposed solution is relatively simple - and this is excellent and the author resists the temptation to overcomplicate. I would not be surprised if this approach is essentially or similar to what the industry settles on in the near-to-medium term. This work has clearly been conducted by a competent ML engineer with good security mindset and thinking and I look forward to seeing more from them.

    The design displayed requires no onerous refactoring of existing workflows and would be relatively simple to drop in place (modulo maintainers needing anyway to create sensible security policies). The separation of policy from tool implementations allows reusability and aids abstraction.

    This work is similar conceptually to CaMeL (https://arxiv.org/abs/2503.18813) and it was a notable omission to not place the work in this context and distinguish it appropriately. Similarly the benchmark was hard to evaluate credibility of since it is small and self-authored, but provides _some_ credibility. The diagram had overflowing text which was a little messy. I was also a little concerned that the soundness sketch was not proved; I"ll also note that I don't think it actually reflects the threat model mentioned earlier (given adversaries have some control over emission of tool calls) which might mislead reviewers.

    I particularly liked Appendix A and the correct identification of additional covert channels though I would add that (4) significantly underestimates the capacity of an attacker to get information out through the choice, timing and order of different benign calls.

    Read full reviewShow less

Cite this project

@misc{eldin2026capshim,
  title = {{CapShim: Validating Capability Policies for the Model Context Protocol via a Non-Interference Type System}},
  author = {Fatimah Emad Eldin},
  year = {2026},
  month = may,
  note = {Submitted to The Secure Program Synthesis Hackathon, an Apart Research Sprint},
  howpublished = {\url{https://apartresearch.com/sprints/projects/capshim-validating-capability-policies-for-the-model-context-protocol-via-a-noninterference-type-system-3h10}},
  url = {https://apartresearch.com/sprints/projects/capshim-validating-capability-policies-for-the-model-context-protocol-via-a-noninterference-type-system-3h10}
}

Build something like this at the next Sprint

AI Collusion Research Sprint · Oct 23 - 25, 2026