WinCC Unified MCP Server

WinCC Unified MCP Server

Enables AI assistants to interact with SIEMENS WinCC Unified SCADA systems through their GraphQL API, supporting operations like reading/writing tag values, browsing objects, querying historical data, and managing alarms.

Category
访问服务器

README

WinCC Unified MCP Server

A Model Context Protocol (MCP) server designed to interface with SIEMENS WinCC Unified SCADA systems via their GraphQL API. This server exposes various WinCC Unified functionalities as MCP tools, allowing AI assistants and other MCP-compatible clients to interact with the SCADA system.

Features

  • Connects to a WinCC Unified GraphQL endpoint.
  • Provides MCP tools for:
    • User authentication (login-user).
    • Browsing SCADA objects (browse-objects).
    • Reading current tag values (get-tag-values).
    • Querying historical/logged tag data (get-logged-tag-values).
    • Fetching active alarms (get-active-alarms).
    • Fetching logged alarms (get-logged-alarms).
    • Writing values to tags (write-tag-values).
    • Acknowledging alarms (acknowledge-alarms).
    • Resetting alarms (reset-alarms).
  • Supports an optional automatic service account login and token refresh mechanism.

Prerequisites

  • Node.js (v18.x or later recommended).
  • npm (which typically comes with Node.js).
  • Access to a running WinCC Unified GraphQL server endpoint.

Configuration

The server is configured using environment variables:

  • GRAPHQL_URL: Required. The full URL of your WinCC Unified GraphQL server. Example: https://your-wincc-server.example.com/graphql
  • GRAPHQL_USR: (Optional) Username for a service account. If provided along with GRAPHQL_PWD, the server will attempt to log in with these credentials on startup and periodically (every minute) to maintain a session. This token is stored globally and used by tools if a user-specific login hasn't occurred.
  • GRAPHQL_PWD: (Optional) Password for the service account.

Example environment variable setup (Linux/macOS):

export GRAPHQL_URL="http://localhost:4000/graphql"
export GRAPHQL_USR="username1"
export GRAPHQL_PWD="password1"
export NODE_TLS_REJECT_UNAUTHORIZED=0 # Set to 0 to disable TLS certificate validation (development only)

How to Start

  1. Navigate to the project directory.

  2. Install dependencies: If you haven't already, install the necessary Node.js packages:

    npm install
    
  3. Set Environment Variables: Ensure the GRAPHQL_URL (and optionally GRAPHQL_USR, GRAPHQL_PWD) environment variables are set as described in the "Configuration" section.

  4. Run the server: You can use the provided run.sh script (on Linux/macOS):

    ./run.sh
    

    The run.sh script executes export NODE_TLS_REJECT_UNAUTHORIZED=0 before starting the server with node index.js. The NODE_TLS_REJECT_UNAUTHORIZED=0 setting disables TLS certificate validation, which might be necessary if your WinCC Unified GraphQL server uses HTTPS with a self-signed or internally-issued certificate. Warning: Disabling certificate validation (NODE_TLS_REJECT_UNAUTHORIZED=0) should only be done in trusted development or internal network environments, as it bypasses important security checks.

    Alternatively, you can run the server directly:

    # On Linux/macOS, if your GraphQL server uses HTTPS with a self-signed certificate:
    # export NODE_TLS_REJECT_UNAUTHORIZED=0
    # On Windows (PowerShell), if needed:
    # $env:NODE_TLS_REJECT_UNAUTHORIZED = "0"
    
    node index.js
    

The MCP server will start and listen on port 3000 by default. You can configure the port using the MCP_PORT environment variable:

MCP_PORT=8080 node index.js

MCP requests are expected at the /mcp endpoint (e.g., http://localhost:3000/mcp).

Disclaimer

Security Notice: This server has not been hardened or secured for production use. It is the responsibility of the user to implement appropriate security measures (such as authentication, authorization, network restrictions, and HTTPS) before deploying or exposing this server in any environment.

Connecting with a Claude Desktop Client

To use this MCP server with the Claude AI desktop application (or other clients supporting mcp-remote), you need to configure the client to connect to this server. For the Claude Desktop application, this is typically done by editing a claude_desktop_config.json file. The location of this file varies by operating system but is usually within the Claude application's support or configuration directory.

Add or update the mcpServers section in your claude_desktop_config.json file like this:

{
  "mcpServers": {
    "WinCC Unified": {
      "command": "npx",
      "args": ["mcp-remote", "http://localhost:3000/mcp"]
    }
  }
}

Explanation:

  • "WinCC Unified": This is a user-defined name for this server connection that will appear in the Claude application. You can change it to something meaningful to you (e.g., "WinCC_Unified_Plant_A").
  • "command": "npx": This tells the client to use npx (Node Package Execute) to run the mcp-remote tool.
  • "args": ["mcp-remote", "http://localhost:3000/mcp"]:
    • mcp-remote: This is the command-line MCP client. Ensure that npx can find it. You might need to install @modelcontextprotocol/tools globally (npm install -g @modelcontextprotocol/tools) or have it available in a project context accessible by npx.
    • http://localhost:3000/mcp: This is the URL where your WinCC Unified MCP server is listening. Adjust the hostname and port if your server runs elsewhere or on a different port.

After saving this configuration, restart your Claude Desktop application. It should now list "WinCC Unified" (or your chosen name) as an available MCP server, allowing you to use its tools.

Available Tools

The server exposes the following tools for interacting with WinCC Unified:

  • login-user: Logs a user in to WinCC Unified using username and password. Stores the session token for subsequent requests. It is optionally, because the MCP server could be started in the way that it is doing automatically a logon with the service account.

  • browse-objects: Queries tags, elements, types, alarms, logging tags and basically anything that has a configured name, based on the provided filter criteria.

  • get-tag-values: Queries tag values from WinCC Unified. Based on the provided names list. If directRead is true, values are taken directly from PLC.

  • get-logged-tag-values: Queries logged tag values from the database.

  • get-active-alarms: Query active alarms from the provided systems.

  • get-logged-alarms: Query logged alarms from the storage system.

  • write-tag-values: Updates tags, based on the provided TagValueInput list.

  • acknowledge-alarms: Acknowledge one or more alarms. Each alarm identifier must have the name of the configured alarm, and optionally an instanceID. If the instanceID is 0 or not provided, all instances of the given alarm will be acknowledged.

  • reset-alarms: Reset one or more alarms. Each alarm identifier must have the name of the configured alarm, and optionally an instanceID. If the instanceID is 0 or not provided, all instances of the given alarm will be reset.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选