MCP (Model Context Protocol) is one of the hottest technologies right now. In this video, I’m going to show you what it is, and how it can be used with Business Central. Check out the video:

In this video, Erik demonstrates how to connect an AI model to Business Central using MCP (Model Context Protocol), allowing the AI to query customer data, retrieve images, run reports, and even modify records — all through natural language conversation. He walks through the architecture of MCP, shows live examples using LM Studio with a local model, and reveals how his Advanced Portal Designer app for Business Central serves as the MCP server powering it all.
What is MCP (Model Context Protocol)?
MCP stands for Model Context Protocol, and it’s quickly becoming the standard way for an AI to communicate with external software. The core problem it solves is straightforward: AI models are trained on static data. They don’t inherently know about your customers, your inventory, or your business data. MCP provides a standardized way to extend an AI’s capabilities by giving it access to live software and data.
Think of MCP as a bridge that lets an AI reason about when it needs external information, fetch that information through defined tools, and then incorporate the results into its response.
The Three Components of MCP
MCP architecture consists of three components:
- Host — The application running the AI. In Erik’s demo, this is LM Studio, which allows him to run a small language model (Google’s Gemma) locally on his machine.
- Client — Either built into the host or a separate piece of software the host calls. In this case, Erik uses LM Studio’s built-in MCP client rather than a separate Windows executable.
- Server — The remote MCP server that connects to the actual data source. In this demo, the MCP server is connected to Business Central through Erik’s Advanced Portal Designer app.
The key insight is that MCP is a standard. You could swap out LM Studio for Copilot Studio or any other MCP-compatible host, and it would plug into the same server and use the same tools. The AI doesn’t care what’s behind the MCP server — it just knows what tools are available and how to call them.
Live Demo: Querying Business Central Through Natural Language
Erik demonstrates several interactions where the AI autonomously decides to call Business Central tools:
Finding a Customer by City
When asked “Do we have a customer in Winnipeg?”, the model recognizes it can’t answer this from its training data alone. It discovers a tool called customer_list, passes city: "Winnipeg" as a parameter, and receives a JSON response containing customer 10000 (A. Datum). The AI then formats this into a human-readable answer.
Retrieving a Customer Card
Following up with “Show me the customer card for them”, the model calls a different tool — customer_info — passing the customer number. It returns a nicely formatted markdown customer card with all the relevant details.
Displaying a Customer Photo
Asking “Show me their customer photo” triggers the customer_image tool, which retrieves the image blob from Business Central and displays it directly in the chat.
Mathematical Operations
Erik also demonstrates a divide_two_numbers tool. When asked to divide a complex number, the model — rather than attempting unreliable mental math — delegates to the tool and returns the precise result. This illustrates that MCP tools aren’t limited to data retrieval; they can perform any operation.
Modifying Data
Perhaps most impressively, Erik asks the AI to “Change A. Datum’s credit limit to 2001.” The model calls the set_credit tool, passing the customer number and new limit. Jumping into Business Central confirms the credit limit was indeed updated to 2001. This shows MCP isn’t just read-only — it can execute write operations too.
Running a Report
When asked “What’s our best-selling item?”, the model calls item_top_10, which is actually the Inventory Top 10 report exposed as an MCP tool. Despite the report returning a messy JSON payload, the AI parses through it and identifies item 1999 — the Atlanta Whiteboard Base — as the top seller. A follow-up request for the item picture triggers the item_picture tool, which retrieves and displays the whiteboard image.
How the MCP Server is Configured
On the LM Studio side, configuration is minimal. There’s an mcp.json file where you specify the URL to the remote MCP server and an API key:
{
"url": "https://your-mcp-server-url",
"key": "your-api-key"
}
LM Studio then discovers the available tools from the server and presents them to the model. In Erik’s setup, the available tools include:
- customer_list — Returns a JSON list of customers with optional city filter
- customer_info — Returns detailed customer card data
- customer_image — Returns the customer’s photo as a blob
- item_top_10 — Runs the Inventory Top 10 report
- item_picture — Returns an item’s image
- set_credit — Updates a customer’s credit limit
- divide_two_numbers — A simple calculation tool
- vendor_list — Returns vendor data
Inside Business Central: Advanced Portal Designer as MCP Host
The MCP server functionality is powered by Erik’s Advanced Portal Designer app, which is available on AppSource. Originally built for creating web portals (customer portals, vendor portals, shipping portals, etc.), Erik realized while building MCP components from scratch that he was essentially rebuilding what Advanced Portal Designer already provided. So he expanded the app to also serve as an MCP host.
Each tool is configured within Business Central. For example, the customer_list tool:
- Is defined as a web service-like endpoint that returns customer data as JSON
- Has columns defined for the output
- Is flagged as “exposed” for MCP
- Includes a description for the AI: “Get a JSON based list of all customers”
- Defines optional parameters (e.g.,
city) with descriptions like “Filter to limit the list to only customers from a certain city. Accepts asterisk for wildcards. Always prefix with @.”
The divide_two_numbers tool demonstrates the scripting capability. It’s implemented as an AL-based script within Advanced Portal Designer:
- Takes two parameters (always transferred as text)
- Divides the two numbers
- Outputs the result as return text
The set_credit tool similarly uses a script that takes a customer number and a credit limit, evaluates the value into the Credit Limit field, modifies the customer record, and reports success back to the model.
For the item_top_10 report, no special coding was required — the report is simply exposed as an MCP tool. Parameters could be added (e.g., date ranges that map to the report’s request page), but even without them it works out of the box.
The Source Code Skeleton
Erik also shares a basic AL extension skeleton that hints at the building blocks involved in working with Business Central agents and integrations:
namespace DefaultPublisher.Agents;
using Microsoft.Sales.Customer;
using System.Utilities;
using System.Agents;
pageextension 50100 CustomerListExt extends "Customer List"
{
trigger OnOpenPage();
var
Ref: RecordRef;
TB: Codeunit "Temp Blob";
FR: FieldRef;
InS: InStream;
An: Text;
begin
ClientType::
end;
}
This page extension references the System.Agents namespace alongside familiar types like RecordRef, FieldRef, and Temp Blob — the fundamental building blocks for dynamically accessing records, handling binary data (like images), and working with the new agent capabilities in Business Central’s application platform version 26.0.
Why MCP Matters for Business Central
The significance of MCP goes beyond simple demos. Consider the possibilities:
- Copilot Studio agents that need to access Business Central data, photos, or perform operations can use MCP as their connection layer
- Any MCP-compatible AI host can connect to the same server — swap LM Studio for Claude Desktop, Copilot Studio, or any future tool
- Security is built in — Advanced Portal Designer already has a comprehensive security model for users and permissions, which carries over to MCP access
- No custom API development needed — existing portal configurations, reports, and scripts can be exposed as MCP tools with minimal effort
Erik notes that his separate AI Accountant app takes a different approach since everything runs inside Business Central, but for scenarios where external AI systems need to interact with Business Central, MCP provides a clean, standardized solution.
Summary
MCP (Model Context Protocol) is emerging as the standard for connecting AI models to external software. In this demonstration, Erik showed how a locally-running AI model can query customers, retrieve images, run reports, and modify records in Business Central — all through natural language. The MCP server, powered by Advanced Portal Designer, exposes Business Central functionality as discoverable tools that any MCP-compatible AI host can use. Whether you’re building agents in Copilot Studio or experimenting with local models, MCP provides a standardized, secure bridge between AI and your business data.