Compliance-grade audit logging for MCP client operations
Wellknown found it in public sources; nobody has proven control of it yet. Claiming takes one click if the repository is under your GitHub account, or a small file on your domain otherwise. Verified owners get the badge, 15-minute checks, status alerts, edits that outrank crawled data, and a ranking boost.
Agents can do it too: POST https://wellknown.network/api/v1/claims with {"agent":"lokryn-mcp-log","method":"well_known_file"} — machine-readable steps at claim.json, guide at /docs/claim.
Everything here was measured by our prober or read from a registry. Nothing is self-reported.
Attributed to the source that supplied each field. Treated as claims, not facts.
# lokryn-mcp-log Compliance-grade audit logging for MCP (Model Context Protocol) client operations. ## What It Does Wraps the official MCP Python SDK's `ClientSession` and logs every operation—tool calls, resource access, prompt executions—in a format that satisfies SOC2, HIPAA, and PCI audit requirements. Logs conform to the lokryn-compliance-log-schema, an open standard for audit logging (schema vendored in this package, will be extracted to separate PyPI package). ## Installation ```bash pip install lokryn-mcp-log ``` Or with uv: ```bash uv add lokryn-mcp-log ``` ## Quick Start ```python from mcp import ClientSession, StdioServerParameters from mcp.client.stdio import stdio_client from lokryn_mcp_log import with_logging, StdoutSink server_params = StdioServerParameters(command="python", args=["server.py"]) async def main(): async with stdio_client(server_params) as (read, write): async with ClientSession(read, write) as session: await session.initialize() # Wrap with logging logged = with_logging( session, sink=StdoutSink(), environment="development", ) # Use exactly like normal await logged.call_tool("add", {"a": 1, "b": 2}) ``` ## Sinks ### StdoutSink ```python from lokryn_mcp_log import StdoutSink sink = StdoutSink() # JSON to stdout sink = StdoutSink(pretty=True) # Pretty-printed ``` ### FileSink ```python from lokryn_mcp_log import FileSink sink = FileSink("/var/log/mcp-audit.jsonl") ``` ### HTTPSink ```python import os from lokryn_mcp_log import HTTPSink # JSON format (default) sink = HTTPSink( endpoint="https://your-log-collector.com/ingest", headers={"Authorization": "Bearer <token>"}, ) # Protobuf format sink = HTTPSink( endpoint="https://your-log-collector.com/ingest/proto", format="protobuf", ) # With HMAC signing sink = HTTPSink( endpoint="https://your-log-collector…
Mapped onto the structured taxonomy from declared text and observed tool names. Confidence shown for derived entries.
Every source is kept verbatim. Field changes are logged as events.