Skip to content

Overview

Nectar is an AI-powered development companion for Pollora. Built on top of Laravel Boost, it provides AI guidelines, agent skills, and a dedicated MCP server that gives AI agents deep context about your Pollora application.

When working with AI coding assistants (Claude Code, Cursor, Windsurf, etc.), the quality of generated code depends heavily on the context available. Nectar bridges this gap by:

  • Injecting Pollora-specific guidelines into your AI agent’s context via Laravel Boost
  • Providing 8 on-demand skills for domain-specific tasks (post types, themes, hooks, etc.)
  • Exposing 10 MCP tools for live introspection of your WordPress and Pollora environment

Nectar is a development-only package — it only loads in local and development environments.

Terminal window
composer require pollora/nectar --dev

Run Boost to install guidelines and skills:

Terminal window
php artisan boost:install

Select pollora/nectar when prompted, or add it to your boost.json:

{
"packages": ["pollora/nectar"]
}

Then update:

Terminal window
php artisan boost:update

Nectar registers a pollora-nectar MCP server that gives AI agents live access to your WordPress and Pollora environment.

Terminal window
php artisan nectar:mcp

Add it to your .mcp.json for automatic discovery:

{
"mcpServers": {
"pollora-nectar": {
"command": "php",
"args": ["artisan", "nectar:mcp"]
}
}
}

For DDEV projects, use the DDEV wrapper:

{
"mcpServers": {
"pollora-nectar": {
"command": "ddev",
"args": ["exec", "php", "artisan", "nectar:mcp"]
}
}
}

Returns the overall framework status: PHP, Laravel, Pollora, and WordPress versions, active theme, discovery cache status, and all installed Pollora packages.

Returns WordPress information: version, site URL, active/inactive plugins with versions, active theme, parent theme, multisite status, key constants (WP_DEBUG, MULTISITE, etc.), locale, and permalink structure.

Lists registered WordPress post types with their full configuration.

ParameterTypeDescription
filterstringFilter by post type slug (e.g., "book")
include_builtinbooleanInclude built-in types (post, page, etc.). Default: false

Returns: label, singular name, public/queryable status, REST support, archive, supports, taxonomies, rewrite rules, menu icon, and capability type.

Lists registered WordPress taxonomies with their configuration.

ParameterTypeDescription
filterstringFilter by taxonomy slug
include_builtinbooleanInclude built-in taxonomies (category, post_tag). Default: false

Returns: label, singular name, associated post types, public/hierarchical status, REST support, and rewrite rules.

Lists hooks discovered via #[Action] and #[Filter] attributes through the Pollora discovery system.

ParameterTypeDescription
typestringFilter by "action" or "filter". Omit for both

Returns: class name, method, hook name, and priority for each discovered hook.

Returns details about the active Pollora theme: directory structure, service providers, config files, registered Gutenberg blocks, Blade templates, Vite/Tailwind/theme.json status, and the computed theme namespace.

Lists all auto-discovered Pollora components from the discovery system, grouped by type.

ParameterTypeDescription
typestringFilter by "post_type", "taxonomy", "hook", "schedule", or "rest_route". Omit for all

Returns a summary with counts and detailed component information including attribute arguments.

Lists all registered routes including Route::wp() WordPress condition routes.

Returns: URI, HTTP methods, route name, middleware, WordPress condition and parameters (for Route::wp() routes), and a summary with total/WordPress/Laravel route counts.

Lists installed Laravel Modules (nwidart) with their name, path, and enabled status. Reports if the module system is not installed.

Reads a WordPress option value by key (read-only).

ParameterTypeDescription
keystringRequired. The option key (e.g., "blogname", "permalink_structure")

Returns the option value and whether it exists.

Guidelines are injected automatically into your AI agent’s context when Boost runs. They cover:

  • Pollora architecture — Laravel-first routing, Blade templates, DDD structure, auto-discovery
  • PHP 8 attributes#[PostType], #[Taxonomy], #[Action], #[Filter], #[Schedule], #[WpRestRoute]
  • WordPress routingRoute::wp() with template conditions and hierarchy fallback
  • Blade templating — Sage Directives (@posts, @title, @content, etc.)
  • Theme development — Convention-based structure, Vite, Tailwind CSS, Asset facade
  • Available Artisan commands — All Pollora-specific commands

Version-specific guidelines (e.g., Pollora 13.x with Laravel 13 and WordPress 6.9) are loaded automatically based on your installed framework version.

Skills are activated on-demand when working on specific tasks:

SkillWhen It Activates
pollora-post-typesCreating custom post types with #[PostType] attributes
pollora-taxonomiesCreating custom taxonomies with #[Taxonomy] attributes
pollora-themingTheme development (Blade, Vite, Tailwind, assets, theme.json)
pollora-hooksRegistering WordPress actions and filters with attributes
pollora-blocksGutenberg block development with JSX/TSX and Tailwind
pollora-rest-apiREST API endpoints with #[WpRestRoute]
pollora-schedulingScheduled tasks with #[Schedule] and WordPress cron
pollora-modulesLaravel Modules (nwidart) with auto-discovery integration

Each skill provides detailed instructions, code examples, and best practices specific to its domain.

Publish the configuration file:

Terminal window
php artisan vendor:publish --tag=nectar-config
config/nectar.php
return [
// Enable/disable Nectar entirely
'enabled' => env('NECTAR_ENABLED', true),
'mcp' => [
'tools' => [
// Tool class names to exclude from the MCP server
'exclude' => [],
// Additional tool class names to include
'include' => [],
],
],
];

Disable Nectar via environment variable:

NECTAR_ENABLED=false

Nectar extends Laravel Boost with three layers:

┌────────────────────────────────────────────────────┐
│ Laravel Boost │
│ (AI context framework) │
└───────────┬──────────────┬──────────────┬──────────┘
│ │ │
┌───────────▼──┐ ┌────────▼───────┐ ┌──▼──────────┐
│ Guidelines │ │ Skills │ │ MCP Server │
│ (Blade) │ │ (Markdown) │ │ (Tools) │
├──────────────┤ ├────────────────┤ ├─────────────┤
│ core.blade │ │ pollora-hooks │ │ 10 tools │
│ 13/core.blade│ │ pollora-blocks │ │ read-only │
│ │ │ pollora-theme │ │ live data │
│ │ │ ...6 more │ │ │
└──────────────┘ └────────────────┘ └─────────────┘
  • Read-only tools: All MCP tools are annotated with #[IsReadOnly] — they never modify your application state
  • Discovery integration: Hooks and components are retrieved via DiscoveryManager, ensuring consistency with the framework’s own discovery system
  • Environment-gated: Nectar only loads in local/development environments to avoid any production overhead
  • WordPress safety: Tools that depend on wp-admin functions (like get_plugins()) safely load required files before calling them