- Home
- MCP servers
- Codesys
Codesys
- typescript
28
GitHub Stars
typescript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"johannespettersson80-codesys-mcp-toolkit": {
"command": "codesys-mcp-tool",
"args": [
"--codesys-path",
"C:\\\\Program Files\\\\Path\\\\To\\\\Your\\\\CODESYS\\\\Common\\\\CODESYS.exe",
"--codesys-profile",
"Your CODESYS Profile Name"
]
}
}
}You can run a Codesys MCP server locally to automate CODESYS V3 projects and POU code through MCP clients. This server enables you to open, create, edit, and compile projects, and to manage POU code and properties from your MCP-enabled toolchain.
How to use
Connect your MCP client (for example Claude Desktop) to the Codesys MCP toolkit server to manage projects and POU code. You can use the direct command for reliability or the alternative using npx if you must. Once connected, you can open existing projects, create new ones from templates, edit POU declarations and implementations, and trigger compilation. You can also query the scripting status and structure of a project for navigation and validation.
How to install
Prerequisites you need to have before installing the MCP toolkit: node.js version 18.0.0 or later, and a working CODESYS V3 installation with the Scripting Engine enabled.
Install the MCP toolkit globally so you can run the codesys-mcp-tool command from any terminal.
Run the following command to install the MCP toolkit globally:
npm install -g @codesys/mcp-toolkit
Configuration and usage notes
Choose a configuration method that avoids environment variable PATH issues when launched from MCP clients. The recommended approach is to configure your MCP client to run the installed command codesys-mcp-tool directly. This ensures the correct executable is invoked and avoids wrapper-related path problems.
Example for Claude Desktop (settings.json -> mcpServers):
{
"mcpServers": {
// ... other servers ...
"codesys_local": {
"command": "codesys-mcp-tool",
"args": [
"--codesys-path", "C:\\Program Files\\Path\\To\\Your\\CODESYS\\Common\\CODESYS.exe",
"--codesys-profile", "Your CODESYS Profile Name"
]
}
// ... other servers ...
}
}
Alternative configuration using npx
If you must use npx, the setup below shows how to pass arguments to the tool. This approach can trigger environment issues in some host applications, so use the direct command method if possible.
{
"mcpServers": {
"codesys_local": {
"command": "npx",
"args": [
"-y",
"@codesys/mcp-toolkit",
"--codesys-path", "C:\\Program Files\\Path\\To\\Your\\CODESYS\\Common\\CODESYS.exe",
"--codesys-profile", "Your CODESYS Profile Name"
]
}
}
}
Available tools
open_project
Open an existing CODESYS project from the MCP client.
create_project
Create a new CODESYS project from standard templates.
save_project
Save changes made to a project back to the workspace.
create_pou
Create Programs, Function Blocks, and Functions within a project.
set_pou_code
Set the declaration and implementation code for a POU, or for a Method or Property accessor.
create_property
Create properties for Function Blocks.
create_method
Create methods for Function Blocks.
compile_project
Compile the current project to verify and generate artifacts.