|
Enable AI-powered industrial automation through Model Context Protocol integration.
The AI 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 Designer Connector](AI Designer Connector).
| AI Model | ↔ | MCP Protocol | ↔ | FrameworX Solution | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Claude, GPT, GitHub Copilot | Model Context Protocol | TServer.exe (Runtime) | ||||||||||
| ↓ | ||||||||||||
| Structured Methods | ||||||||||||
| ||||||||||||
This diagram shows an AI model (such as Claude or GPT) communicating with a FrameworX solution through the MCP Protocol, which acts as a standardized bridge for exchanging context and invoking tools. FrameworX then exposes structured methods that the model can call to access tag data, query historical records, monitor alarms, and run custom operations.
| 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?" |
Some platforms may offer only built-in MCP tools that let AI read or write tags, or run queries, or perform specific tasks in the platform. In practice, this approach has limited value:
FrameworX approach: Custom Runtime Tools
Because FrameworX compiles .NET code at runtime, you can create domain-specific tools that expose exactly what you want, with descriptions that guide AI to correct usage. External applications query at the semantic level: "get tank levels" instead of "read Tag.Area1.Tank3.LT001.PV".
This gated access model means:
| Generic Tools | Custom Tools |
|---|---|
| AI needs to know exact tag paths | AI uses semantic descriptions |
| Full system access (security risk) | You control what's exposed |
| Requires tag naming knowledge | Natural language queries |
| Hallucination can cause errors | Validation in your code |
The MCP Server starts automatically when your solution runs. You need to configure your AI client to have the solution connector.
| Method | Use Case | Requirements |
|---|---|---|
| stdio | AI client on same machine as solution | Local installation |
| HTTP | AI client on different machine | Network access, optional SSL |
Use stdio when the AI client runs on the same machine as your FrameworX solution.
Step 1 — Open the Claude configuration folder
Press Win + R, type %APPDATA%\Claude, and press Enter.
Step 2 — Edit claude_desktop_config.json
Open the file and add the following configuration. Adjust the runtime folder in the path to match your FrameworX version (net8.0 for 10.1.4 and earlier, net10.0 for 10.1.5 and later):
{
"mcpServers": {
"MCPRuntime": {
"command": "C:\\Program Files\\Tatsoft\\FrameworX\\fx-10\\net8.0\\RuntimeMCP.exe",
"args": ["/host:127.0.0.1", "/port:3101"],
"transport": "stdio"
}
}
} |
The product path may vary depending on where you performed the installation, but this is the default location. The connector name can be modified changing MCPRuntime in the file above to any other name. |
Use HTTP mode when the AI client runs on a different machine from the FrameworX solution.
1. (Optional) Configure server settings
If you need to change the port, set an API key, or configure TLS, edit this file before starting the server:
C:\Users\Public\Documents\FrameworX\MachineSettings\RuntimeMCPHttp.json
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 |
{
"appSettings": {
"X_API_KEY": "",
"CertFileName": "",
"CertPass": "",
"CertHash": "",
"ListenPort": "10120",
"Runtime": {
"Host": "localhost",
"Port": "3101",
"Username": "guest",
"Password": ""
}
}
}Security note: Set a strong |
2. Start the HTTP server
Run "C:\Users\<user>\Documents\FrameworX\Utilities\StartRuntimeMCPHttp.bat" on the machine where your FrameworX solution is running.
Replace <RemoteIP> with the IP address or hostname of the server machine.
GitHub Copilot (.mcp.json)
{
"servers": {
"FrameworX Runtime": {
"type": "http",
"url": "http://<RemoteIP>:10120",
"headers": {
"X-API-KEY": "<your-api-key>"
}
}
}
}
Claude Desktop / Claude.ai (.mcp.json)
Prerequisite: Node.js must be installed on the client machine. |
{
"mcpServers": {
"FrameworX Runtime": {
"command": "C:\\WINDOWS\\System32\\cmd.exe",
"args": [
"/C",
"C:\\Program Files\\nodejs\\npx.cmd",
"-y",
"mcp-remote",
"http://<RemoteIP>:10120/mcp",
"--allow-http"
]
}
}
}
|
Multiple Connections: To connect to multiple runtimes, use /instance:<number> argument and matching numbered settings (e.g., X_API_KEY2, ListenPort2, Runtime2).
AI Runtime provides 9 built-in platform tools plus solution-authored custom tools, organized by category. Each category is gated independently in Solution Settings → Data Servers → MCP for Runtime; runtime_connect is gated only by the master toggle so AI clients can bootstrap before any sub-category is enabled.
| Tool | Purpose |
|---|---|
| runtime_connect | Connect to a FrameworX runtime and receive the Context Package (solution identity, profile, namespaces, quality codes, tool workflows, objType schemas, custom tools). Call this first at the start of every session. No-args returns the current Context Package for the runtime this MCP is bound to. On HTTP retargetable instances, accepts optional solution and profile arguments to rebind to a different running TServer before returning. |
Tools for querying live data and structure from the runtime Object Model — the 12-root hierarchy that includes the Unified Namespace (Tag.*) plus the built-in namespaces (Server, Client, Alarm, Device, Historian, Dataset, Script, Display, Security, Report, Info).
| Tool | Purpose |
|---|---|
| runtime_get_value | Get the current LIVE value of a tag or runtime object, including quality (0=Bad, 64=Uncertain, 192=Good), timestamp, and metadata (description, units, min/max). For historical values, use runtime_get_tag_history. |
| runtime_browse_object_model | Browse the live runtime object-model tree — returns child nodes at the specified path. Works across all roots: Tag → root tag folders; Tag.Plant1/Line2 → tags inside a folder; Tag.Pump1 → UserType members; Server, Alarm.Group, Device.Channel, and so on. Bounded by max_results. |
| runtime_search_uns | Ranked semantic search across the live UNS — UserTypes, Tags, members, Enumerations, and AssetTree folders. Scores across Name, DisplayText, Labels, SourceIri, and Attributes annotation content. Returns ranked matches with matchReason, snippet, and score. Tag matches include live value, quality, and timestamp. |
| runtime_describe_object | Describe a single UNS object — inheritance chain, derived UDTs, and (for Tag paths) live current value, quality, timestamp, and alarm state. Pass either path or iri. The iri form reverse-looks up by external SourceIri from an ontology import. |
| runtime_list_instances | List all live tags of a given UDT (UserType), with current value, quality, and timestamp for each. Optional include_derived=true expands to subclass UDTs. Optional name_mask narrows to a wildcard pattern (e.g., Motor*, Area1/*, *_Pump). |
Dedicated alarm-query tools that hit the alarm subsystem's state machine and historian. Reading an Alarm.* namespace value through runtime_get_value, or reading a tag's current alarm-state through runtime_describe_object, stays under UNS Tools — those are UNS data reads, not dedicated alarm queries.
| Tool | Purpose |
|---|---|
| runtime_get_active_alarms | Get currently ACTIVE alarms — alarms in alarm state right now, not yet normalized. Returns tag name, message, priority, active time, area, and group. For past normalized alarms, use runtime_query_alarm_history. |
| runtime_query_alarm_history | Query historical alarm records from the Alarm Historian database. Only SELECT statements are allowed; INSERT, UPDATE, DELETE, and other modifying statements are blocked. Available columns: TagName, Message, ActiveTime, AckTime, NormTime, UserName, Priority, Area, GroupName. |
Tools for querying historical time-series data.
| Tool | Purpose |
|---|---|
| runtime_get_tag_history | Query historical time-series data for a tag from the Historian database. The tag must be configured for Historian storage. For the current live value, use runtime_get_value. |
Solution-authored [McpServerTool] methods on Scripts → Classes of type MCP Tool. See the Custom Methods section below for authoring guidance.
Reading Live Values (runtime_get_value):
Browsing the Object Model (runtime_browse_object_model):
Searching the UNS (runtime_search_uns):
Historical Analysis (runtime_get_tag_history):
Active Alarms (runtime_get_active_alarms):
Alarm History (runtime_query_alarm_history):
You can extend the MCP server with your own solution-specific tools by creating custom methods in Scripts.
Tool names in runtime: When naming your runtime tools, it's strongly recommended that you keep the pattern
runtime_<toolName>. When AI is also running AI Designer, or other third-party tools, that helps to correctly identify the right tool to use. For adherence with MCP standards use snake_case for method names (e.g.,runtime_get_tank_level), instead of RuntimeGetTankLevel that would be a typical C# convention.
[McpServerTool, Description("Get current tank level for a specific tank")]
public string runtime_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 runtime_get_production_count()
{
return @Tag.Production.TodayCount.ToString();
}
With Error Handling:
[McpServerTool, Description("Get data for a specific tag with validation")]
public string runtime_get_tag_data(
[Description("Full tag path")] string tag_name)
{
try
{
if ([email protected](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 runtime_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).
Customers upgrading from 10.1.4 should update any AI prompts, solution-authored wrappers, or integration scripts that reference the old tool names. Bit positions in ModelOptions are unchanged — existing solutions decode identically; only the tool surface and category labels changed.
| Old name (10.1.4 and earlier) | 10.1.5 replacement | Notes |
|---|---|---|
runtime_get_info | runtime_connect | Same payload on no-args. HTTP retargetable instances accept optional solution / profile to rebind to a different running TServer. |
runtime_set_target | runtime_connect(solution, profile) | Merged as the with-args branch of runtime_connect. |
runtime_browse_uns | runtime_browse_object_model | Same parameters plus a bounding max_results. Renamed because the tool walks all 12 runtime roots, not just the strict UNS (Tag.*). |
runtime_get_object_context | runtime_describe_object | Same single-object intent; absorbs external-IRI lookup via a new iri parameter. |
runtime_find_by_iri | runtime_describe_object(iri=...) | Merged into runtime_describe_object — different lookup key, same single-object response. |
runtime_list_by_type | runtime_list_instances | Renamed. Adds max_results and name_mask wildcard filter. |
runtime_list_derived_types | — (removed) | Redundant: runtime_describe_object already returns derivedTypes in its context block. |
runtime_search_tags | runtime_search_uns | Broader scope — searches UserTypes, members, Enumerations, and AssetTree folders in addition to Tags. |
X_API_KEY authentication for HTTP connectionsAI Runtime server not starting
AI cannot access methods
Data not updating
Custom methods not appearing
HTTP connection failing
http://localhost:3000 first before remote accessFor AI-assisted solution configuration (creating tags, displays, alarms):
| Version | Date | Changes |
|---|---|---|
| 1.2 | 2026-05 | 9 platform tools (was 7) plus solution-authored custom tools. Session bootstrap unified as runtime_connect (merges runtime_get_info + runtime_set_target). Tool renames for scope-accurate categories: runtime_browse_uns → runtime_browse_object_model (walks all 12 runtime roots); runtime_search_tags → runtime_search_uns (searches UserTypes, members, enums, folders); runtime_get_object_context → runtime_describe_object (absorbs runtime_find_by_iri via iri parameter); runtime_list_by_type → runtime_list_instances with wildcard name_mask. runtime_list_derived_types removed (folded into runtime_describe_object.derivedTypes). Gate-bit categories relabeled to Enable *Tools. |
| 1.1 | 2026-02 | 7 built-in tools; Updated architecture diagram; Added runtime_ prefix best practices. |