digitalnodecom / substrate
MCP server for AI-assisted WordPress development with Bedrock, Acorn, and Sage.
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/digitalnodecom/substrate
Requires
- php: ^8.2
- guzzlehttp/guzzle: ^7.9
- laravel/mcp: ^0.5.1
- roots/acorn: ^5.0
Requires (Dev)
- laravel/pint: ^1.20.0
- pestphp/pest: ^2.36.0|^3.8.4
- phpstan/phpstan: ^2.1
This package is auto-updated.
Last update: 2026-01-11 19:50:48 UTC
README
MCP server for WordPress + Bedrock + Acorn + Sage.
Gives AI assistants deep context about your Roots stack.
Quick Start
composer require digitalnodecom/substrate --dev wp acorn substrate:install
The install wizard configures MCP for your IDE and generates project guidelines.
Requirements
- PHP 8.2+
- WordPress 6.0+
- Acorn 5.0+
Usage
# Start MCP server (usually handled by your IDE) wp acorn substrate:mcp # Refresh caches after plugin/theme changes wp acorn substrate:update
MCP Configuration
The installer creates .mcp.json automatically. Manual setup:
{
"mcpServers": {
"substrate": {
"command": "php",
"args": ["vendor/bin/acorn", "substrate:mcp"]
}
}
}
Tools
31 tools across three categories:
Core (10)
| Tool | Description |
|---|---|
ApplicationInfo |
PHP, WordPress, Acorn versions, theme info, plugins, packages |
BrowserLogs |
Browser console logs captured by Substrate |
DatabaseConnections |
Configured database connections |
DatabaseQuery |
Execute read-only SQL queries with table prefix support |
DatabaseSchema |
Database schema with WordPress core vs custom table detection |
GetConfig |
Config values from Acorn config, WP options, env vars, constants |
LastError |
Last error/exception from application logs |
ListEnvVars |
Environment variable names from .env files |
ReadLogEntries |
Log entries from debug.log or Acorn logs |
SearchDocs |
Search WordPress, Roots, Tailwind documentation |
WordPress (16)
| Tool | Description |
|---|---|
AcfFields |
ACF field groups and fields (requires ACF) |
GetOption |
WordPress options by name or pattern |
ListBlocks |
Registered Gutenberg blocks (core and custom) |
ListCronJobs |
Scheduled WP-Cron jobs with next run times |
ListHooks |
Active action/filter hooks with callbacks |
ListMenus |
Navigation menus and menu locations |
ListPlugins |
Installed plugins (active, inactive, must-use) |
ListPostTypes |
Registered post types with configuration |
ListRestRoutes |
REST API endpoints with methods and arguments |
ListShortcodes |
Registered shortcodes with callback info |
ListTaxonomies |
Registered taxonomies |
ListThemes |
Installed themes with parent/child relationships |
ListTransients |
Database transients with expiration times |
ListUsers |
User roles and capabilities |
ListWidgets |
Widgets and sidebars |
WooCommerceInfo |
Store info, settings, gateways (requires WooCommerce) |
Acorn/Sage (5)
| Tool | Description |
|---|---|
ListAssets |
Assets from Vite manifest |
ListBladeComponents |
Blade components (anonymous and class-based) |
ListServiceProviders |
Acorn service providers |
ListViewComposers |
View composers with their target views |
SageInfo |
Sage theme structure, menus, sidebars, build config |
Configuration
wp acorn vendor:publish --tag=substrate-config
// config/substrate.php return [ 'enabled' => env('SUBSTRATE_ENABLED', true), 'browser_logs_watcher' => env('SUBSTRATE_BROWSER_LOGS_WATCHER', true), 'mcp' => [ 'tools' => [ 'include' => [], 'exclude' => [], ], ], ];
Browser Console Capture
Substrate captures browser console.log, console.error, etc. for the BrowserLogs tool.
Auto-injected via middleware, or add manually:
@substrateJs </body>
Development
composer install composer test # Run tests composer lint # Pint + PHPStan
License
MIT