1.9 KiB
1.9 KiB
CODESYS MCP Companion Extension
VS Code/Cursor companion extension for the CODESYS MCP bridge.
This extension provides command workflows, project/actions/jobs views, status bar state, and diagnostics for the existing Python MCP bridge located at:
python_scripting/mcp_codesys_bridge/server.py
Features
- MCP bridge lifecycle and health check
- Project-level commands:
- create project
- stage existing project
- read project inventory
- read device I/O
- write POU
- write I/O mapping
- manage device
- sync project
- build project
- download to device
- Job polling UX through Jobs view
- Error diagnostics surfaced in Problems panel
- ST language support:
- syntax grammar
- snippets
- context menu action for current ST file sync
Settings
All settings are under the codesys.* namespace:
codesys.pythonPathcodesys.bridgeScriptPathcodesys.agentUrlcodesys.agentTokencodesys.requestTimeoutSeccodesys.pollIntervalMscodesys.defaultProjectPathcodesys.defaultDryRunMutationscodesys.allowDownloadCommand
Local Development
Prerequisites:
- Node.js 20+
- npm 10+
- Python 3 available for bridge startup
Install and build:
cd vscode_codesys_companion
npm install
npm run check
Run extension in Extension Development Host:
- Open
vscode_codesys_companionin VS Code/Cursor. - Press
F5. - Use command palette commands with prefix
CODESYS:.
Packaging
Build VSIX package:
cd vscode_codesys_companion
npm install
npm run compile
npm run package
Operational Notes
- Keep mutating operations in dry-run mode first.
download_to_devicecommand is gated bycodesys.allowDownloadCommand.- Bridge auth requires
codesys.agentTokento match VM agent token. - Align operations with:
python_scripting/how-to-use-codesys-mcp.mdpython_scripting/codesys-mcp-bridge-operations.md