--- alias: user-guide-ai-mcp-server description: "Manage AI MCP Server definitions that expose tools to AI agents in Critical Manufacturing MES" --- # AI MCP Server The **AI MCP Server** page is used to manage MCP-compatible tool servers that can be registered in Critical Manufacturing MES and made available to eligible **AI Agents**. An **MCP Server** stores the canonical definition of a tool server inside MES, independently of the external runtime platform. This allows the system to manage both system-defined and user-defined MCP servers in a consistent way. ## Overview Use an **MCP Server** to define: * The server identity and display information. * The connection endpoint and runtime-related settings. * The tools that can be exposed to **AI Agents**. ## Protocol Version When creating or editing a user-defined **MCP Server**, select one of the following supported **Protocol Version** values: * `2026-07-28` * `2025-11-25` * `2025-06-18` * `2025-03-26` * `2024-11-05` The list is defined by the product and cannot be extended through configuration. Its newest value represents the latest MCP protocol version supported by both LibreChat and **Tool Inspection**. For information about MCP protocol revisions and version identifiers, see [Versioning](https://modelcontextprotocol.io/docs/2026-07-28/learn/versioning) in the Model Context Protocol documentation. ## Main View Depending on the configuration, the main view can include the following sections: * **Details** - displays the main information of the **MCP Server**, such as the name, description, and connection settings. ![AI MCP Server Details section.](../images/ai_mcp_server_details_page01.png) * **Tools** - displays the tools exposed by the **MCP Server** after synchronization. ![AI MCP Server Tools section.](../images/ai_mcp_server_details_page02.png) * **Attachments** - shows the documents that are attached to the **MCP Server** and enables you to attach additional documentation to it. * **History** - displays previous changes to the **MCP Server**, when history tracking is available. ## Authentication User-defined **MCP Servers** can use the `None`, `OAuth`, or `API Key` authentication mode. Configure the authentication mode when you create or edit the **MCP Server**. To configure API key authentication: 1. Open the **MCP Server**. 2. Select **Edit**. 3. In the **Authentication** section, select `API Key` as the **Authentication Mode**. 4. Select an **API Key Format**: * `Bearer` - passes the API key as a bearer token. * `Basic` - passes the API key as a basic token. * `Custom` - passes the API key through a custom header. 5. If you select `Custom`, enter the **API Key Custom Header**. 6. Enter the **API Key Value**. 7. Save the **MCP Server**. The system masks the API key value in the interface. To configure OAuth authentication, provide the **Authorization URL**, **Token URL**, and **Client ID**. The **Client Secret** is optional. ### Update Authentication Endpoints Changing an authentication endpoint prevents existing credentials from being reused with a different destination. !!! warning "Re-enter Credentials After Changing an Endpoint" When you change the **URL** for an MCP Server that uses API key authentication in the interface, the system clears the API key fields. Enter the **API Key Format**, **API Key Custom Header**, if applicable, and **API Key Value** again before saving the MCP Server. When you change the **Token URL** for an MCP Server that uses OAuth in the interface, the system clears the **Client Secret**. Enter a new client secret before saving if the OAuth provider requires one. When you update an MCP Server through the API, include replacement credentials in the same request when changing its authentication endpoints: * For API key authentication, changing the **URL** clears the stored API key unless the request includes a replacement. * For OAuth authentication, changing the **Authorization URL** or **Token URL** clears the stored client secret unless the request includes a replacement. ## Master Data Import You can create or update **AI MCP Server** definitions through the `AIMCPServer` worksheet in a **Master Data Package**. The system applies the same validation during import as it does when you create or edit an **AI MCP Server** in the interface. For API key authentication, provide both the **API Key Format** and **API Key Value**. For OAuth authentication, provide the **Authorization URL**, **Token URL**, and **Client ID**. When an import updates a system-defined **AI MCP Server** that uses OAuth, the system retains the **Authorization URL** and **Token URL** defined in the **Master Data Package**. It does not replace them with the URLs configured for the local Security Portal. ### UI Page MCP Server Authentication The system-provided UI Page MCP Server uses CustomerPortal for authentication. To use its tools, authenticate to CustomerPortal. ## Terminate and Restore an MCP Server You can terminate a user-defined **MCP Server** from the page actions. System-defined MCP servers cannot be terminated. Terminating an **MCP Server** removes it from LibreChat. To restore a terminated server, select **Unterminate**. The system synchronizes the restored server with LibreChat. ## Configuration Notes Keep the following behavior in mind when configuring an **MCP Server**: * The **MCP Server** itself does not define prompt behavior; it provides tools that can later be selected by prompts or agents. * Only administrators can create or update **MCP Servers**. * System-defined **MCP Servers** are read-only in the user interface. * The **Tools** section displays the tool definitions available in the runtime after synchronization. * The system manages the tool metadata and stores it in JSON format. Do not manually configure the synchronized metadata. ## Validation When you create or save an **MCP Server**, the system validates the following configuration: * The **URL** is defined. * The **Protocol Version** is one of the supported fixed values. * **Initialization Timeout** and **Request Timeout** are greater than or equal to `0`. * For the LibreChat runtime, an optional **Display Name** can contain only letters and spaces. * The selected **Authentication Mode** has the required authentication fields. ## Synchronization with LibreChat The system synchronizes **MCP Servers**, their tool metadata, and their associations with **AI Agents** with LibreChat. After a successful synchronization, the **MCP Server** is available in the runtime. For more information about runtime availability and authentication, see [[user-guide-ai-librechat-integration|LibreChat Integration]]. ## Related Configuration * Use [[user-guide-ai-agent|AI Agent]] to control which agents can use a given **MCP Server**. * Use [[master-data-excel-template-tutorial|Master Data Packages]] to create, update, or export **AI MCP Server** definitions in bulk.