4. Authentication and Security
The Hopex MCP Server is a HAS module. It therefore uses the same security framework as the other services exposed by Hopex Application Server.
Mode
Main use
User context
Secret
Recommended for
OAuth 2.0 / DCR
Interactive AI client usage
Authenticated Hopex user context
OAuth token and client registration
User-facing scenarios
API key
Machine-to-machine usage
Hopex user context associated with the API key
API key
Automation and technical integration
4.1. OAuth 2.0 and Dynamic Client Registration
The Hopex MCP Server supports OAuth 2.0 for interactive AI client usage. The AI client obtains an access token from the authentication service before calling the MCP endpoint exposed by HAS.
Dynamic Client Registration may be used when the AI client registers itself with the authentication service before the OAuth flow. Registration details are handled by the AI client and the authentication service; the Hopex MCP Server only consumes the validated authentication context.
The OAuth context includes the Hopex repository and connection profile. This binds the token to the correct Hopex environment and defines the applicable scope with the selected GraphQL schema and Hopex rights.
*The AI client registers dynamically when required, then starts the OAuth flow with the configured identity provider.
*After authentication and authorization, the AI client calls the MCP endpoint over HTTPS with the access token.
*HAS and the MCP Server validate the token and the associated OAuth context.
*The MCP Server accesses Hopex data through GraphQL/Web API within the authorized scope.
The OAuth configuration must remain aligned with the Hopex environment: identity provider, repository, connection profile, scopes, callback URLs, and client security rules.
OAuth declaration examples for AI clients are provided in section 14.5 AI client configuration examples. 14.514.5They are indicative and depend on the AI client implementation and documentation.
4.1.1. OAuth settings
OAuth tokens for MCP clients are issued by the Hopex authentication service (UAS). These settings are configured in the HAS console: Modules > Module Settings > UAS settings > OAuth settings group.
Values outside the allowed range are refused when saved, and the error is highlighted (red) below the field.
Setting
Default
Description
JWT signing key
Empty
Secret key that signs the OAuth tokens. At least 32 characters, random. Required with several HAS nodes, and to keep tokens valid across UAS restarts.
Allow ephemeral OAuth signing key
Checked
Used only when the JWT signing key is empty: tokens are signed with a random key drawn at each UAS start, lost at each restart and refused by the other HAS nodes. Uncheck it in production once a key is set. Unchecked with no key, OAuth is refused.
JWT token lifetime (minutes)
60
Lifetime of the access tokens, from 5 to 1440 minutes. An access token cannot be revoked before it expires.
Refresh token maximum lifetime (hours)
168 (7 days)
How long a client can renew its access token without a new interactive sign-in, counted from that sign-in. From 0 to 8760. 0 suspends refresh tokens.
Refresh token inactivity timeout (hours)
72 (3 days)
A refresh token not used for this long expires. From 0 to 8760. 0 means no inactivity timeout.
OAuth redirect URI allowlist
Empty
Redirect URIs of OAuth clients registered by hand, one client_id|https://... entry per line. Not needed for clients that register themselves.
Allow localhost OAuth redirect URIs
Checked
Accepts http://localhost, http://127.0.0.1 and http://[::1] redirect URIs (any port) for any client. Needed by local clients such as MCP Inspector or GitHub Copilot CLI.
Dynamic client registration
Open
Open: MCP clients register themselves. Disabled: new registrations are refused; clients already registered keep working.
4.1.2. Refresh tokens
A client that signs in through the authorization code flow receives a refresh token with its access token. It renews its access token without a new interactive sign-in until the maximum lifetime or the inactivity timeout is reached; the user then signs in again. Refresh tokens are single-use and replaced at each renewal. The Hopex login is checked again at each renewal.
Changing the JWT signing key invalidates the access tokens only: a client holding a refresh token gets a new access token. To cut access for all MCP clients, set Refresh token maximum lifetime to 0. Refresh tokens are not issued for API keys or for the password grant.
4.1.3. Restricting client registration
To accept only the clients declared by the administrator, set Dynamic client registration to Disabled and uncheck Allow localhost OAuth redirect URIs: with localhost allowed, a local client is accepted without registration. To add a local client later, set registration back to Open while it registers.
4.1.4. Cancelling a sign-in
If the user cancels the sign-in of an MCP client (Back on the repository and profile selection screen), the authorization ends with an error returned to the client, and the browser session of the authentication service is signed out. If Hopex Web was open in the same browser, it may ask the user to sign in again.
4.1.5. Recommended production settings
*Set a JWT signing key and uncheck Allow ephemeral OAuth signing key. With several HAS nodes, a JWT signing key is mandatory.
*Adjust the refresh token maximum lifetime and inactivity timeout to the customer security policy.
*Set the dynamic client registration mode and the localhost option according to the clients the customer allows.
4.2. API key authentication
API key mode supports calls without interactive authentication. Each API key is associated with a Hopex user context.
Mutation rules are defined in section 5.1.2 Mutation authorization and governed operationally in section 13.4 Write-operation governance.
The AI client sends the API key in the x-api-key HTTP header. The declaration of this header depends on the AI client: connector configuration, environment variable, or dedicated administration screen.
The API key is managed as a secret. It is not exposed in code, logs, or user interfaces. Rotation, storage, and revocation follow the security rules of the customer environment.
Examples for x-api-key are provided in section 14.5 AI client configuration examples.
4.3. Authorization and Hopex rights
Authentication identifies the call context. Authorization then determines which data and operations are accessible. MCP calls use the Hopex rights associated with the target repository, connection profile, and exposed GraphQL schema.
The MCP Server exposes the authorized objects, relationships, and operations. The scope visible to the AI client depends on Hopex rights, HAS configuration, and the selected GraphQL schema.
4.4. Transport security
Communications with the MCP Server use HTTPS, like the other services exposed by HAS. HTTPS protects exchanges between the AI client, the MCP endpoint, HAS, and the exposed Hopex services.
Depending on the deployment, access may go through TLS termination, a reverse proxy, a gateway, firewall rules, and certificates. These elements follow the network and security rules of the customer environment.
4.5. Traceability
MCP calls are traced for diagnosis, support, and security analysis. Logs identify the call context, calling component, endpoint used, validation result, and any errors.
4.6. Licensing requirements
The Hopex MCP Server does not require a separate product license.
Each call uses the license and rights of the associated Hopex user: the authenticated user with OAuth, or the user linked to the API key. The API key can be linked to an existing user account or to a specific account created for API access. In the latter case, this account requires its own Hopex license.