{"name":"io.github.efranceschetti/festo-codesys-mcp","slug":"efranceschetti-festo-codesys-mcp","title":null,"description":"MCP server for Festo/CODESYS PLCs: IEC 61131-3 ST + validated PLCopen XML generation.","url":"https://mcp.market/server/efranceschetti-festo-codesys-mcp","rating":null,"grade":"A","score":92,"certified":false,"status":"active","category":"other","tags":[],"presence":{"score":27,"stars":2,"forks":0,"downloads_week":37,"last_push_at":"2026-09-18T22:37:05.000Z","license":"MIT"},"uptime":null,"claimed":false,"transport":"npm","callable_via_gateway":false,"default_price_micros":0,"repository":null,"website":null,"version":"1.0.1","remotes":[],"packages":[{"registryType":"npm","identifier":"festo-codesys-mcp","version":"1.0.1","runtimeHint":"npx","transport":{"type":"stdio"},"environmentVariables":[{"description":"Optional. Absolute path to CODESYS.exe — enables the 12 ide_* tools that drive a live CODESYS V3.5 instance (Windows only).","format":"string","name":"FESTO_MCP_CODESYS_PATH"},{"description":"Required when using the ide_* tools. CODESYS profile name exactly as shown in the CODESYS version selector.","format":"string","name":"FESTO_MCP_CODESYS_PROFILE"},{"description":"Optional. Python interpreter for the XSD/semantic validators and hardware tools (needs lxml).","format":"string","name":"FESTO_MCP_PYTHON"},{"description":"Optional. Set to 1 to enable the cpx_*/edcon_* hardware commissioning tools (bench use only).","format":"string","name":"FESTO_MCP_ENABLE_HARDWARE"},{"description":"Optional. Set to 1 to allow file-writing tools to write outside the workspace directory.","format":"string","name":"FESTO_MCP_ALLOW_OUTSIDE_WORKSPACE"}]}],"tools":[{"name":"cpx_discover_system","description":"Connects to a CPX-AP head at <ipAddress> and lists installed modules. Useful as a \"is the bus alive?\" check before deeper diagnostics.","write_action":false,"price_micros":0,"input_schema":null},{"name":"cpx_read_channel","description":"Reads a single channel (DI/DO/AI/AO) from a module by index.","write_action":false,"price_micros":0,"input_schema":null},{"name":"cpx_system_state","description":"Dumps modules + all channel values. Heavier than discover_system — use sparingly.","write_action":false,"price_micros":0,"input_schema":null},{"name":"cpx_write_channel","description":"Writes a value to a channel (DO/AO) on a module. Bypasses the PLC — for bench commissioning only. Will fail if a PLC has the bus locked.","write_action":true,"price_micros":0,"input_schema":null},{"name":"create_data_type","description":"Generate a CODESYS data type: ENUM (E_*) or STRUCT (ST_*), with .st + PLCopen XML output. USE WHEN: you need an ENUM (state/mode) or STRUCT (config/record) to back FB, GVL, or program declarations. Name auto-corrected to E_ (enum) or ST_ (struct) prefix if missing.","write_action":true,"price_micros":0,"input_schema":null},{"name":"create_function_block","description":"Generate a CODESYS Function Block (.st + PLCopen XML) with the standard interface built in. USE WHEN: the user asks for a new FB and plc_library returned no reusable match. ALWAYS BEFORE: (1) plc_library action=search — never create what already exists; (2) plc_knowledge topics 'conventions' + 'abbreviations'. Standard pattern: bEnable/bExecute inputs, bDone/bBusy/bErr/nErrId outputs, nState state","write_action":true,"price_micros":0,"input_schema":null},{"name":"create_gvl","description":"Generate a Global Variable List (.st + PLCopen XML) with {attribute 'qualified_only'}. USE WHEN: you need globals shared across POUs — I/O map, system flags, HMI tags (GVL_HMI), config. Name auto-corrected to GVL_ prefix if missing. Common: GVL_Sys, GVL_IO, GVL_HMI, GVL_Cfg.","write_action":true,"price_micros":0,"input_schema":null},{"name":"create_program","description":"Generate a CODESYS Program (.st + PLCopen XML) for cyclic control logic. USE WHEN: you need a cyclic PRG (runs once per scan) — PRG_Main, PRG_Auto, sequence orchestration — and no reusable one exists. Programs run once per PLC scan (PRG_Main, PRG_Auto, etc.). Name auto-corrected to PRG_ prefix if missing.","write_action":true,"price_micros":0,"input_schema":null},{"name":"create_project_structure","description":"Scaffold a standard CODESYS project directory for Festo CPX-E. USE WHEN: starting a new CODESYS project and you need the standard folder scaffold before creating POUs. Creates: src/0_Types, src/1_Globals, src/2_Programs, src/3_FunctionBlocks, src/4_Functions, src/5_Library, export/xml, docs. Set includeExamples=true to pre-populate with E_MachState, GVL_Sys, and PRG_Main stubs. After scaffolding, ","write_action":true,"price_micros":0,"input_schema":null},{"name":"debug_plc_code","description":"Static analysis for Structured Text bugs — run BEFORE deploying to a real PLC. USE WHEN: ST code is convention-clean and you need runtime-bug analysis, or the user reports misbehavior. Catches: WHILE/REPEAT loops (watchdog risk), missing error handling (bErr/nErrId), CiA 402 safety gaps (MC_Power without MC_Stop), state machine issues (missing IDLE/ERROR), Hungarian notation violations, REAL-INT t","write_action":false,"price_micros":0,"input_schema":null},{"name":"edcon_drive_control","description":"Issue a CiA 402 state-machine action on a Festo drive. Actions: - ack_faults clear latched faults (no-op if none) - enable_powerstage drive to Operation Enabled state (drives can now move) - disable drive to Switch On Disabled - reference run drive-controlled homing (referencing_task)","write_action":false,"price_micros":0,"input_schema":null},{"name":"edcon_pnu_read","description":"Read a Parameter Number Unit (PROFIDRIVE PNU = CiA 402 SDO object). Examples: - PNU 1124 = Firmware version (safe diagnostic) - PNU 24700 (0x607C) = Home Offset / Reference Offset Returns hex-encoded bytes.","write_action":false,"price_micros":0,"input_schema":null},{"name":"edcon_pnu_write","description":"Write a Parameter Number Unit. **Destructive — modifies drive parameters.** For Reference Offset commissioning: pnu=24700 (0x607C), valueHex=little-endian INT32. Always read first with edcon_pnu_read to confirm current value before writing.","write_action":true,"price_micros":0,"input_schema":null},{"name":"edcon_position_task","description":"Move the drive to a target position. Drive must already be in Operation Enabled state (call edcon_drive_control action=enable_powerstage first).","write_action":false,"price_micros":0,"input_schema":null},{"name":"explain_error_code","description":"Decode Festo/CODESYS/EtherCAT error codes using ALL embedded references. USE WHEN: any Festo/CODESYS/EtherCAT error code appears — 0x…, 16#…, drive fault, AL status. Never guess meanings. Accepts hex (0x7500), IEC (16#8011), or decimal formats. Searches: CiA 402, Festo PtP, CODESYS ground truth, ALL embedded topics, and all device manuals. If not found locally, search the web — then save useful fi","write_action":false,"price_micros":0,"input_schema":null},{"name":"generate_plcopen_xml","description":"Batch-convert a directory of .st files into a single PLCopen TC6 0200 XML for CODESYS import. USE WHEN: .st sources are final and reviewed, and the user wants a CODESYS-importable file. ALWAYS BEFORE: plc_knowledge topic 'ground-truth' (anti-hallucination XML rules) if you have not loaded it this session. ALWAYS AFTER: validate_plcopen_xml -> validate_plcopen_xsd -> validate_plcopen_semantic. Neve","write_action":false,"price_micros":0,"input_schema":null},{"name":"ide_browse_project_tree","description":"Returns the hierarchical structure of the open project as JSON. Walks devices, applications, POUs, GVLs, folders. Read-only. Use this to discover what's in a project before reading or modifying specific POUs.","write_action":false,"price_micros":0,"input_schema":null},{"name":"ide_compile_project","description":"Runs Build on the project. Look at the Message Store after for compile errors.","write_action":true,"price_micros":0,"input_schema":null},{"name":"ide_create_method","description":"Creates a Method on an existing FB.","write_action":true,"price_micros":0,"input_schema":null},{"name":"ide_create_pou","description":"Creates Program / FunctionBlock / Function inside a CODESYS project. Parent path uses '/' segments. Application root is typically \"Application\". For example: parentPath=\"Application\" creates the POU at the Application root.","write_action":true,"price_micros":0,"input_schema":null},{"name":"ide_create_project","description":"Copies a CODESYS Standard.project template to a new path and opens it. Template path comes from FESTO_MCP_CODESYS_TEMPLATE env var (or pass templatePath explicitly). Requires FESTO_MCP_CODESYS_PATH and FESTO_MCP_CODESYS_PROFILE.","write_action":true,"price_micros":0,"input_schema":null},{"name":"ide_create_property","description":"Creates a Property (getter+setter pair) on an existing FB.","write_action":true,"price_micros":0,"input_schema":null},{"name":"ide_get_device_tree","description":"Returns the device hierarchy (PLC + I/O modules + bus configuration). Read-only. Crucial for Festo CPX-E setups where opening Device Editor in the GUI can crash; this script-based reading is robust. Set includeParameters=true to also include device parameter values (Symbol Configuration / IO mapping context).","write_action":false,"price_micros":0,"input_schema":null},{"name":"ide_get_pou_code","description":"Returns the Structured Text declaration and implementation of a POU. Read-only. Use before ide_patch_pou_code or ide_set_pou_code to know current state. POU path uses '/' segments (e.g., \"Application/PRG_Main\" or \"Application/Folder/FB_X\").","write_action":false,"price_micros":0,"input_schema":null},{"name":"ide_open_project","description":"Opens an existing .project file in the running CODESYS IDE. Requires FESTO_MCP_CODESYS_PATH and FESTO_MCP_CODESYS_PROFILE env vars.","write_action":false,"price_micros":0,"input_schema":null},{"name":"ide_patch_pou_code","description":"Replaces an exact text snippet inside a POU's declaration or implementation. The findText MUST occur exactly ONCE in the target section — if 0 matches OR ≥2 matches, the operation fails (forces caller to provide unique context, like Claude Code's Edit tool). Use ide_get_pou_code first to know current text. Safer than ide_set_pou_code for surgical edits.","write_action":true,"price_micros":0,"input_schema":null},{"name":"ide_save_project","description":"Persists pending changes of the open project to disk.","write_action":false,"price_micros":0,"input_schema":null},{"name":"ide_set_pou_code","description":"Sets textual_declaration and/or textual_implementation of an existing POU. Pass either or both. Path: 'Application/POUName'.","write_action":false,"price_micros":0,"input_schema":null},{"name":"plc_knowledge","description":"","write_action":false,"price_micros":0,"input_schema":null},{"name":"plc_library","description":"Access the 38-block reusable ST library (30 Function Blocks + 8 shared DUTs) — ALWAYS check here BEFORE creating new FBs. USE WHEN: about to create any FB, or looking for ready-made motor/valve/PID/sensor/safety logic. Actions: 'search' (keyword match), 'list' (browse by category), 'get' (full source code). Categories: types (8), motion (4), actuators (5), sensors (4), safety (2), system (5), util","write_action":false,"price_micros":0,"input_schema":null},{"name":"plc_lookup","description":"Quick lookup for PLC conventions and error codes — instant answers without loading full knowledge topics. USE WHEN: you need a single fact — prefix, state number, error code — without loading a full topic. Try this BEFORE plc_knowledge for point lookups. Actions: 'hungarian' (type→prefix), 'type_prefix' (POU→prefix), 'state' (state number→name), 'error_code' (decode Festo/CiA402/CODESYS error), 'f","write_action":false,"price_micros":0,"input_schema":null},{"name":"plc_validate","description":"Validate PLC code against conventions — composable validators with consistent results. USE WHEN: you need to check ST against conventions programmatically — naming, FB interface, or state machine — without a full review. Actions: 'naming' (check variable names + Hungarian notation), 'fb_interface' (check FB pattern), 'state_machine' (check nState pattern), 'batch' (validate multiple items at once)","write_action":false,"price_micros":0,"input_schema":null},{"name":"review_st_code","description":"Validate ST code against naming conventions — returns ONLY violations, not reference dumps. USE WHEN: immediately after writing or editing any ST code. Checks: Hungarian notation (b=BOOL, n=INT, r=REAL, t=TIME, fb=FB instance), POU prefixes (FB_, PRG_, FC_), FB interface pattern (bEnable/bDone/bBusy/bErr/nErrId), state machine (0=IDLE, 90=DONE, 99=ERROR), snake_case detection. Includes quick-refer","write_action":false,"price_micros":0,"input_schema":null},{"name":"st_find_references","description":"Find all references (usages) of an ST identifier across a directory of .st files — token-aware and comment/string-safe (unlike grep: ignores comments, strings, typed literals, and substring matches). USE WHEN: you need every usage of an ST identifier across files before renaming or refactoring. Each reference carries file, line/column, the line text, the containing POU, whether it is the declarati","write_action":false,"price_micros":0,"input_schema":null},{"name":"st_symbols","description":"","write_action":false,"price_micros":0,"input_schema":null},{"name":"validate_plcopen_semantic","description":"","write_action":false,"price_micros":0,"input_schema":null},{"name":"validate_plcopen_xml","description":"","write_action":false,"price_micros":0,"input_schema":null},{"name":"validate_plcopen_xsd","description":"","write_action":false,"price_micros":0,"input_schema":null}],"scan":{"score":92,"grade":"A","scanned_at":"2026-09-25T21:42:37.260Z","report":{"scannerVersion":"0.1.9","scannedAt":"2026-09-25T21:42:37.226Z","components":{"code":{"score":25,"max":25,"notes":["126 source files scanned"]},"reliability":{"score":-1,"max":20,"notes":["no gateway calls yet and no remote to probe"]},"poisoning":{"score":-1,"max":15,"notes":["tools not inspected (local package is not executed); not counted"]},"auth":{"score":12,"max":15,"notes":["local package, no credentials required"]},"maintenance":{"score":15,"max":15,"notes":["last push 7 days ago"]},"identity":{"score":8,"max":10,"notes":["registry namespace matches repository owner","GitHub account older than a year"]}},"findings":[],"inputs":{"packages":[{"registryType":"npm","identifier":"festo-codesys-mcp","version":"1.0.1","found":true,"license":"MIT","hasInstallScripts":false,"dependencyCount":4,"publishedAt":"2026-07-17T16:56:14.898Z","repositoryUrl":"git+https://github.com/efranceschetti/festo-codesys-mcp.git","weeklyDownloads":37}],"repo":{"found":true,"owner":"efranceschetti","repo":"festo-codesys-mcp","archived":false,"pushedAt":"2026-09-18T22:37:05Z","stars":2,"forks":0,"openIssues":0,"ownerType":"User","ownerAvatarUrl":"https://avatars.githubusercontent.com/u/230871606?v=4","ownerCreatedAt":"2025-09-07T15:31:37Z","license":"MIT"},"icon":{"url":"https://avatars.githubusercontent.com/u/230871606?v=4&s=128","source":"github"},"presence":{"stars":2,"forks":0,"downloadsWeek":37,"license":"MIT","lastPushAt":"2026-09-18T22:37:05.000Z","score":27}}}},"grade_history":[],"reviews":[]}