{"id":3285,"date":"2025-12-15T11:58:12","date_gmt":"2025-12-15T10:58:12","guid":{"rendered":"https:\/\/france.magicsoftware.com\/blog\/?p=3285"},"modified":"2026-04-23T09:16:39","modified_gmt":"2026-04-23T08:16:39","slug":"mcp-server-magic-xpi","status":"publish","type":"post","link":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/mcp-server-magic-xpi\/","title":{"rendered":"MCP Server &#8211; Magic xpi"},"content":{"rendered":"\n<p><strong>Goal : Expose Magic xpi RESTFul API service through an MCP Proxy Server<\/strong><\/p>\n\n\n\n<p><strong>Prerequisites :<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Install go<\/li>\n\n\n\n<li>Install npm<\/li>\n\n\n\n<li>Magic xpi RESTFul API Service OpenAPI yaml file with Magic xpi project up and running<\/li>\n<\/ul>\n\n\n\n<p><strong>1\/ Install an open api MCP server<\/strong><\/p>\n\n\n\n<p><em>Start powershell admin console<\/em><\/p>\n\n\n\n<p>git clone https:\/\/github.com\/jedisct1\/openapi-mcp.git<\/p>\n\n\n\n<p>cd .\\openapi-mcp\\<\/p>\n\n\n\n<p><em>Create bin folder<\/em><\/p>\n\n\n\n<p>New-Item -ItemType Directory -Force -Path .\\bin | Out-Null<\/p>\n\n\n\n<p>B<em>uild MCP server (stdio\/http)<\/em><\/p>\n\n\n\n<p>go build -o .\\bin\\openapi-mcp .\\cmd\\openapi-mcp<\/p>\n\n\n\n<p><em>Build Interactive MCP Client<\/em><\/p>\n\n\n\n<p>go build -o .\\bin\\mcp-client .\\cmd\\mcp-client<\/p>\n\n\n\n<p><strong>2\/ Start MCP Server<\/strong><\/p>\n\n\n\n<p>3 ways to do it<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>C:\\openapi-mcp\\bin\\openapi-mcp.exe &lt;directory of your magic xpi yaml file&gt; (STDIO)<\/li>\n\n\n\n<li>C:\\openapi-mcp\\bin\\openapi-mcp.exe &#8211;http=:9090 &lt;directory of your magic xpi yaml file&gt; (HTTP on port 9090)<\/li>\n\n\n\n<li>Start via powershell script<\/li>\n<\/ul>\n\n\n\n<p>I&rsquo;ve chosen to start the MCP Server via powershell script<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"452\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG2-1024x452.png\" alt=\"\" class=\"wp-image-3304\" style=\"aspect-ratio:2.265530473260276;width:786px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG2-1024x452.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG2-300x132.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG2-768x339.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG2.png 1526w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>3\/ Start your MCP Inspector<\/strong><\/p>\n\n\n\n<p>S<em>tart another powershell admin window<\/em><\/p>\n\n\n\n<p>npm install -g @modelcontextprotocol\/inspector<\/p>\n\n\n\n<p><em>Start the inspector console<\/em><\/p>\n\n\n\n<p>npx @modelcontextprotocol\/inspector \u00ab\u00a0C:\\openapi-mcp\\bin\\openapi-mcp.exe\u00a0\u00bb \u00ab\u00a0C:\\openapi-mcp\\openapi_localhost.yaml\u00a0\u00bb<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"222\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG3-1024x222.png\" alt=\"\" class=\"wp-image-3313\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG3-1024x222.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG3-300x65.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG3-768x167.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG3.png 1123w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"544\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG4-1024x544.png\" alt=\"\" class=\"wp-image-3314\" style=\"aspect-ratio:1.882378285221887;width:695px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG4-1024x544.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG4-300x160.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG4-768x408.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG4-1536x817.png 1536w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG4.png 1749w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Call your \u00ab\u00a0startOrder\u00a0\u00bb endpoint<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"462\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG5-1024x462.png\" alt=\"\" class=\"wp-image-3315\" style=\"aspect-ratio:2.2164913586092605;width:643px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG5-1024x462.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG5-300x135.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG5-768x347.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG5-1536x693.png 1536w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG5.png 1897w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>You should receive Status code 200 if your Magic xpi Flow has triggered successfully<\/p>\n\n\n\n<p><strong>4\/ You can test your MCP server with MCP Client as well<\/strong><\/p>\n\n\n\n<p><em>Start on Powershell command line (admin), your MCP client<\/em><\/p>\n\n\n\n<p>cd c:\\openapi-mcp\\bin<\/p>\n\n\n\n<p>.\\mcp-client.exe .\\openapi-mcp C:\\openapi-mcp\\openapi_localhost.yaml<\/p>\n\n\n\n<p>On the mcp prompt, you can enter : call startOrder <code>{\"requestBody\":{\"client_id\":\"saad\",\"session_id\":\"12345\"}}<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"902\" height=\"186\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG6-1.png\" alt=\"\" class=\"wp-image-3319\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG6-1.png 902w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG6-1-300x62.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG6-1-768x158.png 768w\" sizes=\"auto, (max-width: 902px) 100vw, 902px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"902\" height=\"288\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG7.png\" alt=\"\" class=\"wp-image-3320\" style=\"aspect-ratio:3.1322300596852957;width:721px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG7.png 902w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG7-300x96.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG7-768x245.png 768w\" sizes=\"auto, (max-width: 902px) 100vw, 902px\" \/><\/figure>\n\n\n\n<p>5\/ Your Magic xpi yaml file should look like below<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"690\" height=\"665\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG9.png\" alt=\"\" class=\"wp-image-3575\" style=\"width:460px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG9.png 690w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG9-300x289.png 300w\" sizes=\"auto, (max-width: 690px) 100vw, 690px\" \/><\/figure>\n\n\n\n<p>You can use the swaggerhub online tool to build your yaml file :<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"527\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG11-1024x527.png\" alt=\"\" class=\"wp-image-3580\" style=\"width:861px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG11-1024x527.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG11-300x155.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG11-768x396.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG11-1536x791.png 1536w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG11.png 1821w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>6\/ Generate flows from yaml file<\/p>\n\n\n\n<p>In the Magic xpi project inside the services repository, you can load your yaml file and generate automatically the Skeleton of the the flows for each endpoint.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"431\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG12-1024x431.png\" alt=\"\" class=\"wp-image-3583\" style=\"width:870px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG12-1024x431.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG12-300x126.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG12-768x323.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG12-1536x646.png 1536w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG12.png 1659w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>  After generating the flows, you can adapt each flow design with your own logic .<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"534\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG10-1024x534.png\" alt=\"\" class=\"wp-image-3577\" style=\"width:883px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG10-1024x534.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG10-300x156.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG10-768x401.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG10.png 1524w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>7\/ Each time you make a call, your Magic xpi Flow is triggered and you can control it using the Magic xpi Monitor<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"380\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG8-1024x380.png\" alt=\"\" class=\"wp-image-3323\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG8-1024x380.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG8-300x111.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG8-768x285.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG8-1536x570.png 1536w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG8.png 1834w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>6\/ From this point, you can consume external services with any AI applications that support MCP protocol (Claude, Gemini, ChatGPT, Copilot, Le Chat, &#8230;)<\/p>\n\n\n\n<p>7\/ Documentations<\/p>\n\n\n\n<p><a href=\"https:\/\/jedisct1.github.io\/openapi-mcp\/docs\/ai-integration.html\">AI Agent Integration &#8211; openapi-mcp Documentation<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/modelcontextprotocol.io\/docs\/getting-started\/intro\">https:\/\/modelcontextprotocol.io\/docs\/getting-started\/intro<\/a><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Goal : Expose Magic xpi RESTFul API service through an MCP Proxy Server Prerequisites : 1\/ Install an open api MCP server Start powershell admin console git clone https:\/\/github.com\/jedisct1\/openapi-mcp.git cd .\\openapi-mcp\\ Create bin folder New-Item -ItemType Directory -Force -Path .\\bin | Out-Null Build MCP server (stdio\/http) go build -o .\\bin\\openapi-mcp .\\cmd\\openapi-mcp Build Interactive MCP Client [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3301,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[76,4,90],"tags":[79,91],"class_list":["post-3285","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai","category-magic-xpi","category-mcp","tag-ai","tag-mcp"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/MCP_MG1-1.png","_links":{"self":[{"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/posts\/3285","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/comments?post=3285"}],"version-history":[{"count":33,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/posts\/3285\/revisions"}],"predecessor-version":[{"id":3651,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/posts\/3285\/revisions\/3651"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/media\/3301"}],"wp:attachment":[{"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/media?parent=3285"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/categories?post=3285"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/tags?post=3285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}