MCP server + database index advisor
Two features that make Vitals act on your app: an MCP server so AI agents can read and run audits, and a database index advisor that turns captured slow queries into ready-to-paste index migrations.
- · A built-in [Model Context Protocol](https://modelcontextprotocol.io) server (vitals), powered by laravel/mcp, with three tools: latest_audit (scores, Core Web Vitals, backend telemetry), list_recommendations (prioritised findings with their file:line references), and run_audit.
- · Registered automatically as a local stdio server; opt into an HTTP endpoint with vitals.mcp.web_route. Configure under vitals.mcp. _laravel/mcp is pre-1.0; the tool surface may evolve with it._
- · Reads the slow queries backend telemetry already captures, statically parses the columns each one filters / joins / sorts on, and emits a missing-index recommendation with a paste-ready Schema::table(...)->index(...) migration.
- · Static and advisory by design — it never runs the captured SQL, never applies a migration, skips the package's own vitals_* tables, and validates against the live schema so parser guesses can't produce false suggestions. Toggle with VITALS_DB_ADVISOR_ENABLED.