MCP Server (AI Assistant Integration)
The edge box itself is an MCP server. An AI assistant like Claude asks the box at the field site directly — how many OPC connections there are, what the current value of this tag is, whether collection is falling behind.
It does not go through the platform. Even if the box is disconnected from the platform, as long as you can reach the box, it will answer.
| Item | Value |
|---|---|
| Endpoint | POST https://<엣지>/api/v1/mcp |
| Transport | Streamable HTTP, stateless |
| Server name | plantpulse-edge (it advertises the box's own version) |
| Provided | 6 tools — all read-only |
| Authentication | Same API key as /api/*. No MCP-specific authentication |
How to connect
# Claude Code
claude mcp add --transport http plantpulse-edge "https://<엣지>/api/v1/mcp" \
--header "X-API-Key: <edge.rest.api.key>"
// Claude Desktop — .mcp.json
{
"mcpServers": {
"plantpulse-edge": {
"type": "http",
"url": "https://<엣지>/api/v1/mcp",
"headers": { "X-API-Key": "<edge.rest.api.key>" }
}
}
}
You can also use Authorization: Bearer <key> instead of X-API-Key. The key is the same value as the REST API (edge.rest.api.key) — see REST API.
http://, you get 403 — even if the key is correct, it's rejectedThe default for edge.rest.api.https_only is true, so external client calls (X-API-Key · Bearer) must use HTTPS. If it comes in plaintext, it's dropped with 403 HTTPS_REQUIRED before the key is even looked at.
If you're behind a reverse proxy, X-Forwarded-Proto: https is also accepted. If the connection is refused, don't suspect the key first — check the scheme. If you get a 403 instead of a 401, this is the reason.
/api/* returns 500edge.rest.api.auth defaults to true (fail-closed), and in this case, if edge.rest.api.key is empty, the box blocks all /api/* requests with 500 MISCONFIGURED. It's not "allow if no configuration" — it's "block if no configuration." This is intentional: it prevents a box with a lost configuration file from opening up without authentication.
/api/* calls made by the /ui/* screen on the same domain pass through because they're already authenticated sessions. The API key is meant to protect external calls (REST clients · Node-RED · MCP).
The 6 tools — all read-only
| Tool | What it does | Required arguments |
|---|---|---|
list_opcs | List of OPC connections configured on this box | — |
get_opc | Get one OPC connection by id | opcId |
list_tags | Tag list for one OPC connection | opcId |
get_tag_value | Current value of one tag — not a cache, it reads fresh from the device | tagId |
get_monitoring | Health status of this box's collection pipeline | — |
get_transfer_status | Store-and-forward transmission status to the platform | — |
The tools are not new code. They call the very same services the AI chat uses (ConnectService · MonitoringQueryService) — this is to avoid the same question getting different answers from the two paths.
🔴 Tools that move the PLC are deliberately absent
The edge toolset includes start_opc · stop_opc · write_tag. They are not exposed via MCP.
In the chat path, those three go through a human approval screen (/ui/ai/approve). MCP clients don't pass through that screen. And write_tag writes to the PLC — something physical moves. A path without approval must not be able to reach that.
If write tools are genuinely needed later, we'll move the approval into MCP first and then open it up. Adding the tools first is the easiest way to bypass a safeguard. The product has regression tests that enforce this.
Why stateless
Because it fits the shape of a field box. A session-based transport requires the server to hold per-session state, but field lines drop and reconnect as a matter of course, and each time you'd need to recognize the client and reconnect it. If the box restarts, all sessions disappear at once.
Stateless treats each request independently — nothing to reconnect, nothing to lose, and on a device with 2GB of heap, no session table growing.
Verifying the connection
Check that tools/list returns the 6 tools.
Even if the tool scan finds nothing, the MCP server starts up normally — it just reports an empty tools/list. The client can't distinguish that from "this edge has no tools." A broken wiring reads like a fact of the product.
That's why the box logs this state loudly as ERROR. If the list is empty, look for MCP tool scan produced NO tools in the edge logs.
See also
REST API (v1) · Platform MCP Server — the platform side has 22 tools and covers assets, alarms, and ontology