@codesys/mcp-toolkit 1.1.3 → 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/index.md CHANGED
@@ -1,26 +1,26 @@
1
- # CODESYS MCP Toolkit Documentation
2
-
3
- Welcome to the documentation for the CODESYS MCP Toolkit!
4
-
5
- ## Overview
6
-
7
- The CODESYS MCP Toolkit provides a bridge between Model Context Protocol (MCP) clients and CODESYS V3 programming environments. This toolkit enables seamless interaction for automating project management, POU creation, code editing, and compilation tasks.
8
-
9
- ## Components
10
-
11
- - **MCP Server**: Core component that handles MCP protocol communication
12
- - **CODESYS Script Integration**: Interface with CODESYS scripting engine
13
- - **Command-Line Interface**: For direct usage and configuration
14
-
15
- ## Getting Started
16
-
17
- - [Installation](installation.md)
18
- - [Configuration](configuration.md)
19
- - [Usage Examples](examples.md)
20
- - [API Reference](api.md)
21
-
22
- ## Advanced Topics
23
-
24
- - [Contributing Guidelines](../CONTRIBUTING.md)
25
- - [Troubleshooting](troubleshooting.md)
26
- - [Custom Extensions](extensions.md)
1
+ # CODESYS MCP Toolkit Documentation
2
+
3
+ Welcome to the documentation for the CODESYS MCP Toolkit!
4
+
5
+ ## Overview
6
+
7
+ The CODESYS MCP Toolkit provides a bridge between Model Context Protocol (MCP) clients and CODESYS V3 programming environments. This toolkit enables seamless interaction for automating project management, POU creation, code editing, and compilation tasks.
8
+
9
+ ## Components
10
+
11
+ - **MCP Server**: Core component that handles MCP protocol communication
12
+ - **CODESYS Script Integration**: Interface with CODESYS scripting engine
13
+ - **Command-Line Interface**: For direct usage and configuration
14
+
15
+ ## Getting Started
16
+
17
+ - [Installation](installation.md)
18
+ - [Configuration](configuration.md)
19
+ - [Usage Examples](examples.md)
20
+ - [API Reference](api.md)
21
+
22
+ ## Advanced Topics
23
+
24
+ - [Contributing Guidelines](../CONTRIBUTING.md)
25
+ - [Troubleshooting](troubleshooting.md)
26
+ - [Custom Extensions](extensions.md)
@@ -1,84 +1,84 @@
1
- # Installation Guide
2
-
3
- This guide covers how to install the CODESYS MCP Toolkit on your system.
4
-
5
- ## Prerequisites
6
-
7
- Before installing, ensure you have:
8
-
9
- 1. **Node.js**: Version 18 or later
10
- - Download from [nodejs.org](https://nodejs.org/)
11
- - Verify installation with `node --version`
12
-
13
- 2. **CODESYS V3**: A working CODESYS V3 installation
14
- - Tested with version 3.5 SP21
15
- - Must have the **Scripting Engine** component enabled
16
- - Verify by opening CODESYS and checking if scripting commands are available
17
-
18
- 3. **MCP Client**: An MCP-enabled application (e.g., Claude Desktop)
19
-
20
- ## Installation Methods
21
-
22
- ### Method 1: Install from npm (Recommended)
23
-
24
- The simplest way to install is directly from npm:
25
-
26
- ```bash
27
- npm install -g @codesys/mcp-toolkit
28
- ```
29
-
30
- This installs the package globally on your system, making the `codesys-mcp-toolkit` command available in your terminal.
31
-
32
- Verify the installation by running:
33
-
34
- ```bash
35
- codesys-mcp-toolkit --version
36
- ```
37
-
38
- ### Method 2: Install from Source
39
-
40
- For development or to get the latest unreleased changes:
41
-
42
- ```bash
43
- # Clone the repository
44
- git clone https://github.com/yourusername/codesys-mcp-toolkit.git
45
- cd codesys-mcp-toolkit
46
-
47
- # Install dependencies
48
- npm install
49
-
50
- # Build the project
51
- npm run build
52
-
53
- # Install globally
54
- npm install -g .
55
- ```
56
-
57
- Verify the installation using the same command as above.
58
-
59
- ## Next Steps
60
-
61
- After installation:
62
-
63
- 1. [Configure your MCP client](configuration.md) to use the CODESYS MCP Toolkit
64
- 2. Try some [basic examples](examples.md)
65
- 3. Learn about the [available tools and resources](api.md)
66
-
67
- ## Troubleshooting Installation Issues
68
-
69
- ### Common Issues
70
-
71
- - **Permission errors**: You may need to run npm with administrative privileges
72
- ```bash
73
- sudo npm install -g @codesys/mcp-toolkit # On Linux/macOS
74
- # or use PowerShell as Administrator on Windows
75
- ```
76
-
77
- - **Path issues**: Ensure the npm global bin directory is in your PATH
78
-
79
- - **Node.js version**: Verify you have Node.js 18 or later
80
- ```bash
81
- node --version
82
- ```
83
-
84
- If you encounter other issues, please check the [troubleshooting guide](troubleshooting.md) or [open an issue](https://github.com/yourusername/codesys-mcp-toolkit/issues) on GitHub.
1
+ # Installation Guide
2
+
3
+ This guide covers how to install the CODESYS MCP Toolkit on your system.
4
+
5
+ ## Prerequisites
6
+
7
+ Before installing, ensure you have:
8
+
9
+ 1. **Node.js**: Version 18 or later
10
+ - Download from [nodejs.org](https://nodejs.org/)
11
+ - Verify installation with `node --version`
12
+
13
+ 2. **CODESYS V3**: A working CODESYS V3 installation
14
+ - Tested with version 3.5 SP21
15
+ - Must have the **Scripting Engine** component enabled
16
+ - Verify by opening CODESYS and checking if scripting commands are available
17
+
18
+ 3. **MCP Client**: An MCP-enabled application (e.g., Claude Desktop)
19
+
20
+ ## Installation Methods
21
+
22
+ ### Method 1: Install from npm (Recommended)
23
+
24
+ The simplest way to install is directly from npm:
25
+
26
+ ```bash
27
+ npm install -g @codesys/mcp-toolkit
28
+ ```
29
+
30
+ This installs the package globally on your system, making the `codesys-mcp-toolkit` command available in your terminal.
31
+
32
+ Verify the installation by running:
33
+
34
+ ```bash
35
+ codesys-mcp-toolkit --version
36
+ ```
37
+
38
+ ### Method 2: Install from Source
39
+
40
+ For development or to get the latest unreleased changes:
41
+
42
+ ```bash
43
+ # Clone the repository
44
+ git clone https://github.com/yourusername/codesys-mcp-toolkit.git
45
+ cd codesys-mcp-toolkit
46
+
47
+ # Install dependencies
48
+ npm install
49
+
50
+ # Build the project
51
+ npm run build
52
+
53
+ # Install globally
54
+ npm install -g .
55
+ ```
56
+
57
+ Verify the installation using the same command as above.
58
+
59
+ ## Next Steps
60
+
61
+ After installation:
62
+
63
+ 1. [Configure your MCP client](configuration.md) to use the CODESYS MCP Toolkit
64
+ 2. Try some [basic examples](examples.md)
65
+ 3. Learn about the [available tools and resources](api.md)
66
+
67
+ ## Troubleshooting Installation Issues
68
+
69
+ ### Common Issues
70
+
71
+ - **Permission errors**: You may need to run npm with administrative privileges
72
+ ```bash
73
+ sudo npm install -g @codesys/mcp-toolkit # On Linux/macOS
74
+ # or use PowerShell as Administrator on Windows
75
+ ```
76
+
77
+ - **Path issues**: Ensure the npm global bin directory is in your PATH
78
+
79
+ - **Node.js version**: Verify you have Node.js 18 or later
80
+ ```bash
81
+ node --version
82
+ ```
83
+
84
+ If you encounter other issues, please check the [troubleshooting guide](troubleshooting.md) or [open an issue](https://github.com/yourusername/codesys-mcp-toolkit/issues) on GitHub.
@@ -1,78 +1,78 @@
1
- # CODESYS MCP Toolkit Examples
2
-
3
- This directory contains examples of how to use the CODESYS MCP toolkit effectively.
4
-
5
- ## Example Configuration Files
6
-
7
- ### Basic MCP Configuration
8
-
9
- `claude_desktop_config.json` - Example configuration for Claude Desktop:
10
-
11
- ```json
12
- {
13
- "mcpServers": {
14
- "codesys_local": {
15
- "command": "npx",
16
- "args": [
17
- "-y",
18
- "@codesys/mcp-toolkit",
19
- "--codesys-path", "C:\\Program Files\\CODESYS 3.5.21.0\\CODESYS\\Common\\CODESYS.exe",
20
- "--codesys-profile", "CODESYS V3.5 SP21"
21
- ]
22
- }
23
- }
24
- }
25
- ```
26
-
27
- ## Example Prompts
28
-
29
- Here are some example prompts you can use with Claude Desktop:
30
-
31
- ### Create a Motor Controller Function Block
32
-
33
- ```
34
- Using the CODESYS Local server, please create a MotorController function block with the following:
35
-
36
- 1. Properties:
37
- - SpeedSetpoint (INT)
38
- - ActualSpeed (INT)
39
- - IsRunning (BOOL)
40
-
41
- 2. Methods:
42
- - Start() - Sets IsRunning to TRUE
43
- - Stop() - Sets IsRunning to FALSE
44
- - SetSpeed(speed: INT) - Sets SpeedSetpoint to the given value
45
-
46
- Create this in a new project at C:/MyProjects/MotorControl.project
47
- ```
48
-
49
- ### Open and Analyze an Existing Project
50
-
51
- ```
52
- Using the CODESYS Local server, please open the project at C:/MyProjects/ExistingProject.project and show me its structure. Then, show me the code for the main POU.
53
- ```
54
-
55
- ### Compile a Project
56
-
57
- ```
58
- Using the CODESYS Local server, please open the project at C:/MyProjects/MyProject.project and compile it. Let me know if there are any errors.
59
- ```
60
-
61
- ## Programmatic Usage Examples
62
-
63
- If you're integrating directly with the server code, here are some examples:
64
-
65
- ### CLI Usage
66
-
67
- Run the server directly:
68
-
69
- ```bash
70
- codesys-mcp-toolkit --codesys-path "C:\Program Files\CODESYS 3.5.21.0\CODESYS\Common\CODESYS.exe" --codesys-profile "CODESYS V3.5 SP21"
71
- ```
72
-
73
- ## Use Cases
74
-
75
- * Automated PLC project creation
76
- * Standardized Function Block library management
77
- * Continuous integration for CODESYS projects
78
- * Documentation generation from CODESYS projects
1
+ # CODESYS MCP Toolkit Examples
2
+
3
+ This directory contains examples of how to use the CODESYS MCP toolkit effectively.
4
+
5
+ ## Example Configuration Files
6
+
7
+ ### Basic MCP Configuration
8
+
9
+ `claude_desktop_config.json` - Example configuration for Claude Desktop:
10
+
11
+ ```json
12
+ {
13
+ "mcpServers": {
14
+ "codesys_local": {
15
+ "command": "npx",
16
+ "args": [
17
+ "-y",
18
+ "@codesys/mcp-toolkit",
19
+ "--codesys-path", "C:\\Program Files\\CODESYS 3.5.21.0\\CODESYS\\Common\\CODESYS.exe",
20
+ "--codesys-profile", "CODESYS V3.5 SP21"
21
+ ]
22
+ }
23
+ }
24
+ }
25
+ ```
26
+
27
+ ## Example Prompts
28
+
29
+ Here are some example prompts you can use with Claude Desktop:
30
+
31
+ ### Create a Motor Controller Function Block
32
+
33
+ ```
34
+ Using the CODESYS Local server, please create a MotorController function block with the following:
35
+
36
+ 1. Properties:
37
+ - SpeedSetpoint (INT)
38
+ - ActualSpeed (INT)
39
+ - IsRunning (BOOL)
40
+
41
+ 2. Methods:
42
+ - Start() - Sets IsRunning to TRUE
43
+ - Stop() - Sets IsRunning to FALSE
44
+ - SetSpeed(speed: INT) - Sets SpeedSetpoint to the given value
45
+
46
+ Create this in a new project at C:/MyProjects/MotorControl.project
47
+ ```
48
+
49
+ ### Open and Analyze an Existing Project
50
+
51
+ ```
52
+ Using the CODESYS Local server, please open the project at C:/MyProjects/ExistingProject.project and show me its structure. Then, show me the code for the main POU.
53
+ ```
54
+
55
+ ### Compile a Project
56
+
57
+ ```
58
+ Using the CODESYS Local server, please open the project at C:/MyProjects/MyProject.project and compile it. Let me know if there are any errors.
59
+ ```
60
+
61
+ ## Programmatic Usage Examples
62
+
63
+ If you're integrating directly with the server code, here are some examples:
64
+
65
+ ### CLI Usage
66
+
67
+ Run the server directly:
68
+
69
+ ```bash
70
+ codesys-mcp-toolkit --codesys-path "C:\Program Files\CODESYS 3.5.21.0\CODESYS\Common\CODESYS.exe" --codesys-profile "CODESYS V3.5 SP21"
71
+ ```
72
+
73
+ ## Use Cases
74
+
75
+ * Automated PLC project creation
76
+ * Standardized Function Block library management
77
+ * Continuous integration for CODESYS projects
78
+ * Documentation generation from CODESYS projects
@@ -1,32 +1,32 @@
1
- {
2
- "mcpServers": {
3
- "codesys_local": {
4
- "command": "npx",
5
- "args": [
6
- "-y",
7
- "@codesys/mcp-toolkit",
8
- "--codesys-path", "C:\\Program Files\\CODESYS 3.5.21.0\\CODESYS\\Common\\CODESYS.exe",
9
- "--codesys-profile", "CODESYS V3.5 SP21"
10
- ]
11
- },
12
- "filesystem": {
13
- "command": "npx",
14
- "args": [
15
- "-y",
16
- "@modelcontextprotocol/server-filesystem",
17
- "C:/MyProjects"
18
- ]
19
- },
20
- "memory": {
21
- "command": "npx",
22
- "args": [
23
- "-y",
24
- "@modelcontextprotocol/server-memory"
25
- ]
26
- },
27
- "puppeteer": {
28
- "command": "npx",
29
- "args": ["-y", "@modelcontextprotocol/server-puppeteer"]
30
- }
31
- }
32
- }
1
+ {
2
+ "mcpServers": {
3
+ "codesys_local": {
4
+ "command": "npx",
5
+ "args": [
6
+ "-y",
7
+ "@codesys/mcp-toolkit",
8
+ "--codesys-path", "C:\\Program Files\\CODESYS 3.5.21.0\\CODESYS\\Common\\CODESYS.exe",
9
+ "--codesys-profile", "CODESYS V3.5 SP21"
10
+ ]
11
+ },
12
+ "filesystem": {
13
+ "command": "npx",
14
+ "args": [
15
+ "-y",
16
+ "@modelcontextprotocol/server-filesystem",
17
+ "C:/MyProjects"
18
+ ]
19
+ },
20
+ "memory": {
21
+ "command": "npx",
22
+ "args": [
23
+ "-y",
24
+ "@modelcontextprotocol/server-memory"
25
+ ]
26
+ },
27
+ "puppeteer": {
28
+ "command": "npx",
29
+ "args": ["-y", "@modelcontextprotocol/server-puppeteer"]
30
+ }
31
+ }
32
+ }
package/package.json CHANGED
@@ -1,48 +1,48 @@
1
- {
2
- "name": "@codesys/mcp-toolkit",
3
- "version": "1.1.3",
4
- "description": "Model Context Protocol (MCP) server for CODESYS automation platform",
5
- "main": "dist/server.js",
6
- "bin": {
7
- "codesys-mcp-tool": "./dist/bin.js"
8
- },
9
- "scripts": {
10
- "test": "echo \"Error: no test specified\" && exit 1",
11
- "build": "tsc",
12
- "start": "node ./dist/server.js"
13
- },
14
- "keywords": [
15
- "codesys",
16
- "mcp",
17
- "modelcontextprotocol",
18
- "plc",
19
- "automation",
20
- "programming"
21
- ],
22
- "author": "Your Name <your.email@example.com>",
23
- "license": "MIT",
24
- "type": "commonjs",
25
- "repository": {
26
- "type": "git",
27
- "url": "git+https://github.com/johannesPettersson80/codesys-mcp-toolkit.git"
28
- },
29
- "homepage": "https://github.com/johannesPettersson80/codesys-mcp-toolkit#readme",
30
- "bugs": {
31
- "url": "https://github.com/johannesPettersson80/codesys-mcp-toolkit/issues"
32
- },
33
- "engines": {
34
- "node": ">=18.0.0"
35
- },
36
- "dependencies": {
37
- "@modelcontextprotocol/sdk": "^1.10.2",
38
- "axios": "^1.6.8",
39
- "commander": "^11.1.0",
40
- "yargs": "^17.7.2",
41
- "zod": "^3.24.3"
42
- },
43
- "devDependencies": {
44
- "@types/node": "^20.14.1",
45
- "@types/yargs": "^17.0.33",
46
- "typescript": "^5.5.3"
47
- }
48
- }
1
+ {
2
+ "name": "@codesys/mcp-toolkit",
3
+ "version": "1.1.5",
4
+ "description": "Model Context Protocol (MCP) server for CODESYS automation platform",
5
+ "main": "dist/server.js",
6
+ "bin": {
7
+ "codesys-mcp-tool": "./dist/bin.js"
8
+ },
9
+ "scripts": {
10
+ "test": "echo \"Error: no test specified\" && exit 1",
11
+ "build": "tsc",
12
+ "start": "node ./dist/server.js"
13
+ },
14
+ "keywords": [
15
+ "codesys",
16
+ "mcp",
17
+ "modelcontextprotocol",
18
+ "plc",
19
+ "automation",
20
+ "programming"
21
+ ],
22
+ "author": "Your Name <your.email@example.com>",
23
+ "license": "MIT",
24
+ "type": "commonjs",
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git+https://github.com/johannesPettersson80/codesys-mcp-toolkit.git"
28
+ },
29
+ "homepage": "https://github.com/johannesPettersson80/codesys-mcp-toolkit#readme",
30
+ "bugs": {
31
+ "url": "https://github.com/johannesPettersson80/codesys-mcp-toolkit/issues"
32
+ },
33
+ "engines": {
34
+ "node": ">=18.0.0"
35
+ },
36
+ "dependencies": {
37
+ "@modelcontextprotocol/sdk": "^1.10.2",
38
+ "axios": "^1.6.8",
39
+ "commander": "^11.1.0",
40
+ "yargs": "^17.7.2",
41
+ "zod": "^3.24.3"
42
+ },
43
+ "devDependencies": {
44
+ "@types/node": "^20.17.32",
45
+ "@types/yargs": "^17.0.33",
46
+ "typescript": "^5.5.3"
47
+ }
48
+ }