Perplexity App with MATLAB MCP Core Server and FileSystem server

Duncan Carlsmith on 30 Dec 2025 at 1:59

Introduction
Experiments with Claude code and MATLAB MCP Core Server describes how to link Claude App to a local MATLAB such that Claude can read and write scripts on your file system, operate MATLAB App to test them, collect errors, and iterate, obviating the need for copy-pasting between Claude App and MATLAB. Here I describe how one can achieve essentially the same functionality with Perplexity App, conveniently provide graphical results to Perplexity via screen sharing rather than by saving figures to files, and simultaneously run both Perplexity and Claude Apps thusly connected.
Setup
To allow Perplexity App to read and write files, go to Perplexity Settings-> Connectors-> Browse Connectors and select Filesystem. To add an installed MATLAB MCP, go to Perplexity Settings-> Connectors-> Add Connector. Here, under the Simple tab, you can add any server name, say MATLAB MCP, and a command like /Users/duncancarlsmith/Developer/mcp-servers/matlab-mcp-core-server --matlab-root /Applications/MATLAB_R2025a.app pointing to your MATLAB App. Then, under advanced, add JSON configuration code that points to the location of the matlab-mcp=cos=server such as
{
"args" : [
"--matlab-root",
"/Applications/MATLAB_R2025a.app"
],
"command" : "/Users/duncancarlsmith/Developer/mcp-servers/matlab-mcp-core-server",
"env" : {
},
"useBuiltInNode" : true
}
I append a Perplexity-generated summary of installation steps and gotcha’s.
Example test
In the screenshot below, you see the Perplexity App on the left after it created a test folder and a simple MATLAB test script to plot a function. It has recently changed the value of a code parameter from 2 to 3. The script appears in the MATLAB window along with a figure it produced when run. At the lower right appears Claude App. It has just changed that value to 4, thank you.
Note that Perplexity App’s file system access, like Claude App’s access, is limited to a folder of your choice, but both can issue system commands through MATLAB, so they inherit MATLAB’s privileges. Access can be restricted on a Mac by denying full disk access under Sytem Settings->Privacy and Security->Full Disk Access but that may be insufficient protection. Be careful. Also, when issuing a command to the MCP Server, both require you to review and approve any operation by default and allow you to override that behavior.
Screen sharing with Perplexity
While Perplexity and Claude Apps do not “see” figures and other non-standard output via the MCP server unless saved to files the can access through its file server, Perplexity can in fact see the graphical results of a code and more through screen sharing, as demonstrated in the screenshot below of Perplexity App. At the bottom, below the Perplexity input form field, just to the left of the microphone, is a button enabling Perplexity to accept screen sharing from a selection of windows. I selected the MATLAB App window and the MATLAB Figure window and then asked Perplexity to describe the contents. Images of these wondows appear in the response as well as descriptions of the images. Sweet! No longer must I attempt to provide feedback by attempting to describe such results myself in words.
Appendix
(by Perplexity App)
Perplexity + MATLAB MCP Core Server Setup (macOS, R2025a)
1. Install and locate MATLAB
- Ensure MATLAB R2025a (or your chosen version) is installed under /Applications (e.g., /Applications/MATLAB_R2025a.app).
- From Terminal, verify MATLAB works:
"/Applications/MATLAB_R2025a.app/bin/matlab" -batch "ver"
This should list MATLAB and toolboxes without errors.
2. Fix PATH and shell alias for matlab
- Confirm the shell resolves the correct matlab:
which matlab
- If it is missing or points to an old version (e.g., R2022b), adjust:
export PATH="/Applications/MATLAB_R2025a.app/bin:$PATH"
which matlab
- Clear any stale alias or function:
type matlab
unalias matlab 2>/dev/null
unset -f matlab 2>/dev/null
which matlab
matlab -batch "ver"
Now matlab should invoke R2025a.
3. Place the MATLAB MCP Core Server binary
- Put the matlab-mcp-core-server binary in a convenient folder, e.g.:
/Users/duncancarlsmith/Developer/mcp-servers/matlab-mcp-core-server
- Make it executable:
cd /Users/duncancarlsmith/Developer/mcp-servers
chmod +x matlab-mcp-core-server
4. (Optional sanity check) Run the core server manually
- In Terminal, start the server once to confirm it can see MATLAB:
cd /Users/duncancarlsmith/Developer/mcp-servers
mkdir -p "$HOME/Claude-MATLAB-work"
./matlab-mcp-core-server \
--matlab-root="/Applications/MATLAB_R2025a.app" \
--initial-working-folder="$HOME/Claude-MATLAB-work"
- You should see INFO logs ending with:
"MATLAB MCP Core Server application startup complete".
- This process is not required long term once Perplexity is configured to launch the server itself.
5. Configure the MATLAB MCP connector in Perplexity (Mac app)
- Open Perplexity.
- Go to Settings → Connectors → Add Connector (or edit existing).
- Simple tab:
- Server command:
/Users/duncancarlsmith/Developer/mcp-servers/matlab-mcp-core-server --matlab-root /Applications/MATLAB_R2025a.app
- Advanced tab for the same connector:
{
"args": [
"--matlab-root",
"/Applications/MATLAB_R2025a.app"
],
"command": "/Users/duncancarlsmith/Developer/mcp-servers/matlab-mcp-core-server",
"env": {
},
"useBuiltInNode": true
}
- Save and ensure the connector shows as enabled.
6. Configure the filesystem MCP connector for MATLAB files
- Install the filesystem MCP server (one-time):
npx -y @modelcontextprotocol/server-filesystem /Users/duncancarlsmith/Documents/MATLAB
- In Perplexity Settings → Connectors → Add Connector:
- Name: filesystem (or similar).
- Server command:
npx -y @modelcontextprotocol/server-filesystem /Users/duncancarlsmith/Documents/MATLAB
- This allows Perplexity to list, create, and edit files directly under ~/Documents/MATLAB.
7. Test connectivity from Perplexity
- Start a new thread in Perplexity, with both the MATLAB connector and filesystem connector enabled.
- Verify MATLAB access by listing toolboxes or running a simple command via MCP:
- For example, list the contents of ~/Documents/MATLAB.
- Create a test folder (e.g., PerplexityMCPTest) using MATLAB or filesystem tools and confirm it appears.
8. Create and run a simple MATLAB script via Perplexity
- Using the filesystem connector, create a script in PerplexityMCPTest, e.g. perplexity_mcp_test_script.m:
% PERPLEXITY_MCP_TEST_SCRIPT
% Simple script to plot z = sin(a*x).*cos(b*y) for given parameters a, b.
clear all
% Parameters
a = 2; % frequency in x
b = 3; % frequency in y
% Grid
[x,y] = meshgrid(linspace(-2*pi,2*pi,200));
z = sin(a*x).*cos(b*y);
figure
% Plot
surf(x,y,z,'EdgeColor','none');
colormap turbo;
xlabel('x'); ylabel('y'); zlabel('z');
title(sprintf('Script: z = sin(%g x) cos(%g y)',a,b));
axis tight;
- From Perplexity, call MATLAB via the MCP server to run:
cd('PerplexityMCPTest'); perplexity_mcp_test_script
- In the local MATLAB desktop, a figure window will appear with the plotted surface.
9. Notes on behavior
- Perplexity interacts with MATLAB through the MCP Core Server and does not see the MATLAB GUI or figures; only text output/errors are visible to Perplexity.
- A brief extra MATLAB window may appear and disappear when the core server starts or manages its own MATLAB session; this is expected and separate from your own interactive MATLAB instance.
- File creation and editing from Perplexity occur via the filesystem MCP server and are limited to the configured root (here, ~/Documents/MATLAB).