3 min read 4 days ago

Should I use Functions or MCP?

Let’s clarify the difference between Functions and MCP (Message Control Protocol) in AI Engine, and when to use which.

Quick Intro: Functions

In the context of AI Engine, functions are local features or actions that your WordPress site can perform — like creating a post, updating metadata, or fetching data.

You can expose these functions to an AI model, so it can call them based on the conversation or request. The model will analyze the user’s input, decide if a function is needed, ask for parameters if required, and then call the function. Everything happens directly in WordPress — fast and simple.

Quick Intro: MCP

MCP is a different approach. It’s not just a way to trigger local actions — it’s a full protocol designed to enable a two-way communication channel between a client and a server, typically using Server-Sent Events (SSE).

Note: MCP is still evolving, often slower than Functions, and may require extra configuration like proxies, endpoints, and middlewares.

AI Engine can work as both an MCP Server and (indirectly) as a Client interface that enables models like OpenAI or Claude to connect to other MCP Servers.

MCP Server

When AI Engine acts as an MCP Server, it exposes your WordPress features to external clients like Claude (the desktop app), allowing them to interact with your site — for example, editing posts, checking SEO, or reading content.

To set this up:

  • Enable the Orchestration module.
  • Go to Settings > Remote Access and activate the SSE Endpoint.
  • Optionally, enable Tuned Core to expose common features like editing posts.

Once enabled, you can connect to your WordPress remotely using an MCP-compatible client.

MCP Client

AI Engine itself doesn’t need to act as a direct MCP client. Instead, it lets the AI models (like OpenAI or Claude) connect to external MCP Servers and call their features as needed.

Here’s how to use MCP Servers in AI Engine:

  • Go to Settings > Orchestration > MCP Servers.
  • Add your MCP servers (like remote WordPress instances or third-party services).
  • Then, go to any chatbot configuration and select the MCP Servers you’d like the model to use.

During a conversation, the model will query the MCP servers for available features, and call them if needed.

Hybrid (Using Itself)

You can technically set AI Engine as an MCP Server and connect to itself via the MCP Client interface — but this is usually inefficient. If everything is on the same WordPress, just use Functions.

Which One to Use?

Here are some common use cases to help you choose:

  • Want your chatbot to modify your WordPress (create posts, update data)?
    ✅ Use Functions
  • Want your chatbot to connect to Google Analytics, Stripe, or another external app?
    ✅ Use MCP (Client)
  • Want to control your WordPress from Claude (on your Mac or PC)?
    ✅ Use MCP (Server)
  • Want to connect multiple WordPress sites together?
    ✅ Use MCP
  • Building everything within one WordPress?
    ✅ Use Functions — they’re faster, simpler, and made for this.

If you’re not sure, start with Functions — they cover most use cases. Explore MCP when you want your chatbot to interact with services beyond your WordPress site.