Skip to content

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_servers table) 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.

ServerDescriptionKey ToolsImplementation
WordPressProvides comprehensive WordPress site management.create_post, update_post, upload_mediaNode.js App
MauticFull integration with the Mautic marketing automation platform.create_contact, add_contact_to_segmentNode.js App
SEOProvides advanced SEO analysis and content optimization.analyze_seo, check_keyword_rankingsNode.js App
AIOHM KBImports vector data from the AIOHM Knowledge Assistant PRO WP plugin.import_vector_entriesNode.js App
KnowledgebaseCore server for interacting with the platform's internal knowledge.search, get_entryIntegrated PHP
BoostProvides tools for Laravel application introspection.list_routes, get_configIntegrated PHP

Usage in Workflows

You can use any enabled MCP Server as a node within the Workflow Builder.

Adding an MCP Server Node

  1. In the Workflow Builder, click "Add Node".
  2. Select the "MCP Server" button (purple).
  3. Choose the desired server (e.g., "WordPress MCP") from the list.

Configuring an MCP Server Node

  1. Click the new MCP node on the canvas to open the Node Editor.
  2. Node Name: Give the node a descriptive label (e.g., "Publish Article to Blog").
  3. 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

  1. Laravel Servers:

    • Built directly into the main Laravel application.
    • Registered and booted via service providers and routes/ai.php.
    • Example: KnowledgebaseServer.
  2. Node.js Servers:

    • Custom-built, standalone Node.js/TypeScript applications.
    • Each requires its own npm install and npm run build steps.
    • 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-servers page in the Filament admin panel provides a UI for managing and monitoring servers.

Adding New Servers

  1. 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.
  2. Register in Database: Add an entry for the new server in the mcp_servers table, defining its name, command, and other settings.
  3. Associate with Tenant: Ensure the server is associated with the correct tenant_id and is marked as enabled.

Released under the MIT License.