Reference: Model Context Protocol (MCP) Architecture
This document provides a comprehensive overview of the Model Context Protocol (MCP) and its implementation within the AIOHM platform.
Overview
Model Context Protocol (MCP) is a standardized communication layer that allows AI agents to discover and interact with external tools and services. In the AIOHM platform, MCP is the bridge that enables AI agents within workflows to perform complex, real-world tasks like publishing to WordPress, analyzing SEO, or managing marketing campaigns.
Core Concepts
- MCP Server: A standalone application (often a Node.js process) that exposes a set of capabilities. Each server is specialized for a specific service (e.g., WordPress, Mautic).
- MCP Tool: A specific function or action exposed by an MCP Server (e.g.,
wordpress_create_post,mautic_create_contact). - Integration: MCP Servers are registered in the AIOHM database (
mcp_serverstable) and associated with tenants. Once registered and enabled, they become available as nodes in the Workflow Builder.
Available MCP Servers
The AIOHM platform is pre-configured to integrate with several specialized MCP servers.
| Server | Description | Key Tools | Implementation |
|---|---|---|---|
| WordPress | Provides comprehensive WordPress site management. | create_post, update_post, upload_media | Node.js App |
| Mautic | Full integration with the Mautic marketing automation platform. | create_contact, add_contact_to_segment | Node.js App |
| SEO | Provides advanced SEO analysis and content optimization. | analyze_seo, check_keyword_rankings | Node.js App |
| AIOHM KB | Imports vector data from the AIOHM Knowledge Assistant PRO WP plugin. | import_vector_entries | Node.js App |
| Knowledgebase | Core server for interacting with the platform's internal knowledge. | search, get_entry | Integrated PHP |
| Boost | Provides tools for Laravel application introspection. | list_routes, get_config | Integrated PHP |
Usage in Workflows
You can use any enabled MCP Server as a node within the Workflow Builder.
Adding an MCP Server Node
- In the Workflow Builder, click "Add Node".
- Select the "MCP Server" button (purple).
- Choose the desired server (e.g., "WordPress MCP") from the list.
Configuring an MCP Server Node
- Click the new MCP node on the canvas to open the Node Editor.
- Node Name: Give the node a descriptive label (e.g., "Publish Article to Blog").
- Server Configuration: In the textarea, provide plain-English instructions for the AI agent on how to use the server (e.g., which tool to use and with what data).
For Developers: Server Management & Development
This section covers the technical details of how MCP servers are organized and managed in the codebase.
Directory Structure
MCP servers are organized by type. For example:
- PHP Servers:
app/Domains/AI/MCP/Servers/Laravel/ - Node.js Servers:
app/Mcp/Servers/NodeJS/(path may vary)
Server Types
Laravel Servers:
- Built directly into the main Laravel application.
- Registered and booted via service providers and
routes/ai.php. - Example:
KnowledgebaseServer.
Node.js Servers:
- Custom-built, standalone Node.js/TypeScript applications.
- Each requires its own
npm installandnpm run buildsteps. - They are managed and invoked by the AIOHM platform, with their configuration stored in the database.
Management Commands
- Check Status:
php artisan mcp:status - Stop Servers:
php artisan mcp:stop - Admin Panel: The
/mcp-serverspage in the Filament admin panel provides a UI for managing and monitoring servers.
Adding New Servers
- Create the Server:
- For a Laravel Server, create a new server class and register it.
- For a Node.js Server, create a new project, implement the server logic, and add a build process.
- Register in Database: Add an entry for the new server in the
mcp_serverstable, defining its name, command, and other settings. - Associate with Tenant: Ensure the server is associated with the correct
tenant_idand is marked asenabled.
