MM

matlab/mcp-framework-matlab-production-server

Developer tools
34 stars 11 forks Quality 67 Trend 46BSD-3-Clause

Publish MATLAB functions as MCP tools for AI agents using MATLAB Production Server

Overview

Publish your MATLAB® functions to MATLAB Production Server™ as Model Context Protocol (MCP) tools. This allows AI agents to call your functions, enhancing their capabilities with domain-specific expertise. In addition to this package, you'll need: * MATLAB R2025b or later. * MATLAB Compiler SDK™ compatible with your MATLAB version. * Access to MATLAB Production Server R2022a or later. * An MCP client that does not require streamable HTTP. MCP servers created with this package do not support streamable HTTP or HTTP Server Sent Events (SSE). To make a MATLAB function available to an LLM as an MCP tool you: * Install this package where MATLAB can find it -- and add the top level folder to MATLAB's path. * Build an MCP tool from a MATLAB function * Configure your MCP client to make the tool available to your LLM. Using this add-on requires MATLAB R2025b or later. Install this add-on to MATLAB with the Add-On Explorer: 1.

README

MCP Framework for MATLAB Production Server

Publish MATLAB® functions as Model Context Protocol tools on MATLAB Production Server™. AI agents call your functions, offering the speed, reliability, and domain-specific performance of MATLAB.

Prerequisites

Install

In MATLAB, open the Add-On Explorer (Home tab → Add-Ons) and search for “MCP Framework for MATLAB Production Server.” Select Install.

If you use an AI coding agent, register the build skill so the agent can build and deploy tools on your behalf:

prodserver.mcp.agent.setup

Quick Start

To deploy a function as an MCP tool to an instance of MATLAB Production Server running on localhost:9910, run the following MATLAB code.

% Build an MCP tool from a function — the framework runs your example to determine parameter types
ctf = prodserver.mcp.build("principalStress", ...
    example=@() principalStress([120 -50 80], "max"), ...
    server="http://localhost:9910");

% Verify deployment
prodserver.mcp.ping("http://localhost:9910/principalStress/mcp")

% Call the tool directly
prodserver.mcp.call("http://localhost:9910/principalStress/mcp", ...
    "principalStress", [120 -50 80], "maxShear")

Your function is now available to any MCP client connected to that server. See the Getting Started guide for a complete walkthrough.

Key Features

Documentation: Getting Started | Examples | Guides | Concepts | Reference

License

See license.txt.

Contact

— Copyright 2025-2026 The MathWorks, Inc. —

View this README on GitHub

Install

This server does not publish a one-line install command.

Open the repository installation guide