MCP Server¶
The Model Context Protocol (MCP) server exposes Adsify’s PLC capabilities to AI assistants. Instead of manually constructing API calls, users can interact with PLCs through natural language — asking an AI assistant to read variables, browse symbols, or check EtherCAT health.
Endpoint¶
Model Context Protocol server endpoint. Enforces the |
Transport: Streamable HTTP with SSE fallback.
Feature Flag¶
The MCP server is disabled by default. Enable it in configuration:
{
"Features": {
"Mcp": { "Enabled": true }
}
}
Authentication¶
The MCP endpoint uses the same authentication as the REST API:
Production: JWT Bearer token required. The
/mcpendpoint enforces theReadAccesspolicy. Thewrite_variabletool enforcesWriteAccessinternally.Development: When no
Authorityis configured, authentication is bypassed.
Tools¶
The tools are specified in MCP Tools (SPEC_MCP_TOOLS).
Tool |
Description |
Auth |
|---|---|---|
|
List all configured PLCs with connection status |
ReadAccess |
|
Get connection state and device info for a PLC |
ReadAccess |
|
Read a PLC variable by symbol path |
ReadAccess |
|
Batch read multiple variables |
ReadAccess |
|
Write a value to a PLC variable |
WriteAccess |
|
List/search symbols at a path or by pattern |
ReadAccess |
|
Get detailed type info for a symbol |
ReadAccess |
|
Get PLC device name, version, state |
ReadAccess |
|
Get EtherCAT master state and slave summary |
ReadAccess |
|
Get detailed info for a specific EtherCAT slave |
ReadAccess |
Resources¶
The resources are specified in MCP Resources (SPEC_MCP_RESOURCES).
Resource URI |
Description |
|---|---|
|
List of all PLCs with status |
|
Current PLC device state |
|
Root-level symbol tree |
|
EtherCAT diagnostics summary |
Client Configuration¶
Claude Code¶
claude mcp add --transport http --scope user adsify http://localhost:5000/mcp
Claude Desktop¶
Add to claude_desktop_config.json:
{
"mcpServers": {
"adsify": {
"type": "http",
"url": "http://localhost:5000/mcp",
"headers": {
"Authorization": "Bearer <jwt-token>"
}
}
}
}
VS Code (GitHub Copilot)¶
Add to .vscode/mcp.json:
{
"servers": {
"adsify": {
"type": "http",
"url": "http://localhost:5000/mcp",
"headers": {
"Authorization": "Bearer <jwt-token>"
}
}
}
}
In development mode (no Authority configured), no Authorization header is needed.
Example Prompts¶
Once connected, try asking your AI assistant:
“Is the PLC running? What’s the current state?”
“Read all motor parameters and tell me if anything looks abnormal”
“What symbols are available under GVL?”
“Show me the EtherCAT slave health – are any in error state?”