Skip to main content
Glama
KUKA KRL MCP Server

KUKA KRL MCP Server

by LiskinLabs

KUKA KRL MCP Server

License: MIT MCP KUKA

Official open-source Model Context Protocol (MCP) server for KUKA Robot Language (KRL) and KUKA System Software (KSS 8.3–8.7).

Empowers AI coding assistants (Cursor, Google Antigravity, Claude Desktop, Claude Code CLI, Windsurf, Copilot) with industrial robotics knowledge, motion safety analysis, KSS error diagnosis, workspace continuous verification, and live controller telemetry.


Architecture: Hybrid Three-Tier Pipeline

flowchart TD
    subgraph Clients["AI Clients & IDEs"]
        Cursor["Cursor AI"]
        Antigravity["Antigravity IDE"]
        Claude["Claude Desktop / CLI"]
        Windsurf["Windsurf"]
    end

    subgraph MCP["kuka-krl-mcp (stdio)"]
        T0["Tier 0: Standalone Knowledge<br/>(System Vars, KSS Alarms, Syntax, Offline Lint)"]
        T1["Tier 1: Workspace Intelligence<br/>(SRC-DAT sync, Project diagnostics)"]
        T2["Tier 2: Pro Industrial Suite<br/>(Live Telemetry, Auto-Repair, Control Flow)"]
    end

    subgraph IDE["LiskinLabs KUKA KRL Extension"]
        Bridge["Local Bridge Server<br/>(127.0.0.1 + Token)"]
        KRC["KUKA Robot Controller<br/>(KRC4 / KRC5 / Virtual)"]
    end

    Clients --> MCP
    T0 -->|"Offline / Free"| MCP
    T1 --> Bridge
    T2 --> Bridge
    Bridge --> KRC
  1. Tier 0: Standalone Knowledge (Free & Offline):

    • Instant access to KSS system variables ($TOOL, $BASE, $OV_PRO, $VEL, $ACC, $IN, $OUT, $TIMER).

    • KSS alarm catalog (codes 1, 14, 20, 67, 71, 1376, 1422, 2858) with root cause analysis and SmartPAD reset steps in 6 languages.

    • KRL motion syntax reference (PTP, LIN, CIRC, SPLINE, INTERRUPT, TRIGGER, FOLD).

    • Fast static linter for code snippets.

  2. Tier 1: Workspace Intelligence (Requires KUKA KRL Extension):

    • Project-wide continuous diagnostics, SRC↔DAT pair integrity, CIRC 2-point geometry, physical I/O ranges.

  3. Tier 2: Professional Industrial Suite (Requires KUKA KRL Pro):

    • Deep industrial safety audit (advance run hazards, turn unwinding, payload limits).

    • Safe auto-repair with verified code diffs.

    • Real-time controller telemetry reading (actual TCP position, joint angles, active program line pointer, SmartPAD alarms).


Related MCP server: Studio5000 AI-Powered PLC Programming Assistant MCP Server

Quickstart & Client Configuration

1. Cursor

Add to your project's .cursor/mcp.json or Cursor Settings > MCP:

{
  "mcpServers": {
    "kuka-krl": {
      "command": "npx",
      "args": ["-y", "kuka-krl-mcp"]
    }
  }
}

Note: If you have the LiskinLabs KUKA KRL Extension installed in Cursor, the extension automatically registers the MCP server with the local bridge credentials at startup!

2. Google Antigravity IDE

In Antigravity settings or ~/.gemini/antigravity/mcp_config.json:

{
  "mcpServers": {
    "kuka-krl": {
      "command": "npx",
      "args": ["-y", "kuka-krl-mcp"]
    }
  }
}

3. Claude Desktop

Add to %APPDATA%\Claude\claude_desktop_config.json (Windows) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):

{
  "mcpServers": {
    "kuka-krl": {
      "command": "npx",
      "args": ["-y", "kuka-krl-mcp"]
    }
  }
}

4. Claude Code CLI

claude mcp add kuka-krl npx -y kuka-krl-mcp

Available MCP Tools

Tool

Tier

Description

krl_lookup_system_var

0

Looks up KSS system variables ($TOOL, $BASE, $OV_PRO, $VEL.CP, etc.) with types, syntax, and examples in 6 languages (EN, RU, DE, ES, IT, TR).

krl_lookup_kss_message

0

Decodes KSS error numbers (e.g. 1376, 67, 2858) into root causes and SmartPAD step-by-step remediation procedures.

krl_syntax_reference

0

Provides language reference and code examples for PTP, LIN, CIRC, SPLINE, INTERRUPT, TRIGGER, FOLD, WAIT, CONTINUE.

krl_lint_snippet

0

Fast offline static linter: detects uninitialized $TOOL/$BASE, infinite loops, div-by-zero, unbalanced folds, and out-of-bound I/O.

krl_workspace_diagnostics

1

Full project diagnostics across all .src, .dat, .sub files in active IDE workspace.

krl_workspace_files

1

Discovers and lists all KRL modules in the active workspace.

krl_read_file

1

Reads workspace KRL program text for contextual AI reasoning.

krl_deep_safety_audit

2 (Pro)

Advanced industrial safety analysis: subprogram advance run hazards, payload verification, actuator-sensor races.

krl_safe_auto_repair

2 (Pro)

Automatically fixes BOM/encoding, advance run hazards, fold desyncs, and trailing spaces.

krl_control_flow

2 (Pro)

Generates Control Flow Graphs and Mermaid flowchart diagrams.

krl_live_telemetry

2 (Pro)

Real-time operational telemetry from physical or virtual KUKA controller (TCP coordinates, axis angles, override, SmartPAD alarms).

krl_bridge_status

0

Diagnostic tool checking local extension bridge connection and license state.


MCP Prompts

  • krl-expert-review: Guides the AI model to perform a rigorous industrial safety review according to KSS standards.

  • krl-diagnose-alarm: Guides the AI to analyze alarm codes from SmartPAD screenshots or logs and generate corrective action plans.


MCP Resources

  • krl://system-vars: Machine-readable JSON catalog of core KSS system variables.

  • krl://syntax-guide: Complete KRL language keyword and syntax reference.


Unlocking Workspace Intelligence & Live Bridge

To connect kuka-krl-mcp with your project files and live robots:

  1. Install the official KUKA KRL Extension for VS Code / Cursor.

  2. Open your KUKA project folder.

  3. The extension automatically starts a secure local loopback bridge on 127.0.0.1 and authenticates your AI assistant.


License

MIT © LiskinLabs. Developed by Silvestr Liskin. Industrial robotics and automation solutions.

Available Tools

12 tools
krl_bridge_statusB

Checks connection status between this MCP server and the LiskinLabs KUKA KRL extension local bridge.

Inputs: no named parameters.

krl_control_flowA

Generates an execution Control Flow Graph (CFG) and Mermaid diagram for a KRL routine. Requires KUKA KRL Professional license.

Inputs: code (required).

krl_deep_safety_auditA

Performs deep industrial robot safety and motion verification (subprogram advance run hazards, payload verification, actuator-sensor races, turn unwind risks). Requires KUKA KRL Professional license.

Inputs: code (required).

krl_lint_snippetA

Fast offline static code analysis for KRL code snippets. Detects uninitialized $TOOL/$BASE, infinite loops without EXIT, literal division by zero, unbalanced ;FOLD/;ENDFOLD blocks, physical I/O bound overflows, and non-ASCII characters.

Inputs: code (required).

krl_live_telemetryA

Reads real-time operational telemetry from connected physical or virtual KUKA Robot Controller (robot model, KSS version, actual TCP position, joint angles, current line pointer, override $OV_PRO, mode T1/T2/AUT/EXT, active SmartPAD error alarms). Requires KUKA KRL Professional license and active controller connection.

Inputs: no named parameters.

krl_lookup_kss_messageA

Resolves KUKA KSS error and status message numbers (e.g. 1, 14, 20, 67, 68, 71, 72, 1376, 1422, 2858) into localized explanations, root causes, and industrial troubleshooting remediation steps.

Inputs: message_id (required), locale.

krl_lookup_system_varB

Looks up a KUKA System Software (KSS 8.3-8.7) system variable ($TOOL, $BASE, $OV_PRO, $VEL, $ACC, $POS_ACT, $IN, $OUT, $TIMER, $ADVANCE) with description, type, range, read/write permissions, syntax and examples in 6 languages.

Inputs: var_name (required), locale.

krl_read_fileA

Reads the text content of a KRL program or data file from the active IDE workspace. Requires LiskinLabs KUKA KRL extension.

Inputs: path (required).

krl_safe_auto_repairB

Automatically repairs common KRL hazards (BOM/encoding corruption, advance run desyncs, unbalanced inline form folds, trailing whitespace, uncommitted payload) and outputs verified repaired code. Requires KUKA KRL Professional license.

Inputs: code (required).

krl_syntax_referenceB

Provides authoritative syntax definitions and examples for KUKA KRL statements (PTP, LIN, CIRC, SPLINE, INTERRUPT, TRIGGER, FOLD, WAIT, CONTINUE) in 6 languages.

Inputs: keyword (required), locale.

krl_workspace_diagnosticsA

Collects project-wide continuous KRL diagnostics across all open .src, .dat, and .sub files from the active VS Code / Cursor / Antigravity workspace (SRC-DAT pair integrity, CIRC 2-point geometry, physical I/O ranges, FOLD balance, duplicate GLOBAL DEFs). Requires LiskinLabs KUKA KRL extension.

Inputs: no named parameters.

krl_workspace_filesB

Lists all KUKA KRL robot programs (.src), data files (.dat), and submit interpreters (.sub) in the active workspace. Requires LiskinLabs KUKA KRL extension.

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 12 tools

    Disambiguation4/5

    Each tool has a discernible scope: lookups (system vars, KSS messages), syntax reference, snippet lint, workspace diagnostics, safety audit, repair, and telemetry are textually distinct. The only mild overlap is in the static-analysis family (krl_lint_snippet vs krl_workspace_diagnostics vs krl_deep_safety_audit), but descriptions clearly separate offline-snippet, project-wide, and motion/payload-safety concerns.

    Naming Consistency4/5

    All 12 tools share the krl_ prefix and snake_case formatting with descriptive multi-word suffixes, giving a predictable namespace. There is a minor style split between verb-first names (krl_read_file, krl_lint_snippet, krl_lookup_*) and noun-phrase names (krl_syntax_reference, krl_control_flow, krl_live_telemetry), but readability and consistency remain high.

    Tool Count5/5

    Twelve tools is a well-scoped set for a KRL development/assistant server, with each tool covering a distinct capability (connection, telemetry, references, analysis, repair, workspace access). No filler or redundant tools are apparent.

    Completeness4/5

    The surface covers the core read/analyze/repair lifecycle plus live controller telemetry and reference lookups, which is broad for the domain. Gaps remain: there is no write/save-file or create-program tool (krl_safe_auto_repair only returns repaired text), and no cross-workspace symbol search, but agents can work around these.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to interact with B\&R Automation Studio projects by building code, running ARsim simulators, and reading or writing OPC UA variables. It facilitates industrial automation development and real-time variable integration through natural language commands.
      17
      MIT
    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to connect to Allen-Bradley, Siemens, and CODESYS PLC projects for discovering, asking questions about, analyzing, and proposing code changes, with access to live tag values and version exports under permission-scoped controls.
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to automate CODESYS V3 PLC development, including project editing, builds, library and alarm management, online variable read/write/force operations, and CODESYS documentation search via MCP.
      4
      MIT