mdrbx/nova-mcp
mdrbx/nova-mcp brings Model Context Protocol support to Laravel Nova. It exposes Nova resources, tools, and administrative capabilities to AI assistants through a secure MCP server, enabling context-aware workflows and automation inside your Nova admin panel.
Start by installing and wiring the MCP server, then verify read access before enabling writes.
composer require mdrbx/nova-mcp and follow the README’s server registration and token setup. Tokens are ability-scoped; use nova:read for read-only clients and nova:write only where mutations are intended.NOVA_MCP_READ_ONLY=true disables all MCP resource mutations, including for previously issued write tokens. Writes are enabled by default, so set read-only explicitly in staging and production unless the use case requires mutation.NOVA_MCP_GUARDRAILS. Treat this as instruction text for MCP clients, not as an authorization layer.php artisan config:cache or your deployment equivalent). No new migrations or frontend build are required in v0.2.0.BelongsToMany record in a non-production environment.Use Nova’s existing authorization and policy layer as the boundary, and keep MCP tokens narrowly scoped per client or workflow.
nova:read tokens to analysis or support agents and nova:write tokens only to automation that must mutate records. Combine this with NOVA_MCP_READ_ONLY=true for environments where no writes should occur at all.BelongsToMany and MorphToMany fields support attach and detach, including pivot validation. Create related HasMany and MorphMany children through the same Nova controllers and policies used by the UI. Restore and force-delete operations follow Nova’s documented behavior; replication forms can be discovered and used to prefill create operations.canRun, and policy checks are honored. Queued, standalone, and pivot actions remain excluded, so wrap long-running work in a synchronous action only when it is genuinely fast, or keep it outside MCP.NOVA_MCP_GUARDRAILS to tell clients what the server expects, but rely on token abilities, NOVA_MCP_READ_ONLY, Nova policies, and canRun for enforcement.NOVA_MCP_READ_ONLY=true. Existing write tokens are also blocked when read-only is enabled, so flipping the flag is a real kill switch.NOVA_MCP_READ_ONLY or NOVA_MCP_GUARDRAILS without rebuilding Laravel’s config cache will leave the old behavior in place.viewAny, view, create, update, delete, restore, forceDelete, and action-related methods for resources exposed over MCP.MorphToMany and MorphMany operations use the aliases Nova expects; otherwise create/attach calls can fail validation or resolve the wrong model.NOVA_MCP_GUARDRAILS. Always verify authorization server-side and avoid putting secrets or destructive instructions in guardrail text.NOVA_MCP_READ_ONLY is false for writes, confirm the Nova policy allows the operation for the token’s user, confirm the action is synchronous and visible, and inspect the native Nova response before changing MCP configuration.How can I help you explore Laravel packages today?