Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Monocle

Laravel Monocle Laravel Package

exeque/laravel-monocle

Exeque Laravel Monocle is a lightweight inspection and monitoring package for Laravel apps. It gives developers quick visibility into key runtime details, helping you understand behavior, troubleshoot issues, and keep your application healthy with minimal setup.

View on GitHub
Deep Wiki
Context7

The Laravel profiler your coding agent reads: timing, queries, cache, filesystem and AI calls, exposed over MCP.

Frequently asked questions about Laravel Monocle
How do I install Laravel Monocle?
Install it with composer require exeque/laravel-monocle, then run php artisan monocle:install to scaffold the setup. Publish the config file with php artisan vendor:publish so you can control which lenses are enabled. The package attaches itself to framework extension points automatically, so no manual service provider wiring is needed beyond the install step.
Which Laravel and PHP versions does Laravel Monocle support?
Laravel Monocle targets Laravel 11 and 12 and is tested against PHP 8.5. The current release also tracks Filament 5.10.2 and current Livewire behaviour, so it follows the edge rather than lagging behind. Older Filament versions keep working, though that path is less exercised. There is no formal published support matrix yet, so pin versions in composer.json if you need stability.
What is MCP and why does a Laravel profiler expose data over it?
MCP stands for Model Context Protocol, a standard way to expose structured context to AI coding agents. Laravel Monocle collects timing, query, cache, filesystem and AI call data during a request and serves it over MCP so an agent such as Claude or Cursor can read it directly. Instead of copy-pasting logs into a chat window, the agent queries the profiler output itself.
Is Laravel Monocle a replacement for Laravel Telescope?
Not exactly. Telescope is a full application introspection suite with a database-backed UI aimed at local development, while Monocle is a lightweight per-request diagnostics layer built for agent-readable output. They can run side by side, but if you only need a human-facing debug dashboard, Telescope may be the simpler choice. Reach for Monocle when the consumer is an AI agent or when you need origin attribution like file and line for each captured event.
Is it safe to run Laravel Monocle in production?
The package is pre-1.0 and is framed as a local and staging diagnostics tool, so production tracing should be an explicit decision rather than a default. Browser tracing is now correctly gated behind trace.browser.enabled, so the Monocle button only appears when you opt in. If you do deploy it, enable only the lenses you need, confirm what gets persisted, and review retention. Any inspection surface in a live environment is also a data-exposure and performance surface.
Does Laravel Monocle work with Laravel Octane or long-lived workers?
This has not been confirmed publicly, and it matters because Monocle is an interceptor that attaches to framework extension points rather than a stateless library. Under Octane, singletons and captured state can leak between requests unless the package resets per-request state explicitly. Test it against your own workload before enabling it on an Octane deployment, and treat the lens and browser surfaces as unverified until you do.
Is Laravel Monocle stable enough to depend on?
The current release is v0.9.0, so there is no semver guarantee and config keys, lens names and emitted identifiers can change without a major bump. A recent rename of inline view identifiers from inline:hash to layout:layouts.public is a correctness improvement but acts as a soft breaking change for dashboards or saved queries keyed on view names. If you build on those identifiers, pin the version and watch the changelog. Ask about the 1.0 timeline before standardising on it.
How much per-request overhead does Laravel Monocle add?
No official benchmark is published, but every enabled lens runs inside the request hot path, so cost scales with how many lenses you turn on. Enable only what you need and keep them scoped to local and staging environments through config and environment variables. A deprecation fired on every validated request under PHP 8.5 and was fixed in a patch release, which shows per-request costs are worth watching. Measure against your own request profile before enabling it broadly.
Does Laravel Monocle instrument Livewire and Filament?
Yes. It captures Livewire component rendering, including the component render() method as the origin, and it hooks into Filament's notification pipeline. The trade-off is that the Livewire render pipeline and Filament's notification mailbox are not stable public contracts, so the package needs patching whenever those move. Expect to upgrade Monocle in step with Livewire and Filament rather than independently.
What data does browser tracing capture, and could it include PII?
Browser tracing is opt-in and only activates when trace.browser.enabled is true, which is the correct default boundary. The documentation does not spell out exactly which payloads or headers are captured, so verify before enabling it anywhere real users exist. If it records request bodies or headers, those can contain personal data. Scope it to local environments or scrub sensitive fields first.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource