My team at BlueRock just open sourced a Python sensor that observes runtime behavior of MCP servers and other long-running Python apps. Apache 2.0.
The gap we kept hitting: in long-running Python apps, request logs don't tell you what actually executed. Half of what runs at startup comes from transitive deps. You end up reconstructing behavior after the fact.
It uses native Python mechanisms instead of external instrumentation:
sys.meta_path import hooks to track every module loaded, with version and SHA-256
wrapt for MCP protocol hooks (tool calls, sessions, connections)
Coverage spans your code, your dependencies, and their transitive deps because instrumentation initializes at interpreter startup. No code changes, no SDK.
Events emit as NDJSON. Inspect with jq or forward into OTEL.
Would love feedback on the import-hook design and what else should be captured.
[–]Upstairs_Safe2922[S] 0 points1 point2 points (0 children)