xs-studio-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@xs-studio-mcpcreate a new DUT named MotorControl"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
xs-studio-mcp
xs-studio-mcp is a Model Context Protocol server for XS Studio.exe. It keeps the public MCP interface of @codesys/mcp-toolkit, and adds an XS-specific create_dut tool for ST / FB / DUT generation workflows.
What it exposes
Resources
codesys://project/statuscodesys://project/{+project_path}/structurecodesys://project/{+project_path}/pou/{+pou_path}/code
Toolkit-compatible tools
open_projectcreate_projectsave_projectcreate_pouset_pou_codecreate_propertycreate_methodcompile_project
XS extension
create_dut
Related MCP server: ABAP-ADT-API MCP-Server
Prerequisites
XS Studio with scripting support
Default executable path on this machine:
D:\Program Files\XS Studio\CODESYS\Common\XS Studio.exeDefault detected profile:
XS Studio V2.3.2
Python 3.11
Setup
uv python install 3.11
uv venv --python 3.11 .venv
uv pip install --python .\.venv\Scripts\python.exe -e .Run
.\.venv\Scripts\xs-studio-mcp-tool.exeBy default each script call starts XS Studio and closes the launched process after the script reports completion. On this XS Studio build, project scripting works more reliably with the visible UI than with --noUI:
$env:XS_STUDIO_RUN_WITH_UI = "1"To avoid opening one XS Studio window per MCP tool call, enable the reusable scripting agent. The first call opens one MCP-managed XS Studio window; later calls reuse that window through a temp-file request queue:
$env:XS_STUDIO_RUN_WITH_UI = "1"
$env:XS_STUDIO_REUSE_WINDOW = "1"The agent files are stored under %TEMP%\xs_studio_mcp_agent\... by default. Override that with XS_STUDIO_AGENT_DIR if needed. To stop the reusable agent, close the XS Studio window, create a file named stop inside the agent directory, or run examples\packml\stop_xs_agent.cmd.
Optional flags:
.\.venv\Scripts\xs-studio-mcp-tool.exe `
--codesys-path "D:\Program Files\XS Studio\CODESYS\Common\XS Studio.exe" `
--codesys-profile "XS Studio V2.3.2" `
--workspace "D:\Projects\XS-MCP" `
--template-path "C:\Users\zhouweihai\Desktop\未命名2\未命名2.project"Cursor / Claude MCP config
See docs/mcpServers.sample.json.
The local-repo form is:
{
"mcpServers": {
"xs_studio_local": {
"command": "D:\\Projects\\XS-MCP\\.venv\\Scripts\\xs-studio-mcp-tool.exe",
"args": [
"--codesys-path",
"D:\\Program Files\\XS Studio\\CODESYS\\Common\\XS Studio.exe",
"--codesys-profile",
"XS Studio V2.3.2",
"--workspace",
"D:\\Projects\\XS-MCP",
"--template-path",
"C:\\Users\\zhouweihai\\Desktop\\未命名2\\未命名2.project"
]
}
}
}Demo project
The demo project lives at examples/hello_xs/HelloXs.project. create_project defaults to C:\Users\zhouweihai\Desktop\未命名2\未命名2.project on this machine, and falls back to XS Studio Standard.project if no configured template is available. The demo is then extended with:
Application/MAINApplication/FB_DemoApplication/FB_Demo/ExecuteApplication/FB_Demo/StateApplication/DUT_RunMode
PackML demo:
examples\packml\run_packml_demo_admin.cmdThis demo runs elevated, enables XS_STUDIO_REUSE_WINDOW=1, creates a timestamped project under examples\packml, and should leave only one MCP-managed XS Studio window open.
Troubleshooting
Path with spaces
This implementation quotes executable, profile, and script paths explicitly. Keep
--codesys-path,--codesys-profile, and--workspaceas separate MCP args in client config.
Wrong profile
Verify
--codesys-profilematches the installed profile name exactly.
Script engine failure
Check tool output for
SCRIPT_ERRORdetails and verify XS Studio scripting is installed.
Compile failure
compile_projectinspects XS Studio message objects after the build and returns MCP error output when compiler errors are present.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityFmaintenanceA Model Context Protocol server that enables seamless interaction between MCP clients (like Claude Desktop) and CODESYS V3 programming environments, allowing automation of project management, POU creation, code editing, and compilation tasks.131114MIT
- AlicenseCquality-maintenanceAn MCP server that facilitates seamless interaction with SAP ABAP systems to manage development objects, transport requests, and source code. It provides a comprehensive suite of tools for performing syntax checks, object searches, and code modifications via the ADT API.100
- AlicenseBqualityCmaintenanceAn MCP server for validating, auto-fixing, and scaffolding TwinCAT 3 XML files using deterministic code quality tools and IEC 61131-3 OOP checks. It enables AI assistants to perform structural validation, apply safe fixes, and generate canonical code skeletons for industrial automation projects.1633MIT
- AlicenseCqualityDmaintenanceAn MCP server that enables seamless communication between ABAP systems and MCP clients using the ABAP Development Tools (ADT) API. It provides tools for managing ABAP objects, handling transport requests, and performing code analysis directly through MCP-compatible interfaces.100MIT
Related MCP Connectors
A MCP server built for developers enabling Git based project management with project and personal…
MCP Server for JFrog, providing tools for development and artifact management.
An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/JustinGZJ/xs-studio-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server