Skip to content
Back to search

mcp-trust-plane

Composable data security plane for Model Context Protocol. Pluggable layers — collect, analyze, guard — across 50+ enterprise providers. Open architecture.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/abluva--mcp-trust-plane/badge.svg)](/listings/abluva--mcp-trust-plane)

HTML

<a href="/listings/abluva--mcp-trust-plane"><img src="/api/listings/abluva--mcp-trust-plane/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

cd common/sql-guard
npm install
PORT=6001 node index.js

Or bring up all filters with Docker:

docker compose up

Then register the filter against an engine:

INSERT INTO ablv_mcp_filters (slug, name, filter_url, execution_point, ...)
VALUES ('sql-guard', 'SQL Guard', 'http://sql-guard:6001/filter',
        'pre-request', ...);

See `docs/ADDING_FILTERS.md` for a step-by-step walkthrough of writing your own filter.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 184 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # MCP Trust Plane
  2. A pluggable, language-agnostic filter framework for Model Context Protocol
  3. (MCP) traffic. Each filter is a tiny HTTP service that decides whether a
  4. tool call should be allowed, blocked, modified, or truncated.
  5. ## Why
  6. MCP gives agents direct access to tools and data sources. That's powerful
  7. and dangerous in equal measure. Filters give you a place to enforce
  8. guardrails — block destructive SQL, redact PII before it reaches the
  9. model, throttle abusive agents, cap response sizes, redact columns —
  10. without modifying the upstream MCP server or the agent runtime.
  11. ## How it works
  12. ```
  13. pre-request post-response
  14. Client ─▶ MCP Gateway ─────────▶ Engine ─▶ filter ─┐
  15. │ ◀────────────────── allow/block ┘
  16. │
  17. ▼ (forward)
  18. MCP Server
  19. │
  20. ▼
  21. Client ◀ MCP Gateway ◀──── Engine ─▶ filter ─┐
  22. ◀───── allow/truncate/modify ┘
  23. ```
  24. - An MCP gateway sits in front of the upstream MCP server.
  25. - For every `tools/call`, the gateway asks an **engine** "what should I do
  26. for target X at execution_point Y?".
  27. - The engine looks up the policies assigned to that target and, for each
  28. filter in those policies, calls `POST {filter_url}/filter`.
  29. - Filters are completely independent processes. They can be written in
  30. any language. They share no state with the gateway or the engine.
  31. A reference engine and gateway live in the parent repo
  32. (`secure-ai-plane-x/mcp-filter-gateway`). This sub-project ships only the
  33. filter implementations and the contract.
  34. ## The Filter Contract
  35. Every filter MUST expose two HTTP endpoints:
  36. ### `POST /filter`
  37. Request body:
  38. ```json
  39. {
  40. "config": { "max_rows": 1000 },
  41. "arguments": {
  42. "sql": "SELECT * FROM employees",
  43. "response_count": 8000,
  44. "response_rows": ["row-1", "row-2", "..."]
  45. },
  46. "metadata": {
  47. "agent_id": "demo_agent",
  48. "agent_name": "demo_agent",
  49. "member_id": "f5d9e4ec-…",
  50. "project_id": "b0000000-…",
  51. "tool_name": "run_sql"
  52. }
  53. }
  54. ```
  55. Response body:
  56. ```json
  57. {
  58. "action": "allow | block | truncate | modify",
  59. "reason": "human-readable string surfaced to the user and audit log",
  60. "modified_response": { "...optional..." },
  61. "original_count": 8000,
  62. "truncated_to": 1000
  63. }
  64. ```
  65. - `allow` — let the request through unchanged.
  66. - `block` — reject. The gateway returns an MCP error using `reason`.
  67. - `truncate` — return a smaller payload (`modified_response`) and an
  68. audit notice. Used by post-response filters like Row Limiter.
  69. - `modify` — replace the payload with `modified_response`. Used by
  70. redactors and maskers.
  71. Filters MUST be idempotent and side-effect free with respect to the
  72. agent's behaviour (with the obvious exception of audit / rate limiter
  73. state). Filter execution time should stay under 50ms p95; the engine
  74. treats slow filters as `allow` to fail-open.
  75. ### `GET /health`
  76. Returns `200 { "status": "healthy", "filter": "<slug>", "version": "..." }`.
  77. Used by orchestrators to gate traffic.
  78. ## Common filters
  79. Cross-cutting guards under `common/` (Apache 2.0):
  80. | Filter | Slug | Phase | Default port |
  81. |------------------|-------------------|----------------|--------------|
  82. | SQL Guard | sql-guard | pre-request | 6001 |
  83. | PII Redactor | pii-redactor | post-response | 6002 |
  84. | Row Limiter | row-limiter | post-response | 6003 |
  85. | Schema Validator | schema-validator | pre-request | 6005 |
  86. | Rate Limiter | rate-limiter | pre-request | 6007 |
  87. | Field Masker | field-masker | post-response | 6008 |
  88. ## Provider filters
  89. Integration-specific guards under `provider/<vendor>/data-guard/` — **54
  90. providers** today (AWS, GitHub, Stripe, Snowflake, Slack, PostgreSQL,
  91. Notion, Terraform, and more). See `provider/README.md` and
  92. `provider/manifest.json` for the full list and ports (6301–6354).
  93. | Provider (sample) | Slug | Default port |
  94. |-------------------|------------------------|--------------|
  95. | AWS | `aws-data-guard` | 6301 |
  96. | GitHub | `github-data-guard` | 6305 |
  97. | PostgreSQL | `postgresql-data-guard`| 6341 |
  98. | Stripe | `stripe-data-guard` | 6348 |
  99. | Slack | `slack-data-guard` | 6345 |
  100. Run `node provider/scripts/generate-providers.js` after editing
  101. `provider/manifest.json` to scaffold new vendors.
  102. ## Quickstart
  103. ```sh
  104. cd common/sql-guard
  105. npm install
  106. PORT=6001 node index.js
  107. ```
  108. Or bring up all filters with Docker:
  109. ```sh
  110. docker compose up
  111. ```
  112. Then register the filter against an engine:
  113. ```sql
  114. INSERT INTO ablv_mcp_filters (slug, name, filter_url, execution_point, ...)
  115. VALUES ('sql-guard', 'SQL Guard', 'http://sql-guard:6001/filter',
  116. 'pre-request', ...);
  117. ```
  118. See `docs/ADDING_FILTERS.md` for a step-by-step walkthrough of writing
  119. your own filter.
  120. ## Layout
  121. ```
  122. mcp-filters/
  123. ├── README.md # this file
  124. ├── LICENSE # Apache 2.0
  125. ├── docker-compose.yml # common + provider filters
  126. ├── docs/
  127. │ ├── CONTRACT.md # full HTTP contract + JSON schema
  128. │ ├── ARCHITECTURE.md # how filters compose with gateway + engine
  129. │ └── ADDING_FILTERS.md # write-your-own walkthrough
  130. ├── common/ # cross-cutting filters (any MCP server)
  131. │ ├── sql-guard/
  132. │ ├── pii-redactor/
  133. │ ├── row-limiter/
  134. │ ├── schema-validator/
  135. │ ├── rate-limiter/
  136. │ └── field-masker/
  137. ├── provider/ # vendor-specific data guards (54 providers)
  138. │ ├── manifest.json
  139. │ ├── scripts/generate-providers.js
  140. │ ├── _lib/
  141. │ └── <vendor>/data-guard/
  142. └── tests/
  143. ├── contract.js # HTTP contract for every filter
  144. └── behaviour.js # decision-logic regression tests
  145. ```
  146. ## CII-Best-Practices Badge
  147. [![OpenSSF Best Practices](https://www.bestpractices.dev/projects/13305/badge)](https://www.bestpractices.dev/projects/13305)
  148. ## OpenSSF Scorecard
  149. [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/abluva-research/mcp-trust-plane/badge)](https://securityscorecards.dev/viewer/?uri=github.com/abluva-research/mcp-trust-plane)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.