The Polarity AI Features, which power the built-in chat and LLM-optimized reducers for the MCP, is configured in the Admin panel under Server Configuration.
You must be a Polarity administrator to access these settings.
Step 1: Enable the MCP Server
Log into the Polarity Server’s operating system CLI with a user who has “write” access to the Polarity Server’s install directory (
/appby default).Open the
.envfile for editing.In a standard installation, this file will be located at
/app/.env.
Add the following line to the end of the file:
HERMES_MCP_SERVER=trueSave and close the file.
Restart the Polarity Server containers.
cd /app && sudo ./down.sh && sudo ./up.sh
Step 2: Navigate to Model Settings
Log in to the Polarity interface.
Click the “Cog” (or “Gear”) icon in the upper right-hand corner.
Select “Settings” from the drop-down navigation.
Select “Server Configuration”.
Click the “Model Settings” tab from the navigation on the left.
Step 3: Enable AI
Toggle the AI-enabled switch to the on position.
This activates the AI backend.
Without this toggle, the chat endpoint will return an error, and reducers will not be applied during MCP lookups.
Step 4: Select a Provider
Use the Provider dropdown to select your AI provider.
The available providers are described in "AI Provider Reference".
Once you select a provider, the Model dropdown will populate with the available models for that provider.
Step 5: Enter Provider Credentials
Depending on the provider, you will see different credential fields:
Provider | Required Credentials |
|---|---|
| API Key |
| AWS Access Key ID, AWS Secret Access Key, AWS Region, and optionally AWS Session Token |
| Base URL (e.g., http://localhost:11434). No API key required. |
| Base URL (pointing to any OpenAI-compatible API). API Key if required by the endpoint. |
All credentials are encrypted at rest using Polarity's Vault cipher.
They are never stored as plaintext in the database.
Step 6: Configure Advanced Settings (Optional)
Expand the Advanced Settings section to adjust the following parameters:
Field | Default | Description |
|---|---|---|
Temperature |
| Controls response randomness. Lower values (0.1-0.3) produce more deterministic, factual responses. For security analysis workflows, values between 0.1 and 0.4 are recommended. |
Max Tokens |
| The maximum number of tokens the model may generate in a single response. |
Max Depth |
| The maximum number of sequential tool calls the LLM may make in one conversation turn. Limits runaway agentic loops. |
Timeout |
| Maximum wait time in milliseconds for a response from the AI provider. Set to 0 to use the server's HTTP idle timeout. |
Metric Retention Days |
| How long conversation metrics and token usage records are retained. |
Step 7: Test the Configuration
Click the Test Chat button.
Polarity sends a single verification message to the configured AI provider and displays the response.
A successful test confirms that the provider, model, and credentials are correctly configured.
Step 8: Save
Click Save.
The settings take effect immediately.
No server restart is required.