PLCGateway

Official registry Other

Ask your plant: live PLC data, alarms, history, OEE and reports from your on-premises PLCGateway.

What can you do with PLCGateway?

  • "How many alarms did line 3 have in the last 2 hours?"
  • "What was the filler's OEE today, and where did we lose the most time?"
  • "Summarise the last 24 hours of the tank level trend."
  • "Build a report dashboard with production and energy per shift for line 1." (draft for you to review)
  • "Add the Modbus TCP meter at 192.168.1.40 as 'Compressor 2 energy meter'." (needs the MCP configuration token)

Install

Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).

NPM package @plcgateway/mcp
Claude Code
claude mcp add plcgateway -e 'PLCGATEWAY_URL=<PLCGATEWAY_URL>' -e 'PLCGATEWAY_TOKEN=<your plcgateway_token>' -- npx -y @plcgateway/mcp@0.1.0
JSON configuration (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "plcgateway": {
            "command": "npx",
            "args": [
                "-y",
                "@plcgateway/mcp@0.1.0"
            ],
            "env": {
                "PLCGATEWAY_URL": "<PLCGATEWAY_URL>",
                "PLCGATEWAY_TOKEN": "<your plcgateway_token>"
            }
        }
    }
}

Environment variables

  • PLCGATEWAY_URL required Address of your PLCGateway SCADA or Connect, e.g. http://192.168.1.50:8080
  • PLCGATEWAY_TOKEN required secret API token (PLCGateway → Settings → API token), or the MCP configuration token for device/tag setup

Documentation

From the project's README on GitHub, refreshed weekly. Links open on GitHub.

Contents
  1. PLCGateway MCP
  2. What you can ask
  3. Requirements
  4. Setup
  5. Configuration
  6. Troubleshooting
  7. Links
  8. License

PLCGateway MCP

Connect AI assistants to your plant through PLCGateway.

PLCGateway connects PLCs, CNC machines and controllers (Siemens S7, Modbus, Mitsubishi, Omron, Allen-Bradley, OPC UA and more), and every PLCGateway product has an MCP server built in. This package is a small stdio bridge: MCP clients that start servers as a command (Claude Desktop, Cursor, Cline, Windsurf, …) run it, and it forwards everything to your PLCGateway on your network.

AI client ──stdio──▶ @plcgateway/mcp ──HTTP (your network)──▶ PLCGateway on your premises ──▶ PLCs & machines
  • PLCGateway runs on your premises. The bridge talks only to the address you give it; it collects nothing and sends nothing elsewhere.
  • The assistant works with the rights of the token you give it, the same roles as people.

What you can ask

  • "How many alarms did line 3 have in the last 2 hours?"
  • "What was the filler's OEE today, and where did we lose the most time?"
  • "Summarise the last 24 hours of the tank level trend."
  • "Build a report dashboard with production and energy per shift for line 1." (draft for you to review)
  • "Add the Modbus TCP meter at 192.168.1.40 as 'Compressor 2 energy meter'." (needs the MCP configuration token)

Requirements

  • PLCGateway SCADA or Connect, reachable from the computer running the AI client, with MCP enabled
  • An API token: PLCGateway → Settings → API token (operator rights: read, write, alarm acknowledgement)
  • Node.js 18.17 or newer

For setup work (adding devices and tags) create the MCP configuration token in Settings and switch it off when done.

Setup

Claude Desktop, Cursor, Cline and other stdio clients
{
  "mcpServers": {
    "plcgateway": {
      "command": "npx",
      "args": ["-y", "@plcgateway/mcp"],
      "env": {
        "PLCGATEWAY_URL": "http://192.168.1.50:8080",
        "PLCGATEWAY_TOKEN": "<your API token>"
      }
    }
  }
}
Clients that support HTTP MCP directly

You don't need this package; connect straight to PLCGateway:

{ "mcpServers": { "plcgateway": { "type": "http", "url": "http://192.168.1.50:8080/mcp",
                                   "headers": { "Authorization": "Bearer <your API token>" } } } }
On the PLCGateway computer itself

plcgateway-scada --mcp-stdio (or plcgateway-connect --mcp-stdio) can be added as the command directly.

Configuration

VariableFlagDescription
PLCGATEWAY_URL--urlPLCGateway address, e.g. http://192.168.1.50:8080 (/mcp is added if missing)
PLCGATEWAY_TOKEN--tokenAPI token or MCP configuration token. Prefer the environment variable.
PLCGATEWAY_TIMEOUT--timeoutRequest timeout in seconds (default 120)

For HTTPS with your own certificate authority, set NODE_EXTRA_CA_CERTS=/path/to/ca.pem.

Troubleshooting

The bridge logs to stderr (visible in your client's MCP logs).

MessageWhat to check
PLCGateway not reachableAddress and port, firewall, PLCGateway running
HTTP 401/403The token (Settings → API token); a regenerated token replaces the old one
HTTP 404MCP is disabled in PLCGateway settings, or the URL points elsewhere

License

The bridge in this repository is MIT licensed. PLCGateway itself is proprietary software, licensed separately.

Frequently asked questions

What is PLCGateway?

Ask your plant: live PLC data, alarms, history, OEE and reports from your on-premises PLCGateway.

How do I install PLCGateway?

It runs on your machine. In Claude Code: claude mcp add plcgateway -e 'PLCGATEWAY_URL=<PLCGATEWAY_URL>' -e 'PLCGATEWAY_TOKEN=<your plcgateway_token>' -- npx -y @plcgateway/mcp@0.1.0. For other clients, paste the JSON configuration from this page into their MCP settings.

Does PLCGateway need an API key?

Yes. It expects PLCGATEWAY_URL, PLCGATEWAY_TOKEN, which you set in its configuration.

Is PLCGateway open source?

Its code is public on GitHub, but the repository does not declare a standard license.

Who maintains PLCGateway?

It is published by CybriantOps. AI.tn lists it but does not maintain or endorse it.

From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.