Skip to content
AgentArmorHQ
CheckReviewIncidentsCommunityPricing
Sign in
CheckReviewIncidentsCommunityPricingSign in
Home / Community / Matlab MCP Server
  • AgentArmorHQ teamTeam4d agoin s/matlab-matlab-mcp-serverNeeds helpSolved

    matlab-mcp-server Live Script output uses legacy syntax (fprintf, subplot) — how to fix?

    Using matlab-mcp-server with MATLAB R2025a's plain-text Live Script format (.m), I prompted the MCP tools to convert my regular scripts into Live Scripts, basing the instructions on github.com/matlab/prompts. The tools iterated several times before producing a correct result, because the generated Live Scripts contained regular-script habits: fprintf/disp output, clear; clc; close all, and subplot instead of tiledlayout. Is there a prompt or configuration that makes the agent generate proper Live Script output on the first pass?

    Originally asked on GitHub: https://github.com/matlab/matlab-mcp-server/issues/10

    4 answers

    • Best answerAgentArmorHQ teamTeam4d ago

      Fixed: this was addressed in matlab-mcp-server v0.4.0 (issue closed COMPLETED; a collaborator stated on 2026-01-13 that it "should be addressed in v0.4.0"). For versions before v0.4.0, the thread offers two workarounds.

      1. A maintainer suggested using the markdown from the "matlab-live-script" skill as guidance: https://github.com/matlab/skills/blob/main/skills/matlab-live-script/SKILL.md (opens external site) ↗
      2. A collaborator pointed out that a rules file for live .m files might be useful: https://github.com/matlab/rules/blob/main/live-script-generation.md (opens external site) ↗

      Why it happens, per the thread: most LLM training data comes from regular MATLAB scripts, so models emit Command Window habits (fprintf, disp, clear, clc, close all) and older plotting APIs (subplot) that don't fit Live Scripts. The team discussed adding "modernization" guidance (tiledlayout over subplot, "" over ', obj.Prop over set/get) to the MATLAB coding guidelines at https://github.com/matlab/rules (opens external site) ↗.

      General advice: if you're on a version before v0.4.0, explicitly include the skill or rules markdown in your prompt and ask for tiledlayout instead of subplot in the same instruction.

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What a GitHub user tried on GitHub (Outcome unclear)

      Prompted the MCP server with "turn the scripts into live scripts, inspiring from https://github.com/matlab/prompts (opens external site) ↗ and store them in a dedicated folder". The thread shows the tools iterating a few times before getting the result right.

      Source: https://github.com/matlab/matlab-mcp-server/issues/10 (opens external site) ↗

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @nothans tried on GitHub (Outcome unclear)

      A maintainer suggested using the markdown from the matlab-live-script skill at https://github.com/matlab/skills/blob/main/skills/matlab-live-script/SKILL.md (opens external site) ↗ as guidance for the agent.

      Source: https://github.com/matlab/matlab-mcp-server/issues/10#issuecomment-3553962554 (opens external site) ↗

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @agoldsbo tried on GitHub (Outcome unclear)

      A collaborator pointed to the rules file for live m files at https://github.com/matlab/rules/blob/main/live-script-generation.md (opens external site) ↗ as potentially useful for generation.

      Source: https://github.com/matlab/matlab-mcp-server/issues/10#issuecomment-3563704468 (opens external site) ↗

      Did this work for you?

    Add your answer or comment

See Matlab MCP Server, its grade and setup notesCheck this tool before you install

Related questions

  • How can I make MATLAB start on-demand with matlab-mcp-server instead of at Claude.ai startup?
  • How do I make the MATLAB MCP server follow MathWorks coding guidelines?
  • MCP error -32002: Resource not found for guidelines://plaintext-live-code in matlab-mcp-server
  • How to run matlab-mcp-server in headless/nodesktop mode?
  • How to run matlab-mcp-server headless without opening the MATLAB desktop?

Product

  • Check
  • Add-on Review
  • MCP & Skills directory
  • Compare tools
  • Docs
  • Pricing

Resources

  • Incidents
  • Guides
  • Newsletter
  • Example report
  • Community

Company

  • About
  • Contact
  • Free for open-source maintainers

Legal

  • Terms
  • Privacy
  • Refunds
  • Acceptable use

New grades, risk notes and incidents, in plain English.

We'll only use your email to send the newsletter. Unsubscribe anytime from any issue. Privacy

Was this page helpful?

Based on public adoption and transparency signals as of Oct 29, 2026. Our opinion, not a code audit or security guarantee. Always review what a tool can access before you install it.

AgentArmorHQ, by WalouTech

© 2026 Atlas L&S LLC d/b/a WalouTech