BlueRock Releases Open-Source Runtime Sensor for MCP Server Monitoring
BlueRock has launched an open-source runtime sensor that allows developers to monitor Model Context Protocol (MCP) servers and Python application behavior without modifying source code.

BlueRock has released MCP Python Hooks, an open-source runtime sensor designed to provide visibility into Model Context Protocol (MCP) servers without requiring modifications to existing application code. By wrapping Python processes at startup, the tool captures security-sensitive operations, module imports, and protocol-specific events, addressing a growing need for observability in agentic architectures Help Net Security.
The sensor functions by initializing hooks before the application code executes, utilizing native Python mechanisms to maintain transparency. It employs audit hooks for security-sensitive operations, sys.meta_path for monitoring module imports, and the wrapt library to intercept MCP protocol activity. This approach allows developers to monitor tool calls, session events, and subprocess activity without integrating specific SDKs or editing source code Help Net Security.
Once active, the sensor generates structured NDJSON events, which are stored in a local spool directory at ~/.bluerock/event-spool/. The tool currently supports six categories of MCP events, including server initialization, tool and resource registration, session lifecycle management, and client connections across stdio, HTTP, and SSE transports. Each event contains metadata such as the process ID, timestamps, and a source event counter to ensure traceability Help Net Security.
In addition to protocol monitoring, the tool tracks module imports to provide supply-chain visibility. Every loaded module—including direct and transitive dependencies—triggers a python_import event that records the module name, file path, package version, and a SHA-256 hash of the file on disk. To minimize performance impact, the sensor uses lazy loading via @wrapt.when_imported() and includes configuration gates that allow operators to disable specific hook categories as needed Help Net Security.
The sensor is compatible with Python 3.10 and later, with pre-built wheels available for Linux (x86_64 and aarch64) and macOS (Apple Silicon and Intel). While the core event-writing backend is built in Rust, the integration is designed to be flexible; operators can route the NDJSON output to various destinations, including local Grafana and Loki dashboards via Docker Compose or OTLP-compatible SIEM systems like Datadog and Splunk Help Net Security.
As organizations rapidly adopt agent-driven architectures, visibility into tool execution has become a critical requirement for production environments. While the current open-source release focuses on observability rather than granular redaction or real-time policy enforcement, BlueRock intends for this execution data to serve as the foundation for future security guardrails. The project is currently available for download on GitHub Help Net Security.