How inchoo/magento-bricklayer works
Magento Bricklayer is an MCP server that gives AI coding agents runtime insight into Magento and development tools. The principal workflow is an agent request entering the MCP server, being dispatched to a registered tool, and querying Magento’s bootstrapped runtime before returning results. The product also provides configuration and agent setup commands, development guidance and resources, and distinct introspection, data-management, diagnostics, and code-generation capabilities. The graph combines README-documented capabilities with relationships visible in sampled source and the SOURCE INDEX; unsampled tool internals are represented without inferred call chains.
Main entry points: ToolRegistry.php Tool registry · MagentoBootstrap.php Magento bootstrap · ContextTools.php Development context · McpServerFactory.php Server factory
Components 25
Entry and setup
- MCP server
src/Command/McpServerCommand.php - Server factory
src/Mcp/McpServerFactory.php - Tool registry
src/Mcp/Tool/ToolRegistry.php - CLI application
src/Application.php - Agent setup
src/Command/InstallCommand.php - Tool configuration
src/Config/ConfigLoader.php
Magento runtime
- Magento detection
src/Bootstrap/MagentoDetector.php - Magento bootstrap
src/Bootstrap/MagentoBootstrap.php - Component registration
src/Support/ComponentRegistration.php
MCP capabilities
- Runtime introspection
src/Mcp/Tool/ConfigurationTools.php - Database inspection
src/Mcp/Tool/DatabaseTools.php - EAV inspection
src/Mcp/Tool/EavTools.php - Routing and APIs
src/Mcp/Tool/RoutingTools.php - Catalog operations
src/Mcp/Tool/CatalogTools.php - Order operations
src/Mcp/Tool/OrderTools.php - Customer operations
src/Mcp/Tool/CustomerTools.php - Diagnostics and performance
src/Mcp/Tool/DiagnosticTools.php - Code runner
src/Mcp/Tool/CodeRunnerTools.php - Code generation
src/Mcp/Tool/CodeGenerationTools.php - Tool and docs search
src/Mcp/Tool/SearchTools.php
Guidance and resources
- Development context
src/Mcp/Tool/ContextTools.php - Guidelines compiler
src/Guidelines/GuidelinesCompiler.php - Local overrides
src/Guidelines/LocalOverrideHelper.php - MCP resources
src/Mcp/Resource/GuidelinesResource.php
Other components
- AI coding agent
Connections 27
- AI coding agent → MCP server: requests tools
README.md - MCP server → Server factory: starts server
- Server factory → Tool registry: loads tools
src/Mcp/McpServerFactory.php - Server factory → Magento bootstrap: initializes runtime
src/Mcp/McpServerFactory.php - Tool registry → Runtime introspection: registers tools
src/Mcp/Tool/ToolRegistry.php - Tool registry → Database inspection: registers tools
src/Mcp/Tool/ToolRegistry.php - Tool registry → EAV inspection: registers tools
src/Mcp/Tool/ToolRegistry.php - Tool registry → Routing and APIs: registers tools
src/Mcp/Tool/ToolRegistry.php - Tool registry → Catalog operations: registers tools
src/Mcp/Tool/ToolRegistry.php - Tool registry → Order operations: registers tools
src/Mcp/Tool/ToolRegistry.php - Tool registry → Customer operations: registers tools
src/Mcp/Tool/ToolRegistry.php - Tool registry → Diagnostics and performance: registers tools
src/Mcp/Tool/ToolRegistry.php - Tool registry → Code runner: registers tools
src/Mcp/Tool/ToolRegistry.php - Tool registry → Code generation: registers tools
src/Mcp/Tool/ToolRegistry.php - Tool registry → Tool and docs search: registers tools
src/Mcp/Tool/ToolRegistry.php - Magento bootstrap → Magento detection: finds Magento root
src/Bootstrap/MagentoBootstrap.php - Magento bootstrap → Component registration: registers components
src/Bootstrap/MagentoBootstrap.php - Database inspection → Magento bootstrap: reads Magento services
src/Mcp/Tool/DatabaseTools.php - Routing and APIs → Magento bootstrap: reads route services
src/Mcp/Tool/RoutingTools.php - Development context → Guidelines compiler: loads guidance
src/Guidelines/GuidelinesCompiler.php - Development context → Local overrides: uses overrides
src/Mcp/Tool/ContextTools.php - Tool and docs search → Development context: finds guidance
src/Mcp/Tool/SearchTools.php - Tool registry → Development context: registers tools
src/Mcp/Tool/ToolRegistry.php - MCP resources → AI coding agent: provides resources
- CLI application → Agent setup: registers command
src/Application.php - Agent setup → Guidelines compiler: generates agent guidance
src/Command/InstallCommand.php - Agent setup → Tool configuration: configures tools