{"id":18918,"date":"2025-11-10T11:02:53","date_gmt":"2025-11-10T16:02:53","guid":{"rendered":"https:\/\/blogs.mathworks.com\/deep-learning\/?p=18918"},"modified":"2025-11-10T15:31:26","modified_gmt":"2025-11-10T20:31:26","slug":"matlab-mcp-servers-to-develop-and-deploy-a-quant-agent","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/deep-learning\/2025\/11\/10\/matlab-mcp-servers-to-develop-and-deploy-a-quant-agent\/","title":{"rendered":"MATLAB MCP servers to develop and deploy a quant agent"},"content":{"rendered":"This Monday, we are releasing the new MCP framework for MATLAB Production Server on GitHub:\r\n<h6><\/h6>\r\n<a href=\"https:\/\/github.com\/matlab\/mcp-framework-matlab-production-server\">https:\/\/github.com\/matlab\/mcp-framework-matlab-production-server<\/a>\r\n<h6><\/h6>\r\n<table style=\"background-color: #e2f0ff;\">\r\n<tbody>\r\n<tr>\r\n<td style=\"width: 120px; padding: 3px; vertical-align: middle;\"><img decoding=\"async\" loading=\"lazy\" class=\"alignleft wp-image-18922\" src=\"https:\/\/blogs.mathworks.com\/deep-learning\/files\/2025\/11\/ljo-150x150.jpg\" alt=\"\" width=\"100\" height=\"100\" \/><\/td>\r\n<td style=\"vertical-align: middle; padding: 3px;\"><strong>Guest Writer: <a href=\"https:\/\/www.linkedin.com\/in\/lawrencejohny\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Lawrence Johny<\/a><\/strong>\r\n<h6><\/h6>\r\nTo demonstrate this new feature, I've collaborated with my dear colleague Lawrence Johny. Lawrence is an application engineer working with our Finance customers, quants, asset managers, and economists in Europe. He <a href=\"https:\/\/www.mathworks.com\/videos\/matlab-copilot-accelerate-robust-model-development-testing-and-validation-1760427192109.html\">presented in September<\/a> how customers in Finance can leverage AI assisted coding, in their software dev workflow, like testing and documentation.<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<h6><\/h6>\r\nBuilding on the <a href=\"https:\/\/blogs.mathworks.com\/deep-learning\/2025\/11\/03\/releasing-the-matlab-mcp-core-server-on-github\/\">previous blog on MATLAB MCP Core Server<\/a> introducing the Model Context Protocol (MCP) \u2013 a standard to integrate into agentic workflows, Lawrence is exploring how to simplify the development and deployment of AI agents with the use of natural language \u2013 no glue code required.\r\n<h6><\/h6>\r\nBefore I let Lawrence dive into the process of developing his<em> quant agent<\/em>, let me demo to you the result of calling his agent from Claude Desktop (<em>I\u2019m not an expert in Finance<\/em>!)\r\n<h6><\/h6>\r\n&nbsp;\r\n<h2>Quant agent in action<\/h2>\r\n&nbsp;\r\n<blockquote>\"Given a 10-year investment horizon, how should portfolio aggressiveness be adjusted each year to achieve the target objective?\"<\/blockquote>\r\n<h6><\/h6>\r\nI asked my quant agent this question in plain English. Within seconds, it simulated scenarios, adjusted aggressiveness dynamically, and returned a plot showing the probability of hitting that goal - without me writing a single line of glue code.\r\n<h6><\/h6>\r\nLet\u2019s look at a simulation of the portfolio of 100 USD with an objective of 200 USD:\r\n<h6><\/h6>\r\n<img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-18921\" src=\"https:\/\/blogs.mathworks.com\/deep-learning\/files\/2025\/11\/mps-mcp-portfolio-sim.png\" alt=\"\" width=\"800\" height=\"450\" \/>\r\n\r\n&nbsp;\r\n<h6><\/h6>\r\nThe simulation shows that adjusting portfolio aggressiveness significantly improves the probability of reaching that target. Based on the results, the simulated ending wealth ranges from a minimum of 228.04 USD to a maximum of 502.52 USD.\r\n<h6><\/h6>\r\n<h6><\/h6>\r\n&nbsp;\r\n<h6><\/h6>\r\n<h2>MCP: the magic behind agentic integrations<\/h2>\r\n<h6><\/h6>\r\nThe magic behind this workflow lies in <strong>MCP servers<\/strong>. During development, the <strong>MATLAB MCP Core server<\/strong> gives you an interactive environment to prototype and test functions quickly. When it\u2019s time to scale, the <strong>MATLAB Production Server <\/strong>takes over, hosting compiled MATLAB functions and exposing them as MCP tools. This means the same logic you tested locally can run in a secure, multi-user production setting.\r\n<h6><\/h6>\r\nWhy does MCP matter? It provides a <strong>standardized interface<\/strong> for AI assistants, creating a seamless path from local debugging to enterprise-grade deployment.\r\n<h6><\/h6>\r\n<img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-18948\" src=\"https:\/\/blogs.mathworks.com\/deep-learning\/files\/2025\/11\/MPS-MCP-diagram-1.png\" alt=\"\" width=\"400\" height=\"266\" \/>\r\n<h6><\/h6>\r\nTo build your quant agent, start by wrapping the <a href=\"https:\/\/uk.mathworks.com\/help\/finance\/dynamic-portfolio-allocation-in-gbwm-for-multiple-periods.html\">Goal-Based Wealth Management model<\/a> in a MATLAB function. Test it locally, and once validated, deploy on MATLAB Production Server to make it accessible to multiple users or accessible via AI chat apps such as Claude\u00ae or agentic apps like Visual Studio Code\u00ae or Gemini CLI\u00ae.\r\n<h6><\/h6>\r\nMCP servers make natural-language quant modeling practical \u2013 from prototype to production. Ready to try? Start by wrapping your first MATLAB model and deploying it on MATLAB Production Server. Your agent is just a prompt away!\r\n\r\n<script>\r\nfunction copyCode(btn) {\r\n  const code = btn.parentElement.querySelector(\"pre\").textContent.trim();\r\n  if (navigator.clipboard) {\r\n    navigator.clipboard.writeText(code).then(() => {\r\n      btn.textContent = \"Copied!\";\r\n      setTimeout(() => btn.textContent = \"Copy\", 1500);\r\n    }).catch(() => fallbackCopy(code, btn));\r\n  } else {\r\n    fallbackCopy(code, btn);\r\n  }\r\n}\r\nfunction fallbackCopy(text, btn) {\r\n  const ta = document.createElement(\"textarea\");\r\n  ta.value = text;\r\n  document.body.appendChild(ta);\r\n  ta.select();\r\n  document.execCommand(\"copy\");\r\n  document.body.removeChild(ta);\r\n  btn.textContent = \"Copied!\";\r\n  setTimeout(() => btn.textContent = \"Copy\", 1500);\r\n}\r\n<\/script>\r\n<h6><\/h6>\r\n&nbsp;","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img src=\"https:\/\/blogs.mathworks.com\/deep-learning\/files\/2025\/11\/MPS-MCP-diagram-1.png\" class=\"img-responsive attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"\" decoding=\"async\" loading=\"lazy\" \/><\/div><p>This Monday, we are releasing the new MCP framework for MATLAB Production Server on GitHub:\r\n\r\nhttps:\/\/github.com\/matlab\/mcp-framework-matlab-production-server\r\n\r\n\r\n\r\n\r\n\r\nGuest Writer: Lawrence... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/deep-learning\/2025\/11\/10\/matlab-mcp-servers-to-develop-and-deploy-a-quant-agent\/\">read more >><\/a><\/p>","protected":false},"author":230,"featured_media":18948,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[74],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/deep-learning\/wp-json\/wp\/v2\/posts\/18918"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/deep-learning\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/deep-learning\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/deep-learning\/wp-json\/wp\/v2\/users\/230"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/deep-learning\/wp-json\/wp\/v2\/comments?post=18918"}],"version-history":[{"count":42,"href":"https:\/\/blogs.mathworks.com\/deep-learning\/wp-json\/wp\/v2\/posts\/18918\/revisions"}],"predecessor-version":[{"id":18966,"href":"https:\/\/blogs.mathworks.com\/deep-learning\/wp-json\/wp\/v2\/posts\/18918\/revisions\/18966"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/deep-learning\/wp-json\/wp\/v2\/media\/18948"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/deep-learning\/wp-json\/wp\/v2\/media?parent=18918"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/deep-learning\/wp-json\/wp\/v2\/categories?post=18918"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/deep-learning\/wp-json\/wp\/v2\/tags?post=18918"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}