Skip to main content

jep-mcp-wrapper

jep-mcp-wrapper adds verifiable accountability semantics to MCP tool execution without changing the MCP protocol. Existing tool callables are wrapped in a side-channel JEP runtime that emits deterministic, append-only events for each execution lifecycle step.

What it provides

  • JEPMCPWrapper wraps sync and async MCP tool callables.
  • MCPExecutionTracer writes lifecycle events (requested, running, succeeded, failed).
  • ToolDelegationRuntime tracks the active actor, delegation lineage, parent context, and authority scope across nested tool calls.
  • ReplayVerifier replays archived execution chains, verifies lineage, validates deterministic hashes, and detects archive tampering.
  • AppendOnlyEventArchive stores JSONL events as an append-only hash chain.

The wrapper records:

  • tool_name
  • actor
  • delegation lineage
  • authority scope
  • execution state
  • parent event linkage
  • deterministic event hash and previous hash

Quick start

from pathlib import Path
from jep_mcp_wrapper import JEPMCPWrapper, ReplayVerifier

archive = "jep-events.jsonl"
wrapper = JEPMCPWrapper(
    archive,
    default_actor="agent:file-reader",
    default_authority_scope={"filesystem": "read-only"},
)

def read_file(path: str) -> str:
    return Path(path).read_text(encoding="utf-8")

read_file = wrapper.wrap_tool("filesystem.read_file", read_file)
print(read_file("README.md"))

replay = ReplayVerifier(archive).replay()
assert replay.verified

Chained delegation

Nested wrapped calls automatically extend lineage. A search.query tool that calls a wrapped browser.fetch tool produces two execution chains: one with ("search.query",) and one with ("search.query", "browser.fetch").

from jep_mcp_wrapper import JEPMCPWrapper

wrapper = JEPMCPWrapper("events.jsonl", default_actor="agent:researcher")

def browser_fetch(url: str) -> str:
    return f"page:{url}"

def search(query: str, fetch) -> str:
    return fetch(f"https://example.test?q={query}")

fetch = wrapper.wrap_tool("browser.fetch", browser_fetch, authority_scope={"network": "example.test"})
search = wrapper.wrap_tool("search.query", search, authority_scope={"purpose": "research"})
search("accountability", fetch=fetch)

Replay and tamper detection

from jep_mcp_wrapper import ReplayVerifier

verifier = ReplayVerifier("events.jsonl")
result = verifier.replay()
print(result.verified)
print(result.lineage_by_call)
print(verifier.detect_tampering())

Replay verification checks:

  1. deterministic hash equality for every event,
  2. previous-hash continuity across the append-only archive,
  3. monotonic event sequence numbers,
  4. valid tool lifecycle transitions,
  5. stable lineage for every tool call,
  6. parent/child lineage consistency when parent links are present.

Examples

  • examples/filesystem_tool.py wraps a filesystem read tool.
  • examples/browser_search_chain.py wraps browser and search tools with chained delegation.

Non-goals

  • It does not modify MCP protocol schemas or wire semantics.
  • It does not implement an orchestration framework.
  • It does not decide whether a tool is authorized; it records the declared authority scope so execution can be audited and replayed.

Metadata

Release files for jep-mcp-wrapper 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 jep-mcp-wrapper 0.1.1
File Size Uploaded Provenance
jep_mcp_wrapper-0.1.1.tar.gz 11.1 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for jep-mcp-wrapper 0.1.1
File Interpreter ABI Platform
jep_mcp_wrapper-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 22.1 kB

Release files / jep_mcp_wrapper-0.1.1.tar.gz

Download URL jep_mcp_wrapper-0.1.1.tar.gz
Size 11.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d71afda56d0fa53103998434a975ad647dfa008a1bc159df0d922d7bca760ce7
BLAKE2b-256 checksum
How to use checksums
76aab7266df8128b90bb7081fafbc2cda90542d259df26d3351faad7a64092f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 13, 2026.

Transparency log

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

Download URL jep_mcp_wrapper-0.1.1-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d6ec5e7d92b0eea70c9186af08d9ba08cb829fc758577bfb27515ed4ff3a722c
BLAKE2b-256 checksum
How to use checksums
405558d2515f93a13737c9b9f81ea42cf84ba7e8c8cedbef84bab8674247be5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 13, 2026.

Transparency log

Security for jep-mcp-wrapper 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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for jep_mcp_wrapper-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 Sep 13, 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