52 lines
1.1 KiB
Markdown
52 lines
1.1 KiB
Markdown
# CODESYS MCP Bridge (Linux)
|
|
|
|
This MCP server runs on Linux (where Cursor runs) and forwards tool calls to a Windows VM agent that has access to CODESYS.
|
|
|
|
## Tools
|
|
|
|
- `codesys_health`
|
|
- `codesys_submit_job`
|
|
- `codesys_get_job`
|
|
- `create_project`
|
|
- `read_project_inventory`
|
|
- `stage_existing_project`
|
|
- `write_pou`
|
|
- `build_project`
|
|
- `download_to_device`
|
|
|
|
## Environment variables
|
|
|
|
- `CODESYS_AGENT_URL` (default: `http://127.0.0.1:8787`)
|
|
- `CODESYS_AGENT_TOKEN` (required)
|
|
- `CODESYS_AGENT_REQUEST_TIMEOUT_SEC` (default: `30`)
|
|
|
|
## Run locally
|
|
|
|
```bash
|
|
cd mcp_codesys_bridge
|
|
python3 -m venv .venv
|
|
source .venv/bin/activate
|
|
pip install -r requirements.txt
|
|
export CODESYS_AGENT_URL="http://<windows-vm-ip>:8787"
|
|
export CODESYS_AGENT_TOKEN="<shared-secret-token>"
|
|
python server.py
|
|
```
|
|
|
|
## Cursor MCP config example
|
|
|
|
```json
|
|
{
|
|
"mcpServers": {
|
|
"codesys-bridge": {
|
|
"command": "python",
|
|
"args": ["/absolute/path/to/mcp_codesys_bridge/server.py"],
|
|
"env": {
|
|
"CODESYS_AGENT_URL": "http://<windows-vm-ip>:8787",
|
|
"CODESYS_AGENT_TOKEN": "<shared-secret-token>",
|
|
"CODESYS_AGENT_REQUEST_TIMEOUT_SEC": "30"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
```
|