Skip to main content

sentinel-mcp

mcp-name: io.github.Sandeep-Hipparagi/sentinel-mcp

Registry-ready MCP server for governed agents: deterministic claim verification, a fail-closed policy gate, a Merkle-chained WORM audit ledger, and graph memory that degrades gracefully — installable with one command.

CI Python 3.11+ MCP License: MIT

Architecture

flowchart LR
    C["MCP Client\n(Claude Desktop · Cursor · OpenCode)"] -->|stdio / streamable-http| S["sentinel-mcp server\n(mcp 1.x FastMCP or 2.x MCPServer)"]
    S --> V["verify_claim\nDeterministic source tiering\n(Tier 1-5, zero network)"]
    S --> P["policy_check\nDeclarative allow/deny gate\n(fail-closed, schema bounds)"]
    S --> W["audit_append / audit_verify\nWORM JSONL ledger\nSHA-256 Merkle chain"]
    S --> M["memory_upsert / memory_add_edge / memory_query\nFalkorDB → SQLite fallback"]
    W -.chain hash.-> W

Measured conformance & throughput (this build)

Check Result
Conformance self-test 12/12 PASS (sentinel-mcp conformance)
verify_claim latency (n=1000) p50 0.013 ms · p95 0.014 ms · p99 0.018 ms (budget: p95 < 5 ms)
policy_check latency (n=1000) p50 0.005 ms · p95 0.005 ms · p99 0.006 ms
Tamper detection (single + multi-block, deletion, append-after-tamper) 100% caught, first bad sequence pin-pointed
Tests 76/76 pytest · mypy --strict · ruff clean

Reproduce: pip install -e ".[dev]" && pytest && sentinel-mcp conformance.

Quickstart (3 commands)

pip install -e ".[dev]"          # or: pip install sentinel-mcp-guard
sentinel-mcp conformance          # self-test: 12 checks incl. tamper + latency
sentinel-mcp serve                # stdio MCP server

Client setup

Claude Desktop (claude_desktop_config.json):

{"mcpServers": {"sentinel-mcp": {"command": "sentinel-mcp", "args": ["serve", "--transport", "stdio"]}}}

Cursor / OpenCode / any streamable-HTTP client:

sentinel-mcp serve --transport http --port 8000

Full example configs: examples/claude_desktop.json. Registry manifest: server.json.

Tool reference

Tool Input Output Guarantees
verify_claim claim_text, url? citable, source_tier (1–5), tier_name, risk_flags, rationale Deterministic rules; zero network, zero API keys; typosquat lookalikes forced to Tier 5
policy_check tool_name, args allowed, reason_code Declarative allowlist + argument bounds; prototype-pollution keys denied; payload-size cap; fail-closed
audit_append event sequence, entry_hash, merkle_root Append-only JSONL; SHA-256(prev_hash ‖ canonical(entry))
audit_verify — valid, length, merkle_root, first_bad_sequence? Full chain replay; pin-points the first mutated block
memory_upsert node_id, labels?, properties? backend, node_id Idempotent; backend observable
memory_add_edge src, relation, dst backend, edge Relation names validated (^[A-Za-z][A-Za-z0-9_]*$)
memory_query node_id, max_depth? (1–6) backend, nodes, edges FalkorDB when reachable, embedded SQLite otherwise

Dual-generation MCP SDK support

sentinel-mcp detects the installed mcp SDK and serves through the matching API: 2.x MCPServer (add_tool + run_stdio_async/run_streamable_http_async) or 1.x FastMCP (add_tool + run(transport=...)). Tool logic is pure Python and identical across generations; conformance verifies the wiring.

Security posture

  • Fail-closed everywhere: unknown tools, out-of-bounds arguments, and infrastructure errors are denied (POL_* / NATIVE_DRIVER_ERROR-style reason codes).
  • Tamper-evident audit: 100% of single-block mutations, multi-block mutations, deletions, and append-after-tamper scenarios are detected in tests.
  • No secrets: no API keys, no network calls in tool logic; the SQLite fallback means the server always boots.
  • Supply chain: two runtime dependencies (mcp, pydantic) plus CLI conveniences; OIDC-only PyPI publishing.

Development

ruff check . && ruff format --check .   # lint + format
mypy --strict src tests                 # full strict typing
pytest                                  # 76 tests
sentinel-mcp conformance                # 12-check self-test

See CONTRIBUTING.md and SECURITY.md.

Ecosystem

Part of the governed-agent stack measured by agent-benchmark-suite.

License

MIT — see LICENSE.

Metadata

Release files for sentinel-mcp-guard 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sentinel-mcp-guard 0.1.1
File Size Uploaded Provenance Actions
sentinel_mcp_guard-0.1.1.tar.gz 23.5 kB With provenance Details for sentinel_mcp_guard-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sentinel-mcp-guard 0.1.1
File Interpreter ABI Platform Actions
sentinel_mcp_guard-0.1.1-py3-none-any.whl Python 3 none any Details for sentinel_mcp_guard-0.1.1-py3-none-any.whl

Total release size: 45.1 kB

Release files / sentinel_mcp_guard-0.1.1.tar.gz

Download URL sentinel_mcp_guard-0.1.1.tar.gz
Size 23.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d14638d16454f157ee97dfdae51817f51506d748e07dae0cd6abf5b7fc60650a
BLAKE2b-256 checksum
How to use checksums
116f672fd325ea4bdfcaa452ba9f8b6b792e821cbad51c10875d1fecfa2f79be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Release files / sentinel_mcp_guard-0.1.1-py3-none-any.whl

Download URL sentinel_mcp_guard-0.1.1-py3-none-any.whl
Size 21.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
81fe5459cb1bb6095b7e14f598f326ab7a0a11486e0cff98106db06940362b1e
BLAKE2b-256 checksum
How to use checksums
4d50d3bc20e326e37ec0c0d28be2db2cf97da280a9d35c479dd679cc3f18514a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Security for sentinel-mcp-guard 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for sentinel_mcp_guard-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page