Creates and deploys MCP tools from MATLAB functions to MATLAB Production Server using the MCP Framework support package. Guides users through prerequisites, parsing function paths and server addresses, and building archives.
Ships in mcp-framework. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are helping the user create and deploy MCP tools from MATLAB functions to a MATLAB Production Server using the MCP Framework for MATLAB Production Server support package.
Before doing anything else, verify these prerequisites are met:
which matlab. Alternatively, check if the MATLAB MCP Server is available as a configured MCP tool.matlab -batch just to check for the support package.If MATLAB is not available, report clearly what is needed and stop. Do NOT attempt to download, install, or otherwise acquire MATLAB or the support package.
Prefer using the MATLAB MCP Server if it is available as a configured MCP tool. Fall back to matlab -batch "..." on the command line otherwise.
Extract the following from the user's request:
.m files (required)localhost:9910<scheme>://<host>:<port>/<archiveName>/mcp. If the user doesn't give one, use the name of the first function. A server holds one archive per name, so Step 5.0 checks that the name is free before deploying. An archive name may contain only letters (A-Z, a-z), digits and _, and may not be Framework: build refuses any other name. If the user's name breaks this rule, say so and ask for another before going on.myFunc(3) or cleanSignal(noisy, 60) (optional). The build runs it to learn the types and sizes of the inputs and outputs, which a function with no arguments block needs. Use it exactly as the user wrote it. Never write a sample call yourself, not even from the user's description of the function or its arguments: made-up values can give the wrong types or sizes, and those end up in the tool's published schema. With several functions, one sample call per function.http (default) or https if the user specifies itapp/dist/mcp-app.html from a Vite build. Don't build or write the view: use the file the user names."add a resource at config://settings with the contents from settings.json""create the resource data://AuthorName with string value 'Mr. Author'""add the following resources: config://settings,settings.json, data://AuthorName,'Mr. Author'"For resources, construct a MATLAB struct array where each element has:
uri: the resource URI (e.g. "config://settings")contents: the resource contents — either a file path to read from or a literal string valueFor all file paths provided by the user — including function .m files and any optional additional files — verify that each filename matches a file on disk exactly, including case. Windows filesystems are case-insensitive, so a path may resolve even when the case is wrong — but MATLAB function names are case-sensitive and must match the file exactly, and additional files must also be referenced by their exact on-disk name to avoid deployment issues.
For each path:
ls "<full_path>" &>/dev/null
<path>" and stop.ls "<parent_dir>" | grep -Fx "<filename>"
grep -Fx finds no match, the file exists with different case. Find the actual name:
ls "<parent_dir>" | grep -iFx "<filename>"
Then ask the user: "The file on disk is named <actual_name>, but you specified <user_name>. Would you like to use <actual_name> instead?"
Wait for the user to confirm before proceeding. If they decline, stop.grep -Fx succeeds, the case matches — proceed.Only continue to Step 4 once all file paths have been validated.
The steps below use these absolute paths:
<project-root>: the directory containing the +prodserver package (the root of this repository).<source-dir>: the directory containing the function's .m file. With several functions, the directory of the first one.<deploy-folder>: <source-dir>/deploy. The build writes everything it generates here: the CTF, wrappers and signature files, and the build manifest.Never put the function's .m file in <deploy-folder>. The build copies the function into its output folder, so a function already there fails the build with Source and destination locations must be unique.
Skip this step if the user requested a force rebuild.
Before preparing the working directory, check whether a rebuild is necessary by comparing current inputs against a stored build manifest.
Check for an existing manifest in <deploy-folder>:
cat "<deploy-folder>/.mcp-build-manifest.json" 2>/dev/null
If the manifest does not exist, proceed to Step 5 (full build).
Compute SHA-256 hashes for all source files, additional files and the MCP App view file:
sha256sum "<source.m>" | cut -d' ' -f1
For the framework fingerprint, hash all the framework .m files in the framework this build will use. Run this command in <project-root> (the directory containing the +prodserver package):
cd "<project-root>" && find +prodserver server/tools -name "*.m" -print0 | sort -z | xargs -0 sha256sum | sort -k2 | sha256sum | cut -d' ' -f1
If the command fails (e.g. the framework root no longer exists), treat as "framework changed" and proceed to full build. Compare the result with framework_fingerprint in the manifest. Step 5 records the value from this same command, so the two match whenever the framework is unchanged. The value depends on the platform and line endings, so it is compared only with manifests written on the same machine.
If you go straight to Step 5 (no manifest, or a forced rebuild), run this command anyway: Step 5 records its value.
Compare current values against the manifest. The build inputs are the source hashes, the additional files and their hashes, the MCP App view file and its hash (manifest.app), the framework fingerprint, and the sample calls (manifest.examples). A file added or removed counts as a change. Take the first row that applies:
| Current vs Manifest | Action |
|---|---|
| Any build input differs | Full rebuild — proceed to Step 5 |
| All build inputs match AND server address or archive name changed | Deploy only — upload existing CTF to the server (Step 5b) |
| All build inputs match AND server address and archive name match | Skip — report "Build is up to date. No changes detected." and jump to Step 7 (register/verify only) |
Even when all hashes match, verify that the CTF file still exists:
ls "<deploy-folder>/<archiveName>.ctf" &>/dev/null
If the CTF is missing, proceed to full build regardless of hash match.
For the "skip" path, verify the archive is actually deployed and responding. Every archive has a /ping route that answers a plain GET with pong, whatever MCP protocol revision the client uses. Do not send a JSON-RPC ping to the /mcp endpoint: without a session or _meta the server rejects it with 400.
curl -s -o /dev/null -w "%{http_code}" "<scheme>://<host>:<port>/<archiveName>/ping"
If the server returns a non-2xx status, switch to the deploy only path (Step 5b).
If curl fails entirely (connection refused), report that the build is up to date but the server is unreachable, and suggest the user check that MATLAB Production Server is running.
A MATLAB Production Server holds one archive per name, and deploying replaces an archive of the same name without warning, even one that someone else deployed. Before any deploy (a full build here, or Step 5b), check whether the server already has an archive with this name:
curl -s -o /dev/null -w "%{http_code}" "<scheme>://<host>:<port>/<archiveName>/ping"
manifest.server) and this archive name (manifest.archive). If it does, continue: this deploy updates it. Otherwise, stop and ask the user: "The server already has an archive named <archiveName>, which this project didn't deploy. Deploying would replace it. Replace it, or use another name, such as <user>_<archiveName>?" If they choose another name, use it as <archiveName> from here on, and run this check again.If curl can't connect at all, continue: the build reports the unreachable server.
Construct and execute a single matlab -batch call that combines the prerequisite check with the build, deploy, and manifest generation. This avoids paying the MATLAB startup cost multiple times.
Arguments to prodserver.mcp.build:
fcn: Function name(s) derived from the file path(s) (filename without .m extension)archive: <archiveName>, always, even when it is the function nameserver: Full server URL as "<scheme>://<host>:<port>" (default scheme is http)files: String array of additional file paths (only if user specified them)resource: Struct array of resources (only if user specified them)app: The absolute path to the MCP App view's HTML file, only if the user gave one. One view serves every tool in the archive.example: The user's sample call as a function handle, example=@() <sample call>, only if the user gave one. With several functions, a cell array with one handle per function: example={@() fcn1(...), @() fcn2(...)}. Write it into a script file (see below): it usually holds quotes.folder: <deploy-folder>, never <source-dir> itselfImportant:
wrapper argument — accept the framework's default behaviorcd into <source-dir> before calling build, so that MATLAB finds the function. With several functions in different directories, also addpath each of the other directories. Don't copy or move the function files.deploy subfolder for build output: pass folder='<deploy-folder>'. The build writes the generated wrappers there too, wherever MATLAB's current folder is. This keeps generated artifacts (CTF, wrappers, signatures) separate from the source .m files.matlab -batch scripts MUST be absolute paths — after cd changes the working directory, relative paths will resolve incorrectly. This applies to the cd target, the folder argument, file paths, and any other path references.addpath the project root (the directory containing the +prodserver package folder) before cd-ing into <source-dir>. Without this, cd moves away from the package and MATLAB can no longer resolve prodserver.mcp.* functions..m file and run it with matlab -batch "run('<path>')". This avoids shell quoting issues that silently corrupt double-quoted MATLAB strings in -batch mode on Windows.Before running the MATLAB build command, prepare <deploy-folder>:
<deploy-folder> if it does not exist.<deploy-folder>. For each function foo, remove <deploy-folder>/fooMCP.m if it exists. The wrapper name is case-sensitive: for function foo the wrapper is fooMCP.m, for Foo it is FooMCP.m. Remove only the exact match.<deploy-folder>, such as <deploy-folder>/foo.m. A build copies a function that needs no wrapper there, and the next build copies it again.This ensures the framework generates fresh wrappers without conflicts from stale cached files. Don't copy the function files anywhere: the build reads them from <source-dir>.
The script uses section markers (===STEP:name===, ===OK:name===, ===FAIL:name===) so that you can parse the output and identify exactly which stage failed:
matlab -batch "
addpath('<project-root>');
fprintf('===STEP:prerequisite===\n');
try
help prodserver.mcp.build;
fprintf('===OK:prerequisite===\n');
catch e
fprintf('===FAIL:prerequisite===\n%s\n', e.message);
exit(1);
end
fprintf('===STEP:build===\n');
try
cd('<source-dir>');
[ctf, endpoint] = prodserver.mcp.build('<fcnName>', archive='<archiveName>', server='<scheme>://<host>:<port>', folder='<deploy-folder>');
fprintf('===OK:build===\n');
fprintf('CTF: %s\nEndpoint: %s\n', ctf, endpoint);
catch e
fprintf('===FAIL:build===\n%s\n%s\n', e.identifier, e.message);
exit(1);
end
fprintf('===STEP:manifest===\n');
try
fw_root = prodserver.mcp.internal.packageFolder();
fw_fp = '<framework-fingerprint>';
manifest = struct();
manifest.version = 1;
manifest.timestamp = string(datetime('now', 'TimeZone', 'UTC', 'Format', 'yyyy-MM-dd''T''HH:mm:ss''Z'''));
manifest.server = '<scheme>://<host>:<port>';
manifest.archive = '<archiveName>';
manifest.framework_root = fw_root;
manifest.framework_fingerprint = fw_fp;
manifest.sources = struct('<fcnName>', '<source-hash>');
manifest.additional_files = struct('file', {}, 'hash', {});
manifest.app = struct('file', {}, 'hash', {});
manifest.examples = <sample-calls>;
manifest.outputs = struct('ctf', ctf, 'endpoint', endpoint);
manifest.deployed = true;
json = jsonencode(manifest, PrettyPrint=true);
writelines(json, fullfile('<deploy-folder>', '.mcp-build-manifest.json'));
fprintf('===OK:manifest===\n');
catch e
fprintf('===FAIL:manifest===\n%s\n', e.message);
end
"
Where <project-root>, <source-dir> and <deploy-folder> are the absolute paths described in Folders, <archiveName> is the archive name checked in Step 5.0, <source-hash> is the SHA-256 hash computed in Step 4 (or computed fresh if this is the first build), <framework-fingerprint> is the framework fingerprint computed with the Step 4.2 command, and <sample-calls> is the cell array of the user's sample calls as text ({} if none). If the user gave a sample call, add it to the build call as example=@() <sample call>, for example:
[ctf, endpoint] = prodserver.mcp.build('myFunc', example=@() myFunc(3), archive='<archiveName>', server='<scheme>://<host>:<port>', folder='<deploy-folder>');
Manifest notes:
sources struct uses function names as field names and their SHA-256 hashes as values. Function names are always valid MATLAB identifiers, so this is safe.additional_files field is a struct array with file and hash fields. Each element stores the original filename (preserving exact case and special characters) and its SHA-256 hash. When there are no additional files, use an empty struct array: struct('file', {}, 'hash', {}). When there are files, build the array element-by-element:
manifest.additional_files(1).file = 'data.mat';
manifest.additional_files(1).hash = '<hash1>';
manifest.additional_files(2).file = 'config.json';
manifest.additional_files(2).hash = '<hash2>';
app field has the same form as additional_files: one element for the view file, if there is one, or an empty struct array.examples field is a cell array of the user's sample calls, as text, exactly as written, such as {'myFunc(3)'}. With none, {}. Step 4.3 compares it with the sample calls of the next build.===FAIL:manifest=== is non-fatal — the build succeeded even if the manifest write fails. Report a warning but do not retry.After the command completes, parse the output:
===FAIL:prerequisite=== is present → the MCP Framework support package is not installed or not on the path. Report this to the user and stop.===FAIL:build=== is followed by the identifier prodserver:mcp:InputArgBlockRequired or prodserver:mcp:OutputArgBlockRequired → the function has no arguments block, so the build needs a sample call to learn its types. Don't suggest adding an arguments block, and don't make up a call. Ask the user: "<fcnName> has no arguments block, so the build needs a sample call to learn the types of its inputs and outputs. Give me a call of <fcnName> with typical arguments, such as <fcnName>(...)." Then build again with that call as example (Step 2), and record it in the manifest. If the user would rather add an arguments block to the function, wait until they have, then build again.===FAIL:build=== is followed by the identifier prodserver:mcp:ReservedToolName → the function is named uri2json or read_mcp_resource, the names of the framework's own tools. Report this and stop: the user needs to rename the function.===OK:prerequisite=== is present but ===FAIL:build=== is present → the build failed. The identifier and error message follow the FAIL marker. Diagnose and report.===OK:build=== is present → extract the CTF path and endpoint URL from the lines following the OK marker.===FAIL:manifest=== is present → warn the user that the build manifest could not be written (next build will not be incremental).The build is successful only when both of the following are true:
matlab -batch command exits with code 0 and output contains ===OK:build===..ctf archive must have a modification timestamp strictly later than the generated MCP wrapper file (<fcnName>MCP.m). If the wrapper exists but the CTF is older or missing, the build did not complete — a stale CTF from a previous build is not acceptable.If either criterion fails, diagnose and retry the build (e.g., delete stale artifacts and rebuild from scratch).
If the build succeeds but the deploy step within build fails (e.g., cannot find the archive), deploy separately using prodserver.mcp.deploy with the full path to the generated .ctf file. Include this as a second try/catch block appended to the script:
fprintf('===STEP:deploy===\n');
try
endpoint = prodserver.mcp.deploy('<deploy-folder>/<archiveName>.ctf', '<host>', <port>, scheme='<scheme>');
fprintf('===OK:deploy===\n');
fprintf('Endpoint: %s\n', endpoint);
catch e
fprintf('===FAIL:deploy===\n%s\n', e.message);
exit(1);
end
When the incremental check determines only the server address or archive name changed, skip the full build and deploy the existing CTF directly. First run the check in Step 5.0: the server may already have an archive by that name. The CTF isn't rebuilt, so <sample-calls> in the manifest below are the ones the existing manifest records.
matlab -batch "
addpath('<project-root>');
fprintf('===STEP:deploy===\n');
try
endpoint = prodserver.mcp.deploy('<deploy-folder>/<archiveName>.ctf', '<host>', <port>, scheme='<scheme>');
fprintf('===OK:deploy===\n');
fprintf('Endpoint: %s\n', endpoint);
catch e
fprintf('===FAIL:deploy===\n%s\n', e.message);
exit(1);
end
fprintf('===STEP:manifest===\n');
try
fw_root = prodserver.mcp.internal.packageFolder();
fw_fp = '<framework-fingerprint>';
manifest = struct();
manifest.version = 1;
manifest.timestamp = string(datetime('now', 'TimeZone', 'UTC', 'Format', 'yyyy-MM-dd''T''HH:mm:ss''Z'''));
manifest.server = '<scheme>://<host>:<port>';
manifest.archive = '<archiveName>';
manifest.framework_root = fw_root;
manifest.framework_fingerprint = fw_fp;
manifest.sources = struct('<fcnName>', '<source-hash>');
manifest.additional_files = struct('file', {}, 'hash', {});
manifest.app = struct('file', {}, 'hash', {});
manifest.examples = <sample-calls>;
manifest.outputs = struct('ctf', '<deploy-folder>/<archiveName>.ctf', 'endpoint', endpoint);
manifest.deployed = true;
json = jsonencode(manifest, PrettyPrint=true);
writelines(json, fullfile('<deploy-folder>', '.mcp-build-manifest.json'));
fprintf('===OK:manifest===\n');
catch e
fprintf('===FAIL:manifest===\n%s\n', e.message);
end
"
In all examples below, <project-root>, <source-dir> and <deploy-folder> are the absolute paths described in Folders, and <archiveName> is the archive name.
Single function, no extras:
matlab -batch "addpath('<project-root>'); fprintf('===STEP:prerequisite===\n'); try, help prodserver.mcp.build; fprintf('===OK:prerequisite===\n'); catch e, fprintf('===FAIL:prerequisite===\n%s\n', e.message); exit(1); end; fprintf('===STEP:build===\n'); try, cd('<source-dir>'); [ctf, endpoint] = prodserver.mcp.build('fcnName', archive='<archiveName>', server='http://localhost:9910', folder='<deploy-folder>'); fprintf('===OK:build===\n'); fprintf('CTF: %s\nEndpoint: %s\n', ctf, endpoint); catch e, fprintf('===FAIL:build===\n%s\n%s\n', e.identifier, e.message); exit(1); end; fprintf('===STEP:manifest===\n'); try, fw_root = prodserver.mcp.internal.packageFolder(); fw_fp = '<framework-fingerprint>'; manifest = struct(); manifest.version = 1; manifest.timestamp = string(datetime('now', 'TimeZone', 'UTC', 'Format', 'yyyy-MM-dd''T''HH:mm:ss''Z''')); manifest.server = 'http://localhost:9910'; manifest.archive = '<archiveName>'; manifest.framework_root = fw_root; manifest.framework_fingerprint = fw_fp; manifest.sources = struct('fcnName', '<hash>'); manifest.additional_files = struct('file', {}, 'hash', {}); manifest.app = struct('file', {}, 'hash', {}); manifest.examples = {}; manifest.outputs = struct('ctf', ctf, 'endpoint', endpoint); manifest.deployed = true; json = jsonencode(manifest, PrettyPrint=true); writelines(json, fullfile('<deploy-folder>', '.mcp-build-manifest.json')); fprintf('===OK:manifest===\n'); catch e, fprintf('===FAIL:manifest===\n%s\n', e.message); end"
With additional files:
matlab -batch "addpath('<project-root>'); fprintf('===STEP:prerequisite===\n'); try, help prodserver.mcp.build; fprintf('===OK:prerequisite===\n'); catch e, fprintf('===FAIL:prerequisite===\n%s\n', e.message); exit(1); end; fprintf('===STEP:build===\n'); try, cd('<source-dir>'); [ctf, endpoint] = prodserver.mcp.build('fcnName', archive='<archiveName>', server='http://localhost:9910', folder='<deploy-folder>', files=[""data.mat"", ""config.json""]); fprintf('===OK:build===\n'); fprintf('CTF: %s\nEndpoint: %s\n', ctf, endpoint); catch e, fprintf('===FAIL:build===\n%s\n%s\n', e.identifier, e.message); exit(1); end; fprintf('===STEP:manifest===\n'); try, fw_root = prodserver.mcp.internal.packageFolder(); fw_fp = '<framework-fingerprint>'; manifest = struct(); manifest.version = 1; manifest.timestamp = string(datetime('now', 'TimeZone', 'UTC', 'Format', 'yyyy-MM-dd''T''HH:mm:ss''Z''')); manifest.server = 'http://localhost:9910'; manifest.archive = '<archiveName>'; manifest.framework_root = fw_root; manifest.framework_fingerprint = fw_fp; manifest.sources = struct('fcnName', '<hash>'); manifest.additional_files(1).file = 'data.mat'; manifest.additional_files(1).hash = '<hash1>'; manifest.additional_files(2).file = 'config.json'; manifest.additional_files(2).hash = '<hash2>'; manifest.app = struct('file', {}, 'hash', {}); manifest.examples = {}; manifest.outputs = struct('ctf', ctf, 'endpoint', endpoint); manifest.deployed = true; json = jsonencode(manifest, PrettyPrint=true); writelines(json, fullfile('<deploy-folder>', '.mcp-build-manifest.json')); fprintf('===OK:manifest===\n'); catch e, fprintf('===FAIL:manifest===\n%s\n', e.message); end"
With resources:
matlab -batch "addpath('<project-root>'); fprintf('===STEP:prerequisite===\n'); try, help prodserver.mcp.build; fprintf('===OK:prerequisite===\n'); catch e, fprintf('===FAIL:prerequisite===\n%s\n', e.message); exit(1); end; fprintf('===STEP:build===\n'); try, cd('<source-dir>'); r(1).uri='config://settings'; r(1).contents='settings.json'; [ctf, endpoint] = prodserver.mcp.build('fcnName', archive='<archiveName>', server='http://localhost:9910', folder='<deploy-folder>', resource=r); fprintf('===OK:build===\n'); fprintf('CTF: %s\nEndpoint: %s\n', ctf, endpoint); catch e, fprintf('===FAIL:build===\n%s\n%s\n', e.identifier, e.message); exit(1); end; fprintf('===STEP:manifest===\n'); try, fw_root = prodserver.mcp.internal.packageFolder(); fw_fp = '<framework-fingerprint>'; manifest = struct(); manifest.version = 1; manifest.timestamp = string(datetime('now', 'TimeZone', 'UTC', 'Format', 'yyyy-MM-dd''T''HH:mm:ss''Z''')); manifest.server = 'http://localhost:9910'; manifest.archive = '<archiveName>'; manifest.framework_root = fw_root; manifest.framework_fingerprint = fw_fp; manifest.sources = struct('fcnName', '<hash>'); manifest.additional_files = struct('file', {}, 'hash', {}); manifest.app = struct('file', {}, 'hash', {}); manifest.examples = {}; manifest.outputs = struct('ctf', ctf, 'endpoint', endpoint); manifest.deployed = true; json = jsonencode(manifest, PrettyPrint=true); writelines(json, fullfile('<deploy-folder>', '.mcp-build-manifest.json')); fprintf('===OK:manifest===\n'); catch e, fprintf('===FAIL:manifest===\n%s\n', e.message); end"
Multiple functions:
matlab -batch "addpath('<project-root>'); fprintf('===STEP:prerequisite===\n'); try, help prodserver.mcp.build; fprintf('===OK:prerequisite===\n'); catch e, fprintf('===FAIL:prerequisite===\n%s\n', e.message); exit(1); end; fprintf('===STEP:build===\n'); try, cd('<source-dir>'); [ctf, endpoint] = prodserver.mcp.build([""fcn1"", ""fcn2""], archive='<archiveName>', server='http://localhost:9910', folder='<deploy-folder>'); fprintf('===OK:build===\n'); fprintf('CTF: %s\nEndpoint: %s\n', ctf, endpoint); catch e, fprintf('===FAIL:build===\n%s\n%s\n', e.identifier, e.message); exit(1); end; fprintf('===STEP:manifest===\n'); try, fw_root = prodserver.mcp.internal.packageFolder(); fw_fp = '<framework-fingerprint>'; manifest = struct(); manifest.version = 1; manifest.timestamp = string(datetime('now', 'TimeZone', 'UTC', 'Format', 'yyyy-MM-dd''T''HH:mm:ss''Z''')); manifest.server = 'http://localhost:9910'; manifest.archive = '<archiveName>'; manifest.framework_root = fw_root; manifest.framework_fingerprint = fw_fp; manifest.sources = struct('fcn1', '<hash1>', 'fcn2', '<hash2>'); manifest.additional_files = struct('file', {}, 'hash', {}); manifest.app = struct('file', {}, 'hash', {}); manifest.examples = {}; manifest.outputs = struct('ctf', ctf, 'endpoint', endpoint); manifest.deployed = true; json = jsonencode(manifest, PrettyPrint=true); writelines(json, fullfile('<deploy-folder>', '.mcp-build-manifest.json')); fprintf('===OK:manifest===\n'); catch e, fprintf('===FAIL:manifest===\n%s\n', e.message); end"
After a successful build and deploy (or deploy-only), verify the deployment using a single matlab -batch call that combines ping and list. Use a 2-minute timeout for verification. Only use a longer timeout if the user explicitly requests one.
Skip this step if the incremental check determined the build is up to date AND the server responded to the curl check in Step 4.5.
matlab -batch "
addpath('<project-root>');
fprintf('===STEP:ping===\n');
try
ok = prodserver.mcp.ping('<scheme>://<host>:<port>/<archiveName>/mcp');
if ~ok, error('prodserver:mcp:pingFailed', 'Ping returned false'); end
fprintf('===OK:ping===\n');
catch e
fprintf('===FAIL:ping===\n%s\n', e.message);
exit(1);
end
fprintf('===STEP:list===\n');
try
tools = prodserver.mcp.list('<scheme>://<host>:<port>/<archiveName>/mcp', 'Tool');
for i=1:numel(tools)
fprintf('%s - %s\n', tools{i}.name, tools{i}.description);
end
fprintf('===OK:list===\n');
catch e
fprintf('===FAIL:list===\n%s\n', e.message);
exit(1);
end
"
Where <project-root> is the same absolute path used in Step 5.
===FAIL:ping=== is present → the server is not responding. Retry once after 10 seconds (re-run the entire combined verification call). If it still fails, stop immediately — do NOT continue to Step 7 or Step 8.===OK:ping=== is present but ===FAIL:list=== is present → the archive loaded but tools couldn't be enumerated. Report the error message.===OK:list=== is present → extract tool names and descriptions from the lines between ===OK:ping=== and ===OK:list===.If verification fails after the retry, report an error to the user explaining that the MCP server is not responding, provide the endpoint URL, and suggest they check that:
After successful deployment verification, register the new MCP server so the tool is available to Claude.
Register it with Claude Code's own claude mcp commands. Never read or edit Claude Code's configuration files yourself — not ~/.claude.json, not .mcp.json, nothing in CLAUDE_CONFIG_DIR. Claude Code owns them: it may be writing them while it runs, and CLAUDE_CONFIG_DIR can put them somewhere other than your home folder.
<archiveName><scheme>://<host>:<port>/<archiveName>/mcpuser by default. If the user asks for project-level registration, project: Claude Code then writes .mcp.json in the project.claude mcp get <archiveName>
claude mcp add --transport http --scope <scope> <archiveName> <URL>
<archiveName> is already registered in Claude Code for <other URL>. Replace it with <URL>?" Only if they agree, replace it:
claude mcp remove --scope <scope> <archiveName>
claude mcp add --transport http --scope <scope> <archiveName> <URL>
If they decline, leave the registration alone and tell them the command to run later.For example, after deploying cleanSignal to http://localhost:9910:
claude mcp add --transport http --scope user cleanSignal http://localhost:9910/cleanSignal/mcp
If the claude command isn't available, don't register the server any other way. Show the user the claude mcp add command to run themselves.
Report to the user based on which path was taken:
<manifest.timestamp>."--- Copyright 2026 The MathWorks, Inc. ---
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/mcp-framework:mps-mcp-build <function path(s), server address, optional files/resources>from mcp-framework
npx claudepluginhub matlab/mcp-framework-matlab-production-server --plugin mcp-frameworkOther plugins' skills for the same job