Enable AI-powered industrial automation through Model Context Protocol integration.
Preview Connector
This is the preview documentation for version 10.1.3 schedule for release in February, 20th.
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.
| 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 FrameworkX solution through the MCP Protocol, which acts as a standardized bridge for exchanging context and invoking tools. FrameworkX 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 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 |
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\\MCP\\RuntimeMCP.exe",
"args": ["/host:127.0.0.1", "/port:3101"],
"transport": "stdio"
}
}
}Note:
For Windows-only solutions, use the path<ProductPath>\fx-10\MCP\RuntimeMCP.exe(without net8.0).
For releases older than 10.1.3, use the path<ProductPath>\fx-10\TMCPServerStdio\TMCPServerStdio.exe
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 7 built-in tools, organized by function:
| Tool | Purpose |
|---|---|
| runtime_get_info | Get connection details, solution info, and context for using runtime tools. Call this first. |
Tools for querying tags and values from the live Unified Namespace (UNS).
| Tool | Purpose |
|---|---|
| runtime_get_value | Get current value of a tag or runtime object, including metadata (description, units, min/max) |
| runtime_browse_uns | Browse the live Unified Namespace structure to discover available tags and folders |
| runtime_search_tags | Find tags by partial name or description when you don't know the exact path |
Tools for monitoring active alarms and querying alarm history.
| Tool | Purpose |
|---|---|
| runtime_get_active_alarms | Get currently active alarms (not yet normalized) |
| runtime_query_alarm_history | Query historical alarm records from the Alarm Historian database |
Tools for querying historical time-series data.
| Tool | Purpose |
|---|---|
| runtime_get_tag_history | Query historical values for a tag from the Historian database |
eading Live Values (runtime_get_value):
Browsing the Namespace (runtime_browse_uns):
Searching for Tags (runtime_search_tags):
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 patternruntime_<toolName>.
When AI is running also MCP for 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.
csharp
[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:
csharp
[McpServerTool, Description("Get production count for today")]
public string runtime_get_production_count()
{
return @Tag.Production.TodayCount.ToString();
}With Error Handling:
csharp
[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 (!@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:
csharp
[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).
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 accessFor AI-assisted solution configuration (creating tags, displays, alarms):
| Version | Date | Changes |
|---|---|---|
| 1.1 | 2026-02 | 7 built-in tools; Updated architecture diagram; Added runtime_ prefix best practice; Improved tool description |