|
Enable AI-powered industrial automation through Model Context Protocol integration.
The AI MCP for Runtime service bridges FrameworX solutions with AI language models, enabling intelligent automation assistance while maintaining industrial-grade safety. This connector exposes your solution's live data and functionality as structured tools that AI models can invoke.
Note: This connector is for querying live data from running solutions (connects to TServer.exe). For AI-assisted solution configuration, see AI MCP for Designer Connector.
| Use Case | Example |
|---|---|
| Process monitoring | "What is the current temperature in Tank1?" |
| Alarm investigation | "Are there any active alarms? What's causing them?" |
| Historical analysis | "Show me the temperature trend for the last 24 hours" |
| Data discovery | "What tags are available under Plant1/Line2?" |
| Operational questions | "What is the system uptime?" |
The MCP Server starts automatically when your solution runs. You need to configure your AI client to connect to it.
| Method | Use Case | Requirements |
|---|---|---|
| stdio | AI client on same machine as solution | Local installation |
| HTTP | AI client on different machine | Network access, optional SSL |
| SSE | Server-sent events | Not yet tested |
Use stdio when the AI client runs on the same machine as your solution.
Configure Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"YourSolution": {
"command": "C:\\FrameworX\\fx-10\\net8.0\\TMCPServerStdio\\TMCPServerStdio.exe",
"args": ["/host:127.0.0.1", "/port:3101"],
"transport": "stdio"
}
}
}
Note: For Windows-only solutions, use the path
<ProductPath>\fx-10\TMCPServerStdio\TMCPServerStdio.exe(without net8.0).
Use HTTP when the AI client runs on a different machine than your solution.
MCP Server Settings (TMCPServerHttp.json in C:\Users\Public\Documents\FrameworX\MachineSettings):
{
"appSettings": {
"X_API_KEY": "",
"CertFileName": "",
"CertPass": "",
"CertHash": "",
"ListenPort": "3000",
"Runtime": {
"Host": "localhost",
"Port": "3101",
"Username": "guest",
"Password": ""
}
}
}
AI Client Settings (GitHub Copilot .mcp.json):
{
"servers": {
"FrameworX Runtime": {
"type": "http",
"url": "http://localhost:3000",
"headers": {
"X-API-KEY": ""
}
}
}
}
HTTP Settings Reference:
| Setting | Description |
|---|---|
X_API_KEY | Optional authentication password |
CertFileName | SSL certificate file (for HTTPS) |
CertPass | SSL certificate password |
CertHash | SSL certificate thumbprint (alternative to file) |
ListenPort | HTTP endpoint port (default: 3000) |
Runtime.Host | FrameworX runtime host (default: localhost) |
Runtime.Port | FrameworX runtime port (default: 3101) |
Runtime.Username | Runtime authentication user |
Runtime.Password | Runtime authentication password |
Multiple Connections: To connect to multiple runtimes, use /instance:<number> argument and matching numbered settings (e.g., X_API_KEY2, ListenPort2, Runtime2).
AI MCP for Runtime provides these built-in tools:
| Tool | Purpose |
|---|---|
| get_value | Get current value of a tag or runtime object |
| get_tag_metadata | Get tag description, units, range, and data type |
| get_children | Browse the Unified Namespace structure |
| search_tags | Find tags by name pattern |
| Tool | Purpose |
|---|---|
| get_tag_history | Query historical time-series data for a tag |
| Tool | Purpose |
|---|---|
| get_active_alarms | Get currently active alarms |
| query_alarm_database | Query historical alarm records |
Reading Values:
Browsing Data:
Historical Analysis:
Alarm Investigation:
You can extend the MCP server with your own solution-specific tools by creating custom methods in Scripts.
[McpServerTool, Description("Get current tank level for a specific tank")]
public string get_tank_level(
[Description("Tank identifier (1-4)")] string tank_id = "1")
{
return @Tag[$"Tank{tank_id}_Level"].ToString();
}
Method Structure:
| Element | Purpose |
|---|---|
[McpServerTool] | Marks method as MCP tool |
[Description("...")] | Explains what the tool does (shown to AI) |
| Method name | Tool name (use snake_case) |
| Parameter descriptions | Explains expected input to AI |
| Return value | Result sent to AI |
Simple Value Retrieval:
[McpServerTool, Description("Get production count for today")]
public string get_production_count()
{
return @Tag.Production.TodayCount.ToString();
}
With Error Handling:
[McpServerTool, Description("Get data for a specific tag with validation")]
public string get_tag_data(
[Description("Full tag path")] string tag_name)
{
try
{
if (!@Tag.Exists(tag_name))
return $"Error: Tag '{tag_name}' not found";
return @Tag[tag_name].ToString();
}
catch (Exception ex)
{
@Info.Trace($"MCP Error: {ex.Message}");
return "Error: Unable to retrieve data";
}
}
Aggregated Data:
[McpServerTool, Description("Get summary of all tank levels")]
public string get_all_tank_levels()
{
var result = new StringBuilder();
for (int i = 1; i <= 4; i++)
{
var level = @Tag[$"Tank{i}_Level"].Value;
result.AppendLine($"Tank {i}: {level}%");
}
return result.ToString();
}
Important: After creating or modifying custom methods, fully restart the AI client (close from Task Manager, not just the window).
X_API_KEY authentication for HTTP connectionsMCP Server not starting
AI cannot access methods
Data not updating
Custom methods not appearing
HTTP connection failing
http://localhost:3000 first before remote accessBuild your first MCP connection step by step:
Explore a complete working example:
For AI-assisted solution configuration (creating tags, displays, alarms):