skylence/laravel-model-inspector-mcp
An MCP server that lets AI assistants inspect Laravel Eloquent models, exposing schemas, attributes, relationships, and metadata so tools can query your app's data structure directly.
Architecture fit. The package targets a genuinely underserved seam: exposing Eloquent model metadata (attributes, casts, relationships, fillable/guarded, table schema) to an AI client over the Model Context Protocol. MCP is the right transport choice — it is the emerging standard for IDE/agent tooling and avoids bespoke RPC or prompt-injection hacks. Architecturally it is a thin read-only adapter over Laravel's model layer, which is a low-coupling posture: it does not mutate domain code, and its blast radius is contained to a console command and a stdio/HTTP MCP endpoint. For teams already using AI-assisted development on Laravel codebases, this can materially improve generation fidelity by replacing file-scraping and guesswork with structured introspection.
Integration feasibility. Mechanically simple — composer require --dev, publish config if present, register an artisan command, wire the command into an MCP client config (Claude Desktop, Cursor, or a custom agent). The real feasibility question is not mechanics but maturity: at 0 stars, 0 dependents, and a score of 0, there is no evidence of use in the wild. There is no signal on Laravel version support, PHP floor, test coverage, or whether the maintainer intends to track the still-moving MCP spec. Treat this as an unproven prototype, not a dependency.
Technical risk.
laravel/mcp and direct schema-introspection tooling may cover the same need with first-party backing.Key questions.
Stack fit. A natural fit for Laravel 10/11/12 shops running PHP 8.1+ with an AI-assisted workflow (Cursor, Claude Code, Copilot agents, or an internal agent). It belongs in require-dev only — it is developer tooling, not runtime infrastructure. If the team has no MCP-capable client in the loop, the package has no consumer and should not be adopted at all.
Migration path. There is nothing to migrate from — this is additive. The pragmatic path is a time-boxed spike: one engineer, one representative service (ideally the gnarliest model graph in the estate), half a day. Success criteria: the MCP client can enumerate models, retrieve attributes and relationships, and the AI assistant produces measurably better schema-aware code than without it. If the spike fails on coverage, fall back to laravel/mcp plus a hand-rolled introspection tool — the interface is narrow enough that the sunk cost is trivial.
Compatibility. Verify against the exact Laravel minor in use, and confirm the MCP client version supports the transports the package implements. Pin the version explicitly and vendor-lock it in dev. Watch for conflict with existing packages that boot the model layer or register console commands; collisions are unlikely but non-zero.
Sequencing.
Maintenance. This is the dominant cost. With zero dependents and a small vendor, the team should assume it will need to own patches. Budget roughly a few hours per quarter for version bumps and spec-drift fixes; more if the package stalls. Pin the version and avoid float.
Support. No community, no issue-tracker signal, no Stack Overflow corpus. Internal documentation must be written at adoption time, not discovered later. The named owner is a hard requirement, not a formality.
Scaling. Negligible runtime footprint — introspection runs on demand and is bounded by app boot plus model reflection. For very large model graphs, expect slow first response and consider caching metadata per run. No concurrency, queueing, or memory concerns at realistic scale.
Failure modes.
require-dev plus an environment guard.Ramp-up. Low for a Laravel-fluent engineer — under an hour to install and wire the client. Understanding what the package gets wrong takes longer and requires deliberate testing against known-tricky models. Overall: cheap to try, cheap to discard, and worth a bounded evaluation — but not defensible as a committed dependency at its current maturity.
How can I help you explore Laravel packages today?