Open-source MCP server monitoring for Python apps

Pythonic Model Context Protocol servers handle tool calls, session events, module imports, and subprocess activity. BlueRock has released MCP Python Hooks, an open source runtime sensor that gives developers a way to capture those signals without modifying application code.

MCP server monitoring

What the sensor captures

The tool wraps a Python process at startup so its hooks initialize before application code executes. According to BlueRock CEO Harold Byun, this is achieved through Python-native mechanisms: audit hooks for security-sensitive operations, sys.meta_path import hooks for module visibility, and framework-specific hooks built on the wrapt library for MCP protocol activity. The wrapper avoids any SDK integration or code edits.

Once active, the sensor emits structured NDJSON events to a local spool directory at ~/.bluerock/event-spool/. Six MCP event types are supported in this release, covering server initialization, tool and resource registration, session creation and termination, client connections across stdio, HTTP, and SSE transports, and individual protocol messages. Each emitted event includes process ID, timestamps, and a per-process source event counter.

Import monitoring runs alongside the MCP hooks. Every loaded module produces a python_import event recording the module name, file path, package version where available, and a SHA-256 hash of the module file on disk. Coverage extends to direct dependencies and their transitive dependencies, which the project documents as a supply-chain visibility feature.

Mechanism and overhead

Byun said overhead depends on event volume and export configuration, and the capture layer is designed to be lightweight. Framework hooks load lazily through @wrapt.when_imported(), so libraries the application never imports incur no cost. A per-feature configuration gate adds a second layer of control, letting operators disable categories they do not need.

The sensor runs on Python 3.10 and later. Pre-built wheels target Linux on x86_64 and aarch64 and macOS on both Apple Silicon and Intel. The Rust-based event-writing backend ships as a separate package called bluerock-oss.

Boundaries of the open source release

“The OSS release is primarily focused on visibility: capturing structured MCP and Python runtime events so teams can understand what executed,” Byun said. “Operators can control which hook categories are enabled, which limits what is captured at the source. More granular redaction and filtering, such as per-tool or per-field handling, are not part of the initial OSS scope.”

He added that the same execution data forms the basis for real-time policy enforcement and guardrails in the paid platform.

Integration paths

Because events are written as NDJSON, downstream routing is left to the operator. The repository ships with a Grafana and Loki dashboard that runs locally through Docker Compose, and BlueRock points to OTLP forwarding for users feeding events into Datadog, Splunk, or other SIEM systems.

Jeremiah Lowin, CEO of Prefect and creator of FastMCP, said in a statement provided by BlueRock that teams have moved quickly to adopt MCP and agent-driven architectures, and that visibility into tool executions and runtime behavior has lagged that adoption. Byun said tool execution visibility for governing the agentic execution layer is becoming a requirement for teams operating MCP infrastructure in production.

BlueRock MCP Python Hooks is available for free on GitHub.

Must read:

Subscribe to the Help Net Security ad-free monthly newsletter to stay informed on the essential open-source cybersecurity tools. Subscribe here!

Source link

Visited 2 times, 1 visit(s) today

Related Article

Nvidia’s trillion-dollar run puts pressure on the bulls

BEIJING, CHINA – MAY 14: Nvidia CEO Jensen Huang (C) gestures as he prepares to depart following a welcome ceremony at the Great Hall of the People on May 14, 2026 in Beijing, China. President Trump is meeting with President Xi Jinping in Beijing to address the Iran conflict, trade imbalances, and the Taiwan situation

Permutations in Europe: What’s still at stake in final weeks of season?

There’s still plenty to play for across Europe as we head into the final matches of the club season. Here are all the title races, Champions League fights, and relegation battles left to be decided in the top leagues this month. This story will be updated until the end of the campaign. 👉 Jump to:EPL

Brewing a Better Half-Gallon Batch

Today I finally ran an experiment I’ve wanted to try for a long time. If you’re a professional barista—or you run a busy café—this may save you some time. Most coffee shops use 1–1.5 gallon batch brewers (Bunn, Curtis, Fetco, etc.). When I opened Short Sleeves Coffee, I intentionally avoided brewing full 1-gallon batches. I

5 Frozen Breakfasts Chefs Say Keep You Full All Morning

Chef-approved frozen breakfasts with more protein and better ingredients. Eating a healthy breakfast every morning is a great way to start the day, but most people don’t have time to cook. Whether you’re rushing out the door in the morning for work, taking the kids to school or both, there’s usually not much time in

CA scales back plan to ban student use of cell phones

By Carolyn Jones, CalMatters This story was originally published by CalMatters. Sign up for their newsletters. Until last month, California was poised to join nearly a dozen other states that ban cell phones in K-12 schools. But under pressure from school boards and administrators, lawmakers scaled back a bill that would have required such a

BulkQuant Launches AI Trading Bot for Crypto, Forex, and Stock Markets

BulkQuant Launches AI Trading Bot for Crypto, Forex, and Stock Markets

London, United Kingdom, May 15, 2026 (GLOBE NEWSWIRE) — BulkQuant has officially launched its AI trading bot platform designed for crypto, forex, and stock market traders seeking a simpler way to automate trading strategies across multiple financial markets. The platform combines AI-powered quantitative analysis, automated trade execution, portfolio monitoring, and adaptive risk management into a

IMF lauds resilient Hong Kong economy but warns of risks linked to Middle East war

IMF lauds resilient Hong Kong economy but warns of risks linked to Middle East war

The International Monetary Fund (IMF) has lauded the resilience of Hong Kong’s economy, noting a sustained recovery despite economic activity having yet to return to pre-Covid levels, while warning of downside risks stemming from escalating geopolitical tensions. It also urged Hong Kong to pursue medium-term financial reforms, including the introduction of a goods and services

Smithsonian Presidents Exhibit Reopens With Low-Key Trump Impeachment Mention

For the past year, the Smithsonian Institution has found itself in the awkward position of telling the nation’s story while being supported in part by a government that wants to narrow how that story is told. In December, the White House threatened to revoke funding to the institution if it did not hand over a

Marvel’s Daredevil Follow-up Is Already Dominating on Streaming

A follow-up to Daredevil: Born Again Season 2 on Disney+ has become a massive streaming success within days of its launch. The Punisher: One Last Kill has quickly climbed to the top of multiple charts, beating out other titles on the platform. The MCU television special follows the gun-toting vigilante, who finds himself targeted by

Is Now a Bad Time to Invest?

The market has been on a roll lately, with the S&P 500 (SNPINDEX: ^GSPC) setting new highs throughout May. If you think you missed your opportunity when the market bottomed in late March, don’t fret. The market hitting new all-time highs is not particularly rare and should not change your investment strategy. And if you

6 bids for Hong Kong land sale signal renewed confidence despite market caution

6 bids for Hong Kong land sale signal renewed confidence despite market caution

The Hong Kong government’s first land sale in the current financial year has drawn six bids, according to the Development Bureau, including those from the city’s largest developers, suggesting a more confident outlook for the residential property market. At the close of tender for Tung Chung Town Lot No 54 at Area 106A on Friday

Each Premier League team reranked: Man City rise; Chelsea, Liverpool collapse

Ryan O’Hanlon Close Ryan O’Hanlon ESPN.com writer Ryan O’Hanlon is a staff writer for ESPN.com. He’s also the author of “Net Gains: Inside the Beautiful Game’s Analytics Revolution.”  and  Bill Connelly Close Bill Connelly ESPN Staff Writer Bill Connelly is a writer for ESPN. He covers college football, soccer and tennis. He has been at

Trump departs China after two-day summit

Trump departs China after two-day summit

IE 11 is not supported. For an optimal experience visit our site on another browser. Trump Wraps China Summit With Xi Jinping: What Are the Results? 05:41 Xi gives Trump rare tour of secret garden at heart of Chinese government 01:04 Now Playing Trump departs China after two-day summit 01:01 UP NEXT Special Report: Trump

Carol Chow was facing a bankruptcy petition by five people over unspecified debts at the time of her death. Photo: Dickson Lee

Embattled Hong Kong developer sued for HK$130 million, days after founder’s death

A Hong Kong property developer has been sued for HK$130 million (US$16.6 million) over allegedly breaching guarantor obligations in two bond subscription agreements, becoming the latest lawsuit to implicate the embattled company and following its founder’s sudden death earlier this week. Lofter Group, known for its urban renewal projects across the city’s core districts, and

Trump’s China visit left chip export issue unresolved

This report is from this week’s The Tech Download newsletter. Like what you see? You can subscribe here. One look at the roster of U.S. execs that cozied up to U.S. President Donald Trump on the 20+ hours flight from Alaska to China on Wednesday and you get a sense of the American delegation’s key focus

Why the Cerebras IPO matters for the AI race with China

Why the Cerebras IPO matters for the AI race with China

Cerebras, an AI chipmaker, saw its shares nearly double on Nasdaq, closing up 70% with a $95B market cap. Cerebras’s powerful chips are key in the US-China AI tech race. Chris Buskirk, co-founder and chief investment officer of 1789 Capital, a key Cerebras investor, says the company’s IPO is geopolitically significant. On Thursday, shares of

Fitbit Air vs Whoop Strap Comparison: Price, Features and AI

The Google Fitbit Air is very much the talk of the fitness tracking town right now, not only because it’s the first new Fitbit device that we’ve had in years, but it’s also one of the first big brands to go head-to-head with the established Whoop Strap (if you don’t count the Polar Loop and

0
Would love your thoughts, please comment.x
()
x